Closed LearnedVector closed 7 years ago
You can record audio using arecord -v -D plughw:1 -f S16_LE -r 16000 -c 2 audio-2ch-16k.wav
-D plughw:1
is to specify the hardware - respeaker mic array.
Is there no way to just make the respeaker mic array the default mic? Or do i have to use that command everytime I want to record audio @xiongyihui
You add a alsa configuration file ~/.asoundrc
with contents:
pcm.!default {
type plug
slave.pcm "hw:1"
}
@xiongyihui changing the ~/.asoundrc
to the contents above did nothing and the command
arecord -v -D plughw:1 -f S16_LE -r 16000 -c 2 audio-2ch-16k.wav
gives me this error message
Recording WAVE 'audio-2ch-16k.wav' : Signed 16 bit Little Endian, Rate 16000 Hz, Stereo
ALSA lib pcm_params.c:2162:(snd1_pcm_hw_refine_slave) Slave PCM not usable
arecord: set_params:1204: Broken configuration for this PCM: no configurations available
Atleast we are getting an error message now! getting somewhere :). do you have any more tips to troubleshoot this?
So i switched to use another respeaker mic array and the command arecord -v -D plughw:1 -f S16_LE -r 16000 -c 2 audio-2ch-16k.wav
works! I get a wav recording after doing a keyboard interrupt. But the wav file has a bunch of white noise, an overwhelming amount. I can barely hear me speaking in the wav file due to the white noise.
I've used this to update my respeaker firmware (https://github.com/respeaker/mic_array_dfu) before trying any of this.
Also when speaking the led does not light up in any direction. May be a hardware issue?
More debugging info. when i play the wav file using headphones, the right side is white noise (static noise) and the left side has a clear recording.
if you use new firmware, try to record 8 channel audio instead of 2.
arecord -v -D plughw:1 -f S16_LE -r 16000 -c 8 audio-8ch-16k.wav
I plugged respeaker into the rapsberry pi through the usb port. What are configurations I need to get it working?
more info
Thanks in advanced