Closed pilovis closed 10 years ago
Update to the latest version and get an API key from Google. Also make sure to read the README file and update your dialplan code accordingly. Details about the API changes here: https://github.com/zaf/asterisk-speech-recog/issues/9
I created the API key and added to speech-recorg.agi (latest version) but it does not work. After saying "Say something in English, when done press the pound key." the scripts immediately returns "null" value without waiting for any vocal input .
-- Executing [1235@from-internal:1] Answer("SIP/270-00000001", "") in new stack -- Executing [1235@from-internal:2] AGI("SIP/270-00000001", "googletts.agi,"Say something in English, when done press the pound key.",en") in new stack -- Launched AGI Script /var/lib/asterisk/agi-bin/googletts.agi -- Playing '/tmp/6be952445fa092f54aa606501ac6c1b9' (escape_digits=) (sample_offset 0) -- <SIP/270-00000001>AGI Script googletts.agi completed, returning 0 -- Executing [1235@from-internal:3] AGI("SIP/270-00000001", "speech-recog.agi,en-US") in new stack -- Launched AGI Script /var/lib/asterisk/agi-bin/speech-recog.agi -- <SIP/270-00000001>AGI Script speech-recog.agi completed, returning 0 -- Executing [1235@from-internal:4] Verbose("SIP/270-00000001", "1,Script returned: , ") in new stack Script returned: , -- Executing [1235@from-internal:5] GotoIf("SIP/270-00000001", "0?playback:retry") in new stack -- Goto (from-internal,1235,9) -- Executing [1235@from-internal:9] AGI("SIP/270-00000001", "googletts.agi,"Can you please repeat more clearly?",en") in new stack -- Launched AGI Script /var/lib/asterisk/agi-bin/googletts.agi
The link above contains detailed info about enabling debug on the AGI script and capturing it in asterisk console or log files. Follow them in order to debug the problems you have with your asterisk deployment. This is not a bug in the script.
I found the problem :)
missing libjson-perl
Info for Ubuntu 10.04 server:
sudo apt-get install libjson-perl sudo apt-get install libio-socket-ssl-perl sudo apt-get install libjson-xs-perl sudo apt-get install perl sudo apt-get install flac sudo apt-get install libwww-perl
Thanks a lot for your excellent job!
Before the script worked well, now every time I get "Error -1" I use Ubuntu server 10.04 and Asterisk 1.6.2.4. Could it depend on some Ubuntu update? No useful indication on full debug output from the asterisk console.
-- Executing [1235@from-internal:1] Answer("SIP/270-00000007", "") in new stack -- Executing [1235@from-internal:2] AGI("SIP/270-00000007", "googletts.agi,"Say something in English, when done press the pound key.",en") in new stack -- Launched AGI Script /var/lib/asterisk/agi-bin/googletts.agi -- Playing '/tmp/ggl_0mapTb' (escape_digits=) (sample_offset 0) -- <SIP/270-00000007>AGI Script googletts.agi completed, returning 0 -- Executing [1235@from-internal:3] AGI("SIP/270-00000007", "speech-recog.agi,en-US") in new stack -- Launched AGI Script /var/lib/asterisk/agi-bin/speech-recog.agi -- <SIP/270-00000007> Playing 'beep.alaw' -- <SIP/270-00000007>AGI Script speech-recog.agi completed, returning 0 -- Executing [1235@from-internal:4] Verbose("SIP/270-00000007", "1,Script returned: -1 , -1") in new stack Script returned: -1 , -1 -- Executing [1235@from-internal:5] GotoIf("SIP/270-00000007", "0?playback:retry") in new stack -- Goto (from-internal,1235,9) -- Executing [1235@from-internal:9] AGI("SIP/270-00000007", "googletts.agi,"Can you please repeat more clearly?",en") in new stack