Don't understand how to be heard by Rhasspy

noooooooooooooooooo… erem…

I reboot and retest, but same result

Try to sudo nano ~/.pulse/client.conf and change the autospawn parameter to no (and remove the ;) if the file exists.

doesn’t exist :s it’s really frustrating this pulseaudio…

Nothing with just nano ~/.pulse/client.conf (no sudo) either ?

same result…

Why don’t you remove it with:

sudo apt remove pulseaudio

But I don’t know whether this will remove other packages you need.

Even better (but I’m repeating myself here): just install a Lite version of Raspberry Pi OS, which will save you a lot of time with debugging these problems :wink:

I agree with what @koan said. Installing a Raspberry OS Lite with docker and running the docker run... command above should work directly…

pi@raspberrypi:~ $ ps aux | grep pulse
pi 1690 0.0 0.0 7364 544 pts/0 S+ 17:24 0:00 grep --color=auto pulse

I understand but I can’t… for now if I do that, I can’t access anymore to my domoticz and, as a disabled, I need a lot of these thing…

If you succeed to disable PulseAudio (event temporarily to test), the aplay and arecord command should work as expected and Rhasspy should be able to capture and playback correctly (don’t forget to select the correct PCMs in Rhasspy’s config).

with my previous post, it works? is there any pulsaudio?

Ah… missed it… So now no more PulseAudio… Do the command to record and play work now?

in or out?

On the host for starter then in the container…

just try in for now :

pi@raspberrypi:~ $ arecord -Dcapture -r 16000 -c 1 -f S16_LE -v test.wav
Capture WAVE ‘test.wav’ : Signed 16 bit Little Endian, Fréquence 16000 Hz, Mono
Plug PCM: Rate conversion PCM (48000, sformat=S16_LE)
Converter: libspeex (builtin)
Protocol version: 10002
Its setup is:
stream : CAPTURE
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 1
rate : 16000
exact rate : 16000 (16000/1)
msbits : 16
buffer_size : 8000
period_size : 2000
period_time : 125000
tstamp_mode : NONE
tstamp_type : MONOTONIC
period_step : 1
avail_min : 2000
period_event : 0
start_threshold : 1
stop_threshold : 8000
silence_threshold: 0
silence_size : 0
boundary : 524288000
Slave: Hardware PCM card 2 ‘USB PnP Audio Device’ device 0 subdevice 0
Its setup is:
stream : CAPTURE
access : MMAP_INTERLEAVED
format : S16_LE
subformat : STD
channels : 1
rate : 48000
exact rate : 48000 (48000/1)
msbits : 16
buffer_size : 24003
period_size : 6000
period_time : 125000
tstamp_mode : NONE
tstamp_type : MONOTONIC
period_step : 1
avail_min : 6000
period_event : 0
start_threshold : 3
stop_threshold : 24003
silence_threshold: 0
silence_size : 0
boundary : 1573060608
appl_ptr : 0
hw_ptr : 0
^CInterrompu par le signal Interrompre…
arecord: pcm_read:2145: erreur en lecture: Appel système interrompu
pi@raspberrypi:~ $ aplay -Dplayback -v test.wav
aplay: main:828: erreur à l’ouverture audio: Aucun fichier ou dossier de ce type

What about just aplay -v test.wav ?

I just eard something like a fart from the speaker…

pi@raspberrypi:~ $ arecord -Dcapture -r 16000 -c 1 -f S16_LE -v test.wav
Capture WAVE ‘test.wav’ : Signed 16 bit Little Endian, Fréquence 16000 Hz, Mono
Plug PCM: Rate conversion PCM (48000, sformat=S16_LE)
Converter: libspeex (builtin)
Protocol version: 10002
Its setup is:
stream : CAPTURE
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 1
rate : 16000
exact rate : 16000 (16000/1)
msbits : 16
buffer_size : 8000
period_size : 2000
period_time : 125000
tstamp_mode : NONE
tstamp_type : MONOTONIC
period_step : 1
avail_min : 2000
period_event : 0
start_threshold : 1
stop_threshold : 8000
silence_threshold: 0
silence_size : 0
boundary : 524288000
Slave: Hardware PCM card 2 ‘USB PnP Audio Device’ device 0 subdevice 0
Its setup is:
stream : CAPTURE
access : MMAP_INTERLEAVED
format : S16_LE
subformat : STD
channels : 1
rate : 48000
exact rate : 48000 (48000/1)
msbits : 16
buffer_size : 24003
period_size : 6000
period_time : 125000
tstamp_mode : NONE
tstamp_type : MONOTONIC
period_step : 1
avail_min : 6000
period_event : 0
start_threshold : 3
stop_threshold : 24003
silence_threshold: 0
silence_size : 0
boundary : 1573060608
appl_ptr : 0
hw_ptr : 0
^CInterrompu par le signal Interrompre…
arecord: pcm_read:2145: erreur en lecture: Appel système interrompu
pi@raspberrypi:~ $ aplay -v test.wav
Lecture WAVE ‘test.wav’ : Signed 16 bit Little Endian, Fréquence 16000 Hz, Mono
Plug PCM: Rate conversion PCM (48000, sformat=S16_LE)
Converter: libspeex (builtin)
Protocol version: 10002
Its setup is:
stream : PLAYBACK
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 1
rate : 16000
exact rate : 16000 (16000/1)
msbits : 16
buffer_size : 8000
period_size : 2000
period_time : 125000
tstamp_mode : NONE
tstamp_type : MONOTONIC
period_step : 1
avail_min : 2000
period_event : 0
start_threshold : 8000
stop_threshold : 8000
silence_threshold: 0
silence_size : 0
boundary : 524288000
Slave: Route conversion PCM (sformat=S16_LE)
Transformation table:
0 <- 0
1 <- 0
Its setup is:
stream : PLAYBACK
access : MMAP_INTERLEAVED
format : S16_LE
subformat : STD
channels : 1
rate : 48000
exact rate : 48000 (48000/1)
msbits : 16
buffer_size : 24003
period_size : 6000
period_time : 125000
tstamp_mode : NONE
tstamp_type : MONOTONIC
period_step : 1
avail_min : 6000
period_event : 0
start_threshold : 24000
stop_threshold : 24003
silence_threshold: 0
silence_size : 0
boundary : 1573060608
Slave: Hardware PCM card 3 ‘USB2.0 Device’ device 0 subdevice 0
Its setup is:
stream : PLAYBACK
access : MMAP_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 48000
exact rate : 48000 (48000/1)
msbits : 16
buffer_size : 24003
period_size : 6000
period_time : 125000
tstamp_mode : NONE
tstamp_type : MONOTONIC
period_step : 1
avail_min : 6000
period_event : 0
start_threshold : 24000
stop_threshold : 24003
silence_threshold: 0
silence_size : 0
boundary : 1573060608
appl_ptr : 0
hw_ptr : 0
aplay: pcm_write:2053: erreur en écriture: Erreur d’entrée/sortie

This looks good. You should be able to configure RHasspy to listen with arecord on the “capture” device and playback on the default device now…

Hi @GraphiPerso, I’m glad to see that you are now on the way to solving this. :smile:
@fastjack and @koan, many thanks for stepping in to help! I’ve leaned a lot from this thread myself.

arecord on capture but… no capture… on the previous log, there is a “writing error : error in/out” (don’t know if my translate is accurate…)

here is the log from web interface rhasspy :

[ERROR:2020-09-01 07:47:43,686] rhasspyserver_hermes:
Traceback (most recent call last):
File “/usr/lib/rhasspy/.venv/lib/python3.7/site-packages/quart/app.py”, line 1821, in full_dispatch_request
result = await self.dispatch_request(request_context)
File “/usr/lib/rhasspy/.venv/lib/python3.7/site-packages/quart/app.py”, line 1869, in dispatch_request
return await handler(**request_.view_args)
File “/usr/lib/rhasspy/rhasspy-server-hermes/rhasspyserver_hermes/main.py”, line 827, in api_listen_for_command
handle_captured(), messages, message_types
File “/usr/lib/rhasspy/rhasspy-server-hermes/rhasspyserver_hermes/init.py”, line 959, in publish_wait
result_awaitable, timeout=timeout_seconds
File “/usr/lib/python3.7/asyncio/tasks.py”, line 449, in wait_for
raise futures.TimeoutError()
concurrent.futures._base.TimeoutError
[DEBUG:2020-09-01 07:47:13,666] rhasspyserver_hermes: Publishing 180 bytes(s) to hermes/asr/startListening
[DEBUG:2020-09-01 07:47:13,666] rhasspyserver_hermes: -> AsrStartListening(site_id=‘default’, session_id=‘f9047008-105d-4577-b685-6f22b30b744c’, lang=None, stop_on_silence=True, send_audio_captured=True, wakeword_id=None, intent_filter=None)
[DEBUG:2020-09-01 07:47:13,664] rhasspyserver_hermes: Subscribed to hermes/error/asr
[DEBUG:2020-09-01 07:47:13,663] rhasspyserver_hermes: Waiting for transcription (session_id=f9047008-105d-4577-b685-6f22b30b744c)
[DEBUG:2020-09-01 07:47:12,327] rhasspyprofile.download: intent.system flair fsticuffs = False
[DEBUG:2020-09-01 07:47:12,326] rhasspyprofile.download: speech_to_text.kaldi.open_transcription True False = False
[DEBUG:2020-09-01 07:47:12,326] rhasspyprofile.download: speech_to_text.kaldi.mix_weight >0 0 = False
[DEBUG:2020-09-01 07:47:12,325] rhasspyprofile.download: speech_to_text.pocketsphinx.mix_weight >0 0 = False
[DEBUG:2020-09-01 07:47:12,325] rhasspyprofile.download: speech_to_text.pocketsphinx.open_transcription True False = False
[DEBUG:2020-09-01 07:47:12,324] rhasspyprofile.download: speech_to_text.system kaldi pocketsphinx = False
[DEBUG:2020-09-01 07:47:12,324] rhasspyprofile.download: Skipping acoustic_model/variances (/profiles/fr/acoustic_model/variances)
[DEBUG:2020-09-01 07:47:12,324] rhasspyprofile.download: Skipping acoustic_model/transition_matrices (/profiles/fr/acoustic_model/transition_matrices)
[DEBUG:2020-09-01 07:47:12,323] rhasspyprofile.download: Skipping acoustic_model/noisedict (/profiles/fr/acoustic_model/noisedict)
[DEBUG:2020-09-01 07:47:12,323] rhasspyprofile.download: Skipping acoustic_model/mixture_weights (/profiles/fr/acoustic_model/mixture_weights)
[DEBUG:2020-09-01 07:47:12,322] rhasspyprofile.download: Skipping acoustic_model/means (/profiles/fr/acoustic_model/means)
[DEBUG:2020-09-01 07:47:12,322] rhasspyprofile.download: Skipping acoustic_model/mdef (/profiles/fr/acoustic_model/mdef)
[DEBUG:2020-09-01 07:47:12,321] rhasspyprofile.download: Skipping acoustic_model/feature_transform (/profiles/fr/acoustic_model/feature_transform)
[DEBUG:2020-09-01 07:47:12,321] rhasspyprofile.download: Skipping acoustic_model/feat.params (/profiles/fr/acoustic_model/feat.params)
[DEBUG:2020-09-01 07:47:12,320] rhasspyprofile.download: Skipping g2p.fst (/profiles/fr/g2p.fst)
[DEBUG:2020-09-01 07:47:12,319] rhasspyprofile.download: Skipping base_dictionary.txt (/profiles/fr/base_dictionary.txt)
[DEBUG:2020-09-01 07:47:12,319] rhasspyprofile.download: speech_to_text.system pocketsphinx pocketsphinx = True

is there somebody? maybe I have kill everybody with my problem :stuck_out_tongue: