alphacep / vosk-asterisk

Speech Recognition in Asterisk with Vosk Server
GNU General Public License v2.0
101 stars 40 forks source link

SpeechBackground does not work #44

Open shep-k-a opened 6 months ago

shep-k-a commented 6 months ago

Hi I use Freepbx (Asterisk 18.20.2) At the SpeechBackground stage, it throws an error "exited non-zero". The call ends, the sound is not played. What could be the reason?

log

 Goto (stt,s,1)
    -- Executing [s@stt:1] Answer("PJSIP/1001-00000012", "") in new stack
    -- Executing [s@stt:2] Wait("PJSIP/1001-00000012", "1") in new stack
    -- Executing [s@stt:3] SpeechCreate("PJSIP/1001-00000012", "") in new stack
    -- Executing [s@stt:4] SpeechBackground("PJSIP/1001-00000012", "custom/present_1") in new stack
  == Spawn extension (stt, s, 4) exited non-zero on 'PJSIP/1001-00000012'

extension

[stt]
exten => s,1,Answer()
exten => s,n,Wait(1)
exten => s,n,SpeechCreate
exten => s,n,SpeechBackground(custom/present_1)
#exten => s,n,Verbose(0,Result as ${SPEECH_TEXT(0)})
exten => s,n,Hangup()

The sound is played quietly through the Playback. Server Vosk is up and running through python in a dialplan. Example exten => s,n,Set(RESULT=${SHELL(python3.6 /home/vosk-server/websocket/test_srt.py ..... image

nshmyrev commented 6 months ago

Please add more verbose logging, you should see extra information

shep-k-a commented 6 months ago

Пожалуйста, добавьте более подробное ведение журнала, вы должны увидеть дополнительную информацию

https://codeshare.io/nAnM6X

shep-k-a commented 6 months ago

Hi, isn't that enough?

nshmyrev commented 6 months ago

Try to change localhost in res_speech_vosk.conf to 127.0.0.1

shep-k-a commented 6 months ago

Unfortunately, it didn't help. Any other ideas?