I don’t know anything about ALSA, but shouldn’t capture.pcm "array" be capture.pcm "mic"? At least I saw something like “Unknown PCM array” in the logs.
Anyways, it now shows “mic” as working in the settings (both arecord and PyAudio), however pressing “Wake Up” still results in a timeout.
Edit: Nevermind, it now only shows as working when I select PyAudio. However, when I select arecord and hit refresh and test, I get many “Resource busy” errors, but not for the line rhasspymicrophone_cli_hermes: ['arecord', '-q', '-D', 'mic', '-r', '16000', '-f', 'S16_LE', '-c', '1', '-t', 'raw'], which seems good
Yes its mainly about the dsnoop configuration as this is what allows several entities to access one hardware card.
The additional mic pcm needs to be used as a dsnoop pcm can only directly work with hw and not with plug hw. So the addition mic pcm is where the plug for conversion is inserted into the chain.
@synesthesiam when using arecord as a standard record method does this happen because Rhasspy is trying to start another record command for the test button which will not work unleast a dsnoop or pulse configuration is used as Rhasspy is already blocking that device?
Maybe something for the docs?
Yes there would be a need for a bit of help on this.
I have spent hours with @JGKK trying to configure PulseAudio or dsnoop. It seems Rhasspy is only happy with Alsa. And it’s impossible to use the microphone for another application in parallel.
That one gives a lot of headaches for sure. The biggest problem is trying to use anything pulseaudio from a headless application like nodered or rhasspy.
You pretty much have to change pulseaudio to systemwide mode and add the user running Rhasspy to the right pulse-access group.
But even with pulseaudio installed and running you should be able to use alsa devices directly from arecord and co. The only thing that happens is that the device disappears from the available pulseaudio sources in that instance if you don’t have a dsnoop setup in the asound.conf.
But in general I have used the combination of pulseaudio in systemwide mode and accessing devices directly at the alsa level before and this gives no general conflicts apart from the above mentioned.
But all my installations are headless so I can’t speak for anything Linux and desktop unfortunately.
You can do it both ways I never new why systemwide mode is frowned on but with Mycroft I had a service that started up with pulse in usermode no problem.
Have a look on their github as the user based is and was done.
I just noticed last update that pulse audio is now the default for the desktop and installed on all in the base image.
Pulse in docker gets confusing for me but I have never been particularly bright.
Again sometimes its just easier to use plughw: and and difference in format and settings plug will resample.
hw: is direct and sometimes you can get errors on format, SR & channels.
Also I never use the device number anyway as apart from snd_aloop never use a card with multiple devices.
Dont use the dsnoop card directly. It doesn’t have any inbuilt conversion. Always use the abstracted array pcm or alsa default as this is where sample rate conversion and so on is inserted in the chain with it beeing of type plug.
You need to either manually define the usage array pcm or use alsa default.
Both the options you are choosing will either not work because of missing samplerate conversion or the second will work but will circumvent the dsnoop and access the hw directly i think.
Meaning if you set pcms then you can just call them direct with a arecord -D dsnooparray…
PS just drop the channels setting for now and see how you go.
Rhaspy prob wants mono
channels 4
}
route_policy sum
}
But that does create weird notch filters that the PS3 prob flattened with eq.
You can not really do it as its eq is very different if sound is coming front or back to from the sides.
The problem of @kart-able is that he wants to still be able to record from the mic even if Rhasspy is using it.
The asound he posted above works no problem for recording from it with multiple devices (i tested that). Just not with Rhasspy as it doesn’t seem to want to just use the dafault with arecord.
Yeah why I posted the above as it sums to mono as rhasspy calls a mono stream doesn’t it?
Or set just a single channel as rhasspy should be able to use the default but also from memory if you do a search you can add a hint description and that should list the pcms in the gui.
I mentionned dsnoop:CARD=CameraB409241,DEV=0 as it is the option offered by default for dsnoop in the dropdown list. But no option works.
Your suggestion with
hint {
show on
description "this is an array"
}
in the array pcm does not help either. There is no additional option offered in the dropdown list. Which should mean Rhasspy ignores the content of asound.conf or what?