georgekok97
Posts: 37
Joined: Thu Jul 26, 2012 11:11 am

Raspberry Pi Won't Record from USB Microphone (solved)

Thu Apr 04, 2013 5:30 pm

I have a Plug-and-Play USB Microphone.

I use the following command to record for Voice Recognition:

Code: Select all

sox -r 16000 -t alsa default recording.flac silence 1 0.1 2% 1 1.5 2%
I get this error:

Code: Select all

sox FAIL sox: `default' No such device: Operation not permitted
(tried with "sudo" prefixed but nothing)

I try to use "pulse" and other channels from the Command aplay -L, but I always get an error.

I even tried to change the /etc/asound.conf file to disable the default channel and use other channels, as I read to a post, but didn't work...

I run the alsamixer command and set the USB Microphone but still doesn't record....


Any Suggestions how to fix it?

-rst-
Posts: 1316
Joined: Thu Nov 01, 2012 12:12 pm
Location: Dublin, Ireland

Re: Raspberry Pi Won't Record from USB Microphone

Tue Apr 09, 2013 3:53 pm

You might want to try another application (maybe arecord) to see if the system is setup ok.
http://raspberrycompote.blogspot.com/ - Low-level graphics and 'Coding Gold Dust'

georgekok97
Posts: 37
Joined: Thu Jul 26, 2012 11:11 am

Re: Raspberry Pi Won't Record from USB Microphone

Tue Apr 09, 2013 4:17 pm

I have tried arecord and it doesn't work... Any other suggestion?

shuckle
Posts: 565
Joined: Sun Aug 26, 2012 11:49 am
Location: Finland

Re: Raspberry Pi Won't Record from USB Microphone

Tue Apr 09, 2013 4:23 pm

Do you see anything with dmesg or lsusb?
Does linux regocnize the microphoneat all?
What linux version do you use? uname -a

georgekok97
Posts: 37
Joined: Thu Jul 26, 2012 11:11 am

Re: Raspberry Pi Won't Record from USB Microphone

Tue Apr 09, 2013 4:32 pm

It recognizes the Microphone.

I tried with aplay -L and lsusb.....

I use the latest Raspbian version.

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 4454
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: Raspberry Pi Won't Record from USB Microphone

Wed Apr 10, 2013 9:56 pm

Hi georgekok97,
FWIW Some time ago I made a few notes on getting a headset working with a "Daffodil USB Sound Adapter" which includes a microphone input. I used "audacity" for the final tests. There may be something there within the "audio setup" process that you've "missed" (IIRC it took me a while to get a "mixer" working and setup volume levels etc.). They can be found within my website at http://www.cpmspectrepi.webspace.virgin ... apter.html .
HTH, Trev.
Still running Raspbian Jessie on some older Pi's (an A, B1, B2, B+, P2B, 3xP0, P0W) but Stretch on my P3B+, P3B, B+, A+ and a B2. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

georgekok97
Posts: 37
Joined: Thu Jul 26, 2012 11:11 am

Re: Raspberry Pi Won't Record from USB Microphone

Thu Apr 11, 2013 7:14 pm

Thanks I will check it out and Post a new reply later!


EDIT:


I saw the commands you used.

The truth is that at my commands (that I used for recording), I set the Input Audio Device like this (example):

Code: Select all

arecord example.wav -D sysdefault
while you use (and probably correct):

Code: Select all

arecord example.wav -D sysdefault:CARD=Set
I will check again the Channels available when I plug the USB Mic In, and I will try the new command and I will post if my Problem is solved!



Thanks!

tejonbiker
Posts: 30
Joined: Tue Aug 28, 2012 1:36 am

Re: Raspberry Pi Won't Record from USB Microphone

Wed May 08, 2013 6:51 pm

arecord example.wav -D sysdefault:CARD=1 works flawlessly for me, I have a Logitech C170 with Webcam and built in Mic. Thanks for the info.

georgekok97
Posts: 37
Joined: Thu Jul 26, 2012 11:11 am

Re: Raspberry Pi Won't Record from USB Microphone

Thu May 09, 2013 10:57 am

arecord example.wav -D sysdefault:CARD=1 works flawlessly for me, I have a Logitech C170 with Webcam and built in Mic. Thanks for the info.

Works! It Works!

Thanks very very much!

uj7
Posts: 1
Joined: Wed Apr 11, 2018 4:20 pm

Re: Raspberry Pi Won't Record from USB Microphone (solved)

Wed Apr 11, 2018 4:41 pm

When tried "arecord exm.wav -D sysdefault:CARD=1" not working for me..

I got this error
ALSA lib confmisc.c:767:(parse_card) cannot find card '1'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM sysdefault:CARD=1
arecord: main:788: audio open error: No such file or directory

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 4454
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: Raspberry Pi Won't Record from USB Microphone (solved)

Thu Apr 12, 2018 3:29 pm

uj7 wrote:
Wed Apr 11, 2018 4:41 pm
When tried "arecord exm.wav -D sysdefault:CARD=1" not working for me..
I got this error
ALSA lib confmisc.c:767:(parse_card) cannot find card '1'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM sysdefault:CARD=1
arecord: main:788: audio open error: No such file or directory
Unfortunately my (and probably others) suggestions in this "ancient"** thread are almost certainly "out-of-date" - Raspbian has moved on from Wheezy. through Jessie, and is now Stretch and I was working with either a B1 or B2 Pi back then.
Trev.
** Last post nearly 5 years ago, in 2013.
Still running Raspbian Jessie on some older Pi's (an A, B1, B2, B+, P2B, 3xP0, P0W) but Stretch on my P3B+, P3B, B+, A+ and a B2. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 10487
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Raspberry Pi Won't Record from USB Microphone (solved)

Thu Apr 12, 2018 3:54 pm

That is the problem with necromancing such an old thread, try what you want to do while using a modern (still supported) OS like raspbian Stretch, and if it doesn't work ask a new question here, while giving all the relevant information.

Return to “General programming discussion”

Who is online

Users browsing this forum: No registered users and 3 guests