Use different sound devices for mic/speaker

HI folks,

I’m completely new to Rhasspy - was messing around with Snips until Sonos got their hands on it…

Now I managed to get 2 instances of Rhasspy running, one on my homeserver running a docker container on debian and the other on a Pi 3b also running docker.

I followed the instructions for a Server/Satelite setup over MQTT and the communication seems to work - I can sniff mqtt packets via MQTT.fx.

What is not working is my audio on the Pi - I try to use a C-Media compatible USB-Soundcard for speakers and a Samson USB-Mic for recording.

lsusb

tells me

Bus 001 Device 004: ID 0d8c:0014 C-Media Electronics, Inc. Audio Adapter (Unitek Y-247A)
Bus 001 Device 005: ID 17a0:0120 Samson Technologies Corp. Meteorite condenser microphone

and if I dmesg | grep these I get

[    4.786076] usb 1-1.4: Manufacturer: C-Media Electronics Inc.
[    4.795578] input: C-Media Electronics Inc. USB Audio Device as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.3/0003:0D8C:0014.0001/input/input0
[    4.866949] hid-generic 0003:0D8C:0014.0001: input,hidraw0: USB HID v1.00 Device [C-Media Electronics Inc. USB Audio Device] on usb-3f980000.usb-1.4/input3

and

[    6.868042] usb 1-1.2: Product: Samson Meteorite Mic
[    6.868104] usb 1-1.2: Manufacturer: Samson Technologies
[    6.958346] input: Samson Technologies Samson Meteorite Mic as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.2/0003:17A0:0120.0002/input/input1
[    7.038685] hid-generic 0003:17A0:0120.0002: input,hidraw1: USB HID v1.00 Device [Samson Technologies Samson Meteorite Mic] on usb-3f980000.usb-1.2/input2

in alsa.conf I configured C-Media as default device.

if I do a

 speaker-test -c2

my speakers are running but I have no sound inside Rhasspy

arecord -l says

**** Liste der Hardware-Geräte (CAPTURE) ****
Karte 1: Device [USB Audio Device], Gerät 0: USB Audio [USB Audio]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 2: Mic [Samson Meteorite Mic], Gerät 0: USB Audio [USB Audio]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0

aplay -l says

**** Liste der Hardware-Geräte (PLAYBACK) ****
Karte 0: Headphones [bcm2835 Headphones], Gerät 0: bcm2835 Headphones [bcm2835 Headphones]
  Sub-Geräte: 8/8
  Sub-Gerät #0: subdevice #0
  Sub-Gerät #1: subdevice #1
  Sub-Gerät #2: subdevice #2
  Sub-Gerät #3: subdevice #3
  Sub-Gerät #4: subdevice #4
  Sub-Gerät #5: subdevice #5
  Sub-Gerät #6: subdevice #6
  Sub-Gerät #7: subdevice #7
Karte 1: Device [USB Audio Device], Gerät 0: USB Audio [USB Audio]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0

(sorry for the german output)

tried different ways to configure “Audio Recording” and “Audio Playing” sections.

in the Rhasspy lists of aplay and arecord my devices aren’t listed - so I had to trial and error it out, but with no success.

So maybe anyone from this community could point me to the right direction how I tell Rhasspy to use these devices…

thanks in advance

Dan

p.s. I will provide further information if needed :wink:

Edit: One last thought…

maybe it’s a problem with audio device routing from raspian to docker and I have to configure default audio inside docker?? I’ll have a research on that now :wink:

I checked this but docker is using the sound device from the host
because I linked while container creation e.g.

--device /dev/snd:/dev/snd \

so I think the goal is to find the right description syntax to use in Rhasspy…

tried something like

hw:CARD=Device,DEV=2

but this is not the right syntax for Rhasspy

cheers

Dan

What is not working for you? Mic? Output? Or both?
If neither is working consider mic and output as separate problems. One having 2 separate devices for input/output is not a general issue as my own setup shows.

On my 2 satellites I am even using different speakers while the mic is always a separate device.

Have you tried entering the device manually into the device field and saving?
Also I usually use arecord/aplay -L to determine device names (capital L) as its output format is what rhasspy is usually offering you.
Sometimes even this hadn’t worked for me, but manually editing the configuration file did.

I’d recommend you to narrow down the right device by recording something on the command line and playing it from there on your output device. (Hint: You’ll probably need to turn off the container because it has its fingers on the hardware).

Hi

thanks for replying… actually I ordered a respeaker4mic shield, and now both is working.
I thought I will test it later why the combination I tried before was not working…

Really don’t know what happened with my config

Yes I have entered several types of syntax but none where recognized
I already found that -L flag myself but didn’t helped me out :wink: thanks anyway
I’ll give it another try soon, I have a second Pi but have to order a new sdcard for it first…

as I wrote using ssh terminal soundtest was working - but you’re right - recording and playback should be tested… I’ve done so after posting here but even that worked well

But when using the Web-Interface I could have used any of the profiles or try to type my own syntax none of them worked - really mysterious behaving…

anyway thanx a lot and have a nice weekend :wink: