mithun
December 18, 2020, 3:57am
1
I am trying to record voice and play back on RPI 4 with MIC+ running on BalenaOS. I have installed als-utils and have .asoundrc file as below
pcm.!default {
type asym
playback.pcm {
type plug
slave.pcm "hw:0,0"
}
capture.pcm {
type plug
slave.pcm "hw:1,0"
}
}
speaker-test works fine but record does not work. “aplay -l” shows the card but “arecord -l” does not show any card.
But when I plug in a USB MIC, it shows up. I am wondering what’s wrong.
I also have below configuration as suggested
BALENA_HOST_CONFIG_dtoverlay = hifiberry-dac
DT Params = “i2c_arm=on”,“spi=on”,“audio=off”
Any help is much appreciated.
Thanks,
Mithun
mithun
December 19, 2020, 3:47am
2
I figured it out. I had to use “googlevoicehat-soundcard” as overlay
And .asoundrc as below
pcm.softvol {
type softvol
slave.pcm dmix
control{
name Master
card 0
}
}
pcm.micboost{
type softvol
slave.pcm dsnoop
control {
name Micro
card 0
}
min_dB -10.0
max_dB 50.0
resolution 256
}
pcm.!default {
type asym
playback.pcm "plug:softvol"
capture.pcm "plug:micboost"
}
ctl.!default {
type hw
card 0
}
Perfect thanks for sharing!
Sorry for not answering quicker
mithun
December 29, 2020, 3:13pm
4
No problem @Raspiaudio … if anyone wants to get a code reference , I have one project on hackster.io with github repo here .
this is a great project! thanks for sharing I really like the telegram notification system and how you have trained the model with pictures of your smartphone shot from the raspicam, clever!
A fun evolution to the project could be to play a bird song from the web corresponding to the identified bird breed.
I will publish your link of the project page