LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 04-09-2009, 02:46 PM   #1
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian
Posts: 1,432

Rep: Reputation: 110Reputation: 110
Thumbs up How do I record sound?


Sigh. Can someone lend a hand with the usual Linux "friendliness" over here?

I am trying to record some sound. Just talk on a cheap microphone. I used Slackware for a couple of years, and just used the 'rec' command. I can't remember the exact command line, but I remember it was dead simple. Now I use Ubuntu and can't figure out how to use 'rec'. None of my command lines is working and the manual seems pretty terse. I can't figure out how to use it.

I also tried Audacity. That would be better, a more visual take of what is going on, so I can monitor time and noise levels. But it isn't working either:

Code:
luc$[546]videos> audacity &
[2] 380
[1]   Done                    audacity
lukub$[546]videos> jackd 0.109.2
Copyright 2001-2005 Paul Davis and others.
jackd comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details

JACK compiled with System V SHM support.
loading driver ..
creating alsa driver ... hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|-|32bit
control device hw:0
configuring for 48000Hz, period = 1024 frames (21.3 ms), buffer = 2 periods
ALSA: final selected sample format for capture: 16bit little-endian
ALSA: use 2 periods for capture
ALSA: final selected sample format for playback: 16bit little-endian
ALSA: use 2 periods for playback
So I press the Record button and always get this error:

Quote:
Error while opening sound device. Please check the input device settings and the project sample rate.
That error brings up a lot of search hits on Google, but all threads seem to recommend setting it all to either OSS or Alsa Default, none of that is helping me.

I have tried all the options offered by Audacity, none of them seems to work. Here is a screenshot of my options:

http://i40.tinypic.com/2j4u8tg.jpg

I have only used this same microphone successfully with Skype, which provides me these options:

http://i40.tinypic.com/2lm3xw7.png

The one selected is the one that works.

I don't know what else to do. Ideas welcome.

Last edited by lucmove; 04-09-2009 at 07:13 PM.
 
Old 04-09-2009, 03:55 PM   #2
Retrievil_Knievil
Member
 
Registered: Mar 2004
Location: Stavanger, Norway
Distribution: Gentoo, Slackware/SLAX, Knoppix, CentOS, IPCop & DSL
Posts: 138

Rep: Reputation: 21
Ok, lets take it from the top

What samplerate do you use? If you use 48000 you should make sure it's the same in all settings. Otherwise you'll get strange errors. You can also select alsa instead of jack as sound driver in Audacity, that way you won't have to bother with jack for now. Do you have "arecord" installed?
 
Old 04-09-2009, 04:40 PM   #3
TITiAN
Member
 
Registered: Mar 2008
Location: NRW, Germany
Distribution: Arch Linux, using KDE/Plasma
Posts: 392

Rep: Reputation: 49
If you are using Skype with a "hw" device, then that's the problem: most soundcards only support one instance that directly accesses input/output at the same time.

Are you using Skype while trying to record? If so, I suggest you set both Skype and Audacity to use the "default" ALSA audio device, that way they will share one input.
 
Old 04-09-2009, 04:43 PM   #4
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian
Posts: 1,432

Original Poster
Rep: Reputation: 110Reputation: 110
Retrievil_Knievil,

I'm not sure what you mean by "the same samplerate in all settings". Audacity just gives me one.

Yes, I have "arecord" installed and it's just as easy to use as it used to be with 'rec' on Slackware. That's a start, thanks! But I wish I could at least see how much time has elapsed. That would be useful. I had that with 'rec' on Slackware. I am checking this 'arecord' application's documentation and don't find that option.

It would be even better if I could use Audacity to record.

Last edited by lucmove; 04-09-2009 at 04:45 PM.
 
Old 04-09-2009, 04:47 PM   #5
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian
Posts: 1,432

Original Poster
Rep: Reputation: 110Reputation: 110
TITiAN,
Skype is turned off all the time. I use it rarely ever, just for international calls. See my reply to Retrievil_Knievil, I can record fine with 'arecord' on the console. Now I just wish I could use Audacity or, at the very least, monitor the recording time.
 
Old 04-09-2009, 04:51 PM   #6
hoodooman
Member
 
Registered: Oct 2006
Location: Stirling in Scotland
Distribution: Slackware 13.37 64 bit
Posts: 297

Rep: Reputation: 42
$ arecord -vv -c 1 -f S16_LE -r24000 testpodcast.wav


$ arecord -vv -c 1 -f S16_LE -r44100 testpodcast.wav


These are what I use.I find the first one suitable for speech and the second one if Im singing and playin'guitar.If you want two channels change the -c 1 to -c 2.You can also change the samplerate to higher if you need it.I made the second one into an executable and put it in /usr/local/bin and I named it "micrecord".So all I do is open a terminal and enter micrecord to begin.Works like a charm.
 
Old 04-09-2009, 05:16 PM   #7
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian
Posts: 1,432

Original Poster
Rep: Reputation: 110Reputation: 110
Thanks.

The -vv option provides some sort of sound level meter, but still no time counter.
 
Old 04-09-2009, 05:27 PM   #8
TITiAN
Member
 
Registered: Mar 2008
Location: NRW, Germany
Distribution: Arch Linux, using KDE/Plasma
Posts: 392

Rep: Reputation: 49
I just tested ALSA input/output with my mic with Audacity 1.3.6; it just works on my system (I tested both the "default" device for both i/o and a hw device for both i/o). Audacity says it is using portaudio v19, though I don't have any "portaudio" package installed on my system...

Could you be using an older version of audacity? I remember having similar problems with audacity some time ago, especially with jack [which I personally only recommend for music production] (it seems to me with the 1.3.6 version it all works better). edit: and jack now works nicely with audacity.

Last edited by TITiAN; 04-09-2009 at 05:29 PM.
 
Old 04-09-2009, 05:45 PM   #9
Retrievil_Knievil
Member
 
Registered: Mar 2004
Location: Stavanger, Norway
Distribution: Gentoo, Slackware/SLAX, Knoppix, CentOS, IPCop & DSL
Posts: 138

Rep: Reputation: 21
If arecord works, Alsa is working with the mic and audacity should work also if you deactivate jack and use alsa directly in audacity.
 
Old 04-09-2009, 05:51 PM   #10
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian
Posts: 1,432

Original Poster
Rep: Reputation: 110Reputation: 110
Yes, upgrading might help, but 1.3.4-1.1 is the only one available for my version of Ubuntu, 8.04.1.
 
Old 04-09-2009, 06:12 PM   #11
TITiAN
Member
 
Registered: Mar 2008
Location: NRW, Germany
Distribution: Arch Linux, using KDE/Plasma
Posts: 392

Rep: Reputation: 49
I'm not saying that it must be 1.3.6. I don't know when exactly Audacity improved, but it did (I think around last year, not sure); so please try upgrading if the version you have right now doesn't work anyway.

BTW there are a lot of simpler recording applications, say krec for KDE and gnome-sound-recorder for Gnome (I don't know about the package names, but I'm sure about the cmd line names), the one that comes with the Gnome desktop even uses FLAC by default for high quality (flac=free lossless audio codec), which saves disk space.

Audacity is a good program for mastering/editing/etc. audio material, other tools, like the "rec" command might be more suitable for simple recording.

Last edited by TITiAN; 04-09-2009 at 06:14 PM.
 
Old 04-09-2009, 07:12 PM   #12
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian
Posts: 1,432

Original Poster
Rep: Reputation: 110Reputation: 110
You are right, I should try other things. I just discovered two other sound recorder applications already present in my system all this time.

1) 'sound-recorder' is a command line recorder very similar to 'arecord', but with a time counter! w00t!

2) And then I found 'qarecord', a GUI application that shows nothing but a sound level and... a time counter. Double w00t!

This case is closed, I am a happy camper, thank you all.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
record sound qqqson Linux - Software 1 06-26-2008 04:36 AM
Can't record sound from my mic cwwilson721 Slackware 1 12-16-2006 05:02 PM
i cant record my sound in mandrake Jimmy911 Mandriva 3 03-14-2005 04:42 AM
Sound - Can not record! dolvmin Linux - Software 1 01-08-2005 06:00 PM
Xandros delux 2.0 When I try to run Sound server Control ,Media Player & Sound Record Jesta Linux - Distributions 0 05-15-2004 09:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 07:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration