By default it’s stereo and S32_LE, which seems to make it reject Rhasspy’s attempt to initialize it as S16_LE mono with pyaudio.
I tried using “command” configuration and specifying that it was 32 bit (width = 4) but it seemed to initialize really slowly and was therefore problematic for recording raven soundbytes for example.
If you are on Linux, you can use ALSA plughw instead of hw.
It’ll do the resampling and format conversion automatically.
As for the stereo to mono, you can also use ALSA and create a routing PCM that only keep the left or right channel (or even sum them). Maybe plughw can do this also…
I think there might be some examples of this in this forum.
Really ? i don’t remember reading this anywhere in any documentation - and it is such useful info.
I have tried to use the hw: variant to minimise overhead processing on low-powered satellites, but ended up using plughw: anyway.
after putting this to ~/.asoundrc as described on the linked page:
#This section makes a reference to your I2S hardware, adjust the card name
# to what is shown in arecord -l after card x: before the name in []
#You may have to adjust channel count also but stick with default first
pcm.dmic_hw {
type hw
card sndrpii2scard
channels 2
format S32_LE
}
#This is the software volume control, it links to the hardware above and after
# saving the .asoundrc file you can type alsamixer, press F6 to select
# your I2S mic then F4 to set the recording volume and arrow up and down
# to adjust the volume
# After adjusting the volume - go for 50 percent at first, you can do
# something like
# arecord -D dmic_sv -c2 -r 48000 -f S32_LE -t wav -V mono -v myfile.wav
pcm.dmic_sv {
type softvol
slave.pcm dmic_hw
control {
name "Boost Capture Volume"
card sndrpii2scard
}
min_dB -3.0
max_dB 30.0
}
I can choose from these devices:
but the assumed one - plughw:CARD=sndrpii2scard,DEV=0 - doesn’t work.
How can I use this microphones (in stereo connection) to be used in Rhasspy?