synesthesiam / rhasspy

Rhasspy voice assistant for offline home automation
https://rhasspy.readthedocs.io
MIT License
941 stars 101 forks source link

Don't hear any sound despite no error given #220

Closed RidaAyed closed 4 years ago

RidaAyed commented 4 years ago

In rhasspy web-ui I enter one two three, click Play and expect to hear the text to be spoken. Don't hear anyting.

[INFO:975615] quart.serving: 192.168.178.22:54830 POST /api/text-to-speech 1.1 200 13 1470008
[DEBUG:975598] InboxActor:  -> stopped
[DEBUG:975593] EspeakSentenceSpeaker: speaking -> ready
[DEBUG:974262] APlayAudioPlayer: ['aplay', '-q']
[DEBUG:974260] EspeakSentenceSpeaker: ready -> speaking
[DEBUG:974152] EspeakSentenceSpeaker: ['espeak', '-v', 'en', '--stdout', 'one two three']

I've tried changing the device to pulse without any effect. Don't know if that matters, though profile.json remains unchanged upon that change.

I can assert proper recording and playing via terminal: arecord -D 'default' test.wav --duration 5 && aplay test.wav

RidaAyed commented 4 years ago

No rhasspy issue. Apparently my raspi/hdmi/soundsystem cuts off the first two seconds from any sound played. Found the cause by testing with these lines

# Get rhasspyContainerID
docker ps
# Enter rhasspy container
docker exec -it <rhasspyContainerID> /bin/bash
# Backup native beep wave
cp /usr/share/rhasspy/etc/wav/beep_hi.wav /usr/share/rhasspy/etc/wav/beep_hi.bak
# Exit rhasspy container
exit
# Overwrite native beep wave with longer wave file 
sudo docker cp <longerSound>.wav  <rhasspyContainerID>:/usr/share/rhasspy/etc/wav/beep_hi.wav