synesthesiam / rhasspy

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

send intent delay #222

Closed sffranke closed 4 years ago

sffranke commented 4 years ago

Hello, when I hit the button "Get intend" to send the text as if it were spoken Node-Red gets the intent immediately. Speaking the same command takes up to 15 seconds until Node-Red processes the data. I have no idea how to solve that. Anybody ha a hint?

{ "speech_to_text": { "system": "kaldi" }, "text_to_speech": { "system": "picotts" }, "wake": { "snowboy": { "apply_frontend": true, "model": "snowboy/computer.umdl", "sensitivity": "0.6" }, "system": "snowboy" } }

TIA Steffen

patrickjane commented 4 years ago

I am also observing a delay of about 8-10 seconds, however I am using pocketsphinx and not kaldi. Also, I have disabled the wake-word for testing, and instead press the "wake" button in the GUI, to make sure its not caused by the wake word.

The load on my server (rp3) is at 0, so its totally idle (no other stuff than rhasspy runs on it anyway).

Heres my log:

May  7 16:57:07 calypso systemd[1]: session-c14.scope: Succeeded.
May  7 16:57:33 calypso rhasspy[14553]: DEBUG:DialogueManager:asleep -> awake
May  7 16:57:33 calypso rhasspy[14553]: DEBUG:APlayAudioPlayer:['aplay', '-q', '/home/pi/rhasspy/etc/wav/beep_hi.wav']
May  7 16:57:33 calypso rhasspy[14553]: DEBUG:WebrtcvadCommandListener:Will timeout in 30 second(s)
May  7 16:57:33 calypso rhasspy[14553]: DEBUG:WebrtcvadCommandListener:loaded -> listening
May  7 16:57:34 calypso rhasspy[14553]: DEBUG:WebrtcvadCommandListener:Voice command started
May  7 16:57:38 calypso rhasspy[14553]: DEBUG:WebrtcvadCommandListener:Voice command finished
May  7 16:57:38 calypso rhasspy[14553]: DEBUG:WebrtcvadCommandListener:listening -> loaded
May  7 16:57:38 calypso rhasspy[14553]: DEBUG:DialogueManager:awake -> decoding
May  7 16:57:38 calypso rhasspy[14553]: DEBUG:APlayAudioPlayer:['aplay', '-q', '/home/pi/rhasspy/etc/wav/beep_lo.wav']
May  7 16:57:38 calypso rhasspy[14553]: DEBUG:PocketsphinxDecoder:rate=16000, width=2, channels=1.

May  7 16:57:46 calypso rhasspy[14553]: DEBUG:PocketsphinxDecoder:Decoded WAV in 8.208680629730225 second(s)
May  7 16:57:46 calypso rhasspy[14553]: DEBUG:PocketsphinxDecoder:Transcription confidence: 0.46678415991921607
May  7 16:57:46 calypso rhasspy[14553]: DEBUG:PocketsphinxDecoder:wie warm wird es heute abend
May  7 16:57:46 calypso rhasspy[14553]: DEBUG:DialogueManager:wie warm wird es heute abend (confidence=0.46678415991921607)
sffranke commented 4 years ago

Made a fresh install, but was not able to use Kaldi speech recognition (get the error "not enough values to unpack (expected 2, got 1)" ) and i use pocketsphinx now. There I observe no significant delay even in normal use with wakeword "snowboy".

sffranke commented 4 years ago

Re-Download Profile fixed the error "not enough values to unpack (expected 2, got 1)" Works fine now!

patrickjane commented 4 years ago

FYI: also did a clean new install, and first the delay was smaller, however I also did not enable all sentences/slots. Now with all sentences and slots (I have a slotlist which contains 7000 train station names) I have the same delay, using pocketsphinx.

May 14 12:09:31 calypso rhasspy[11922]: DEBUG:DialogueManager:awake -> decoding
May 14 12:09:31 calypso rhasspy[11922]: DEBUG:PocketsphinxDecoder:rate=16000, width=2, channels=1.
May 14 12:09:31 calypso rhasspy[11922]: DEBUG:APlayAudioPlayer:['aplay', '-q', '/home/pi/rhasspy/etc/wav/beep_lo.wav']
May 14 12:09:41 calypso rhasspy[11922]: DEBUG:PocketsphinxDecoder:Decoded WAV in 10.361741065979004 second(s)
May 14 12:09:41 calypso rhasspy[11922]: DEBUG:PocketsphinxDecoder:Transcription confidence: 0.013777800376687969
May 14 12:09:41 calypso rhasspy[11922]: DEBUG:PocketsphinxDecoder:wann fährt die nächste bahn nach roter hang

FYI2: Those are the same sentences / slots I was using with snips, but snips did not have this large delay. I am going to try kaldi now.