Don't understand how to be heard by Rhasspy

Which of the various methods are you using, for example Docker, venv, etc? And is yours a single instance of Rhasspy, or a master-satellite setup?
Which version of Rhasspy are you using?
You need to tell the community much more about your situation so that people are able to help.

everything is on the first post. i also publish the log. i said that i use it on docker, the last version

OK, I see that now. Sorry, I hadn’t read right back to the beginning of the thread.
It looks to me, as a novice myself with Rhasspy, as though there is a problem with your sound system setup. Sorry, I’m out of my depth at this point, but hopefully someone will be able to step in.

1 Like

I hope because it’s really frustrating…

ten days and nobody can help me to use Rhasspy? is it work for somebody?

Hey there! It is not that easy to help you as there is so many layers in your setup (OS, docker, Rhasspy, PyAudio, etc).

Sound management on Linux is quite complex (ALSA, Jack, PulseAudio) and its abstraction in a docker container adds another level of complexity to the mix.

I’d start by opening a bash CLI session inside the running Rhasspy container using docker exec -it rhasspy bash and look directly inside the running container.

Look for ALSA sound cards with aplay -l and arecord -l (maybe post the result here so we can see what your container has).

Try to record from the appropriate sound card using arecord -D<cardname> -r 16000 -c 1 -f S16_LE test.wav (again post the result if not working).

If all of these work then Rhasspy should work too. Maybe try to use arecord instead of PyAudio.

Hope this helps.

I don’t remember exactly what I do, but I followed a tutorial to test sound on debian. At first nothing worked… finally I use something like you said and I succeed to record and playback the sound! but on rhasspy nothing change :s is it possible that it’s a permission problem?

Did you have a better idea to install all that? I just follow the tutorial and it said that docker on raspi was the easiest solution :stuck_out_tongue:

Did you manage to record and playback from INSIDE Rhasspy’s running docker container?

yes i tried with the tutorial i mentionned at first post. to test Rhasspy… i clic on wake up but nothing was recorded… i also publish the log

I think you are not reading what I’ve written correctly. You need to get INSIDE Rhasspy docker container not in your debian host.

Execute docker exec -it rhasspy bash to start a bash session INSIDE the container then post the result of these commands:

  • uname -a
  • aplay -l
  • arecord -l
  • arecord -r 16000 -c 1 -f S16_LE test.wav

Without these info we won’t be able to help your further…

Sorry I didn’t understand !

That’s what I’ve done :

docker exec -it rhasspy bash
root@8bef09cca542:/# uname -a
Linux 8bef09cca542 5.4.51-v7l+ #1333 SMP Mon Aug 10 16:51:40 BST 2020 armv7l armv7l armv7l GNU/Linux
root@8bef09cca542:/# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: b1 [bcm2835 HDMI 1], device 0: bcm2835 HDMI 1 [bcm2835 HDMI 1]
Subdevices: 4/4
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
card 1: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
Subdevices: 4/4
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
card 3: Device_1 [USB2.0 Device], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
root@8bef09cca542:/# arecord -l
**** List of CAPTURE Hardware Devices ****
card 2: Device [USB PnP Audio Device], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
root@8bef09cca542:/# arecord -r 16000 -c 1 -f S16_LE test.wav
arecord: main:828: audio open error: No such file or directory

Your USB sound card is correctly available inside the container.

This might indicate that you are missing the /etc/asound.conf file inside the container.

If you have such a file on your Debian host, try to mount it in your Rhasspy container (stop the container, rm the container, start a new container) with the -v /etc/asound.conf:/etc/asound.conf additional parameter.

If you do not have this file on your host, check this topic first:
https://www.raspberrypi.org/forums/viewtopic.php?t=206692

Hope this helps.

Sorry but could you just be more precise? I’m not very confident with debian environement and all command line stuff…

What’s the exact command I must enter please?

I try to do :

docker stop rhasspy
docker rm rhasspy
docker run -d -p 12101:12101
–name rhasspy
–restart unless-stopped
-v “$HOME/.config/rhasspy/profiles:/profiles”
-v “/etc/localtime:/etc/localtime:ro”
-v “/etc/asound.conf:/etc/asound.conf”
–device /dev/snd:/dev/snd
rhasspy/rhasspy
–user-profiles /profiles
–profile fr

it answer a lot of numbers…

I try to clic on wake up and say something… but nothing :frowning:
I also check if parameters was the same and they didn’t change… weird…
I clic on “test” for the mic, but nothing change, no entry was with “working” on it…

Can you do this and post the result?

pi@raspberrypi:~ $ docker exec -it rhasspy bash
root@b09b5b583539:/# arecord -L
null
Discard all samples (playback) or generate zero samples (capture)
jack
JACK Audio Connection Kit
pulse
PulseAudio Sound Server
default
Default Audio Device
usbstream:CARD=b1
bcm2835 HDMI 1
USB Stream Output
usbstream:CARD=Headphones
bcm2835 Headphones
USB Stream Output
sysdefault:CARD=Device
USB PnP Audio Device, USB Audio
Default Audio Device
front:CARD=Device,DEV=0
USB PnP Audio Device, USB Audio
Front speakers
surround21:CARD=Device,DEV=0
USB PnP Audio Device, USB Audio
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Device,DEV=0
USB PnP Audio Device, USB Audio
4.0 Surround output to Front and Rear speakers
surround41:CARD=Device,DEV=0
USB PnP Audio Device, USB Audio
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Device,DEV=0
USB PnP Audio Device, USB Audio
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Device,DEV=0
USB PnP Audio Device, USB Audio
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Device,DEV=0
USB PnP Audio Device, USB Audio
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Device,DEV=0
USB PnP Audio Device, USB Audio
IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=Device,DEV=0
USB PnP Audio Device, USB Audio
Direct sample mixing device
dsnoop:CARD=Device,DEV=0
USB PnP Audio Device, USB Audio
Direct sample snooping device
hw:CARD=Device,DEV=0
USB PnP Audio Device, USB Audio
Direct hardware device without any conversions
plughw:CARD=Device,DEV=0
USB PnP Audio Device, USB Audio
Hardware device with all software conversions
usbstream:CARD=Device
USB PnP Audio Device
USB Stream Output
usbstream:CARD=Device_1
USB2.0 Device
USB Stream Output
root@b09b5b583539:/# arecord -r 16000 -c 1 -f S16_LE test.wav
ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused

arecord: main:828: audio open error: Connection refused

Looks like you are using PulseAudio on your Debian host… and also Jack (why?)…

I don’t know enough about those two to help you further… I’m not sure it will be easy/trivial without deep knowledge of Linux/PulseAudio though… maybe someone else can take it from here…

is there a reason why you use the pulse audio sound server? Like for some other project your using? Maybe remove this part if not used… https://www.linuxquestions.org/questions/linux-hardware-18/remove-pulse-device-from-alsa-4175419061/

@fastjack @No_one

crearly… I just follow a lot of advices :stuck_out_tongue: I don’t know what’s pulseaudio and if it’s necessary for something lol What can I do?

Is this a system that you need for other services than Rhasspy? Otherwise, I would recommend a clean Raspberry Pi OS (32-bit) Lite reinstall and try the tutorial again, and like @Andrew49 said immediately come back here for help with the exact error message you get so we can try to figure out what’s going on.