zaf / asterisk-googletts

Asterisk AGI script that uses Google's translate text to speech service.
GNU General Public License v2.0
214 stars 125 forks source link

Googletts returning -1 #42

Closed TheDoudou closed 5 years ago

TheDoudou commented 6 years ago

Hi, i have asterisk 13.20.0

With the last googletts.so, can't play file (and no format find).

I try with Zoiper (iOS app) and cisco 7965g.

  == Using SIP RTP CoS mark 5
       > 0x746111b8 -- Strict RTP learning after remote address set to: 192.168.0.108:59128
    -- Executing [101@pbx_config:1] Answer("SIP/004-00000000", "") in new stack
       > 0x746111b8 -- Strict RTP switching to RTP target address 192.168.0.108:59128 as source
    -- Executing [101@pbx_config:2] AGI("SIP/004-00000000", "googletts.agi,"Par Toutatix je parle !",fr") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/googletts.agi
 -- googletts.agi: Text passed for synthesis: Par Toutatix je parle !
 -- googletts.agi: Language: fr, Interrupt keys: , Sample rate: 8000
 -- googletts.agi: Speed: 1, Caching: 1, Cache dir: /tmp
 -- googletts.agi: URL passed: https://translate.google.com/translate_tts?ie=UTF-8&q=Par%20Toutatix%20je%20parle%20%21&tl=fr&total=1&idx=0&textlen=23&client=tw-ob&tk=172685.318347&prev=input
   -- googletts.agi: Found sox version 14 in: /usr/bin/sox, mpg123 in: /usr/bin/mpg123
[May 23 22:54:39] WARNING[25724][C-00000000]: file.c:774 ast_openstream_full: File /tmp/ggl_NUdlQJqD does not exist in any format
 -- googletts.agi: Failed to play /tmp/ggl_NUdlQJqD.
Died at /var/lib/asterisk/agi-bin/googletts.agi line 232, <STDIN> line 32.
 -- googletts.agi: Cleaning temp files.
    -- <SIP/004-00000000>AGI Script googletts.agi completed, returning -1
    -- Executing [101@pbx_config:3] Hangup("SIP/004-00000000", "") in new stack
  == Spawn extension (pbx_config, 101, 3) exited non-zero on 'SIP/004-00000000'
romain-neil commented 1 year ago

hello, same issue on asterisk 20 lts fresh install ... :(

The script is unable to fin the temp file, and enabling verbose in the script does not seems to work (as there is no more verboses messages):

Connected to Asterisk 20.0.0 currently running on voip (pid = 42561) -- Executing [s@default-ivr:1] Answer("PJSIP/ovh-endpoint-00000000", "") in new stack 0x7f0d24037510 -- Strict RTP learning after remote address set to: 91.121.129.168:35442 -- Executing [s@default-ivr:2] Verbose("PJSIP/ovh-endpoint-00000000", "2,Incoming call from "+33XXXXXXXXXX" ") in new stack == Incoming call from "+33XXXXXXXXX" -- Executing [s@default-ivr:3] NoOp("PJSIP/ovh-endpoint-00000000", "") in new stack -- Executing [s@default-ivr:4] AGI("PJSIP/ovh-endpoint-00000000", "googletts.agi,"Ceci est un message test.",fr") in new stack -- Launched AGI Script /var/lib/asterisk/agi-bin/googletts.agi [Oct 27 20:16:49] WARNING[42609][C-00000001]: file.c:824 ast_openstream_full: File /tmp/ggl_3aE_ix16 does not exist in any format -- <PJSIP/ovh-endpoint-00000000>AGI Script googletts.agi completed, returning -1 -- Executing [s@default-ivr:5] Hangup("PJSIP/ovh-endpoint-00000000", "") in new stack == Spawn extension (default-ivr, s, 5) exited non-zero on 'PJSIP/ovh-endpoint-00000000'

Thanks for any reply !