› VitalPBX Community Support › General Discussion › Google TTS Tutorial
- This topic has 8 replies, 2 voices, and was last updated 1 year, 7 months ago by
Antonio.
- Post
-
- June 14, 2019 at 5:14 pm
Hi,
I followed the tutorial about Google TTS API integration, but the test dial code isn´t working. After I dial , the call isn´t being connected, and I receive see the following error in the console:
ERROR[24560][C-000007b0]: app_stack.c:592 gosub_exec: Attempt to reach a non-existent destination for Gosub: (Context:T10_cos-all-post, Extension:*277, Priority:1)
Do the feature code works for all tenants ?
0
- Replies
-
- June 14, 2019 at 5:19 pm
This code just work for main Tenant.
If you want to use in the tenant 10, you need to modify the file
extensions__60-google_tts.conf
and in the beginning add T10_
[cos-all](+) –> [T10_cos-all](+)
After you need to reload the dial plan
asterisk -rx“dialplan reload“
0- June 14, 2019 at 6:03 pm
Hi,
Now it´s connecting, but still isn´t working. I see the following message in the console:
WARNING[5155][C-00000813]: res_agi.c:2217 launch_script: Failed to execute ‘/var/lib/asterisk/agi-bin/googletts.agi’: File does not exist.
I installed the Google using the script into tutorial.
Checking the extensions__60-google_tts.conf, I found some reference to googletts.agi. I changed to googleasr.agi
Now the calls is being connected, when dial *277, but play a beep three times and hangup. Below the message in the console:
— Executing [*277@T10_cos-all:1] Answer(“SIP/T10_1211-00000fcf”, “”) in new stack
> 0x7efd0074f4f0 — Strict RTP qualifying stream type: audio
> 0x7efd0074f4f0 — Strict RTP switching source address to X.X.X.X:43728
— Executing [*277@T10_cos-all:2] AGI(“SIP/T10_1211-00000fcf”, “googleasr.agi,”After de beep say something in English, when done press the pound key.”,en”) in new stack
— Launched AGI Script /var/lib/asterisk/agi-bin/googleasr.agi
— <SIP/T10_1211-00000fcf> Playing ‘beep.ulaw’ (language ‘pt_BR’)
— googleasr.agi,”After de beep say something in English, when done press the pound key.”,en: Unable to get recognition data.
— <SIP/T10_1211-00000fcf>AGI Script googleasr.agi completed, returning 0
— Executing [*277@T10_cos-all:3] AGI(“SIP/T10_1211-00000fcf”, “googleasr.agi,en-US”) in new stack
— Launched AGI Script /var/lib/asterisk/agi-bin/googleasr.agi
— <SIP/T10_1211-00000fcf> Playing ‘beep.ulaw’ (language ‘pt_BR’)
> 0x7efd0074f4f0 — Strict RTP learning complete – Locking on source address X.X.X.X:43728
— googleasr.agi,en-US: Unable to get recognition data.
— <SIP/T10_1211-00000fcf>AGI Script googleasr.agi completed, returning 0
— Executing [*277@T10_cos-all:4] Verbose(“SIP/T10_1211-00000fcf”, “1,The text you just said is: -1”) in new stack
The text you just said is: -1
— Executing [*277@T10_cos-all:5] Verbose(“SIP/T10_1211-00000fcf”, “1,The probability to be right is: -1”) in new stack
The probability to be right is: -1
— Executing [*277@T10_cos-all:6] AGI(“SIP/T10_1211-00000fcf”, “googleasr.agi,”You said… ” -1,en”) in new stack
— Launched AGI Script /var/lib/asterisk/agi-bin/googleasr.agi
— <SIP/T10_1211-00000fcf> Playing ‘beep.ulaw’ (language ‘pt_BR’)
— <SIP/T10_1211-00000fcf>AGI Script googleasr.agi completed, returning 4
== Spawn extension (T10_cos-all, *277, 6) exited non-zero on ‘SIP/T10_1211-00000fcf’0- June 14, 2019 at 6:06 pm
- June 14, 2019 at 6:49 pm
Hi
Now it´s clear that is two different applications, the TTS and ASR. I’ve installed the TTS, after it I installed ASR (both by script), and now it´s working the *277 test. But the *2770 isn´t working. Stay asking to repeat the number, I said different numbers and the system isn´t recognizing. See below the log:
— Executing [*2770@T10_cos-all:1] Answer(“SIP/T10_1211-000010e5”, “”) in new stack
> 0x7efd008bea10 — Strict RTP qualifying stream type: audio
> 0x7efd008bea10 — Strict RTP switching source address to X.X.X.X:13200
— Executing [*2770@T10_cos-all:2] AGI(“SIP/T10_1211-000010e5”, “googletts.agi,”PLease say the number you want to dial.”,en”) in new stack
— Launched AGI Script /var/lib/asterisk/agi-bin/googletts.agi
— <SIP/T10_1211-000010e5> Playing ‘/tmp/6ec1e92493ec4fcce8e67e3f293b125b.slin’ (escape_digits=) (sample_offset 0) (language ‘en’)
— <SIP/T10_1211-000010e5>AGI Script googletts.agi completed, returning 0
— Executing [*2770@T10_cos-all:3] AGI(“SIP/T10_1211-000010e5”, “googleasr.agi,en-US”) in new stack
— Launched AGI Script /var/lib/asterisk/agi-bin/googleasr.agi
— <SIP/T10_1211-000010e5> Playing ‘beep.ulaw’ (language ‘en’)
> 0x7efd008bea10 — Strict RTP learning complete – Locking on source address X.X.X.X:13200
— <SIP/T10_1211-000010e5>AGI Script googleasr.agi completed, returning 0
— Executing [*2770@T10_cos-all:4] GotoIf(“SIP/T10_1211-000010e5”, “0?success:retry”) in new stack
— Goto (T10_cos-all,*2770,6)
— Executing [*2770@T10_cos-all:6] AGI(“SIP/T10_1211-000010e5”, “googletts.agi,”Can you please repeat?”,en”) in new stack
— Launched AGI Script /var/lib/asterisk/agi-bin/googletts.agi
— <SIP/T10_1211-000010e5> Playing ‘/tmp/b70a2b4f0891b80fb0211747e1f0fc78.slin’ (escape_digits=) (sample_offset 0) (language ‘en’)
— <SIP/T10_1211-000010e5>AGI Script googletts.agi completed, returning 0
— Executing [*2770@T10_cos-all:7] Goto(“SIP/T10_1211-000010e5”, “record”) in new stack
— Goto (T10_cos-all,*2770,3)
— Executing [*2770@T10_cos-all:3] AGI(“SIP/T10_1211-000010e5”, “googleasr.agi,en-US”) in new stack
— Launched AGI Script /var/lib/asterisk/agi-bin/googleasr.agi
— <SIP/T10_1211-000010e5> Playing ‘beep.ulaw’ (language ‘en’)I saved my Google API key in the googleasr.agi file.
0- June 14, 2019 at 7:47 pm
- June 14, 2019 at 7:48 pm
- June 14, 2019 at 7:57 pm
Tagged: TTS Google API Text-to-sp
- You must be logged in to reply to this topic.