Google TTS No longer working

I’m just wondering if anyone else has noticed Google TTS has stopped working.

Has anyone found a way to get it working again, and or another free tts option that sounds better than filite?

There are recent updates to googletts to fix it.

I must be missing something… because I’ve done what they asked (i think) and it still doesn’t work.

Do you have any step by steps you used to install this update?

I’m using Freepbx distro.

I’m still fairly green with this stuff… sorry

Easy peasy. At the Linux CLI:

cd /var/lib/asterisk/agi-bin/
mv googletts.agi googletts.agi.backup
wget --no-check-certificate https://raw.githubusercontent.com/zaf/asterisk-googletts/master/googletts.agi
amportal chown

If using FreePBX 13 substitutue “fwconsole chown” for the last command.

sadly I’ve done this, but still does not work… With this said, when running amportal chown, i get this error… Not sure if it’s related.

chown: cannot access `/usr/com/prosody’: No such file or directory

Removing any dangling symlinks

I have freepbx distro
PBX Firmware: 6.12.65-29
PBX Service Pack: 1.0.0.0

Ignore the chown error notice.

Not sure what’s going on. Locate some lines in the /var/log/asterisk/full log where the TTS fails and post the sanitized output here, maybe there’s a clue there.

hi i had googletts working for two years.
my setup is freepbx version 12.0.76.1 with asterisk Ver. 11.16.0
now, even with the updated script it gives me errors.
this is the output if i use googletts.agi

[root@localhost agi-bin]# perl googletts.agi -o hello.wav -l it -t "Hello world"
Use of uninitialized value $AGI{“request”} in concatenation (.) or string at googletts.agi line 95, line 1.
– : Invalid language setting. Using default.
CHANNEL STATUS
– : Unexpected result:
GET FULL VARIABLE ${CHANNEL(audionativeformat)}
– : Unexpected result:
– : Failed to fetch file.
this one is the one using the googletts-cli.pl which is the file i used before

[root@localhost agi-bin]# ./googletts-cli.pl -o hello.wav -l en -t "Hello world"
Failed to fetch speech data. at ./googletts-cli.pl line 126.
i can manually download the tts file with this command
wget -q -U Mozilla -O output.mp3 “http://translate.google.com/translate_tts?ie=UTF-8&client=t&tl=it&q= hello world”

Doing some work on this today, and was reminded that googletts requires a dependency that does not get installed on the Distro by default. The following steps should get you up and running using the FreePBX Distro:

  1. Install " perl-Crypt-SSLeay". At the CLI:
    yum install perl-Crypt-SSLeay.x86_64

  2. Install/update googletts:
    cd /var/lib/asterisk/agi-bin/ mv googletts.agi googletts.agi.backup wget --no-check-certificate https://raw.githubusercontent.com/zaf/asterisk-googletts/master/googletts.agi amportal chown

  3. Add test dialplan to /etc/asterisk/extensions_custom.conf:
    [from-internal-custom] exten => *1234,1,Answer() exten => *1234,n,agi(googletts.agi,"This is a simple google text to speech test in english.",en) exten => *1234,n,agi(googletts.agi,"Esta es una simple prueba en español.",es)

  4. reload the dialplan:
    asterisk -rx "dialplan reload"

  5. Dial *1234

Tested and working on FreePBX 12 and 13, Asterisk 11 and 13, Distro versions 6.12.65-31 and 10.13.66-6

Hi Lome Gaetz,

I tried the above steps carefully and unfortunately Google TTS did not work.

I have freepbx distro 13 x64

Any insight for this issue?

Not without information. You can post the Asterisk console output during a failed attempt, there may be a clue there.

here is the console output during the agi call:

[2015-12-17 17:01:11] VERBOSE[6062][C-00000126] pbx.c: Executing [*1234@from-internal:4] AGI(“SIP/2-00000181”, “googletts.agi,“This is a simple google text to speech test in english.”,en”) in new stack
[2015-12-17 17:01:11] VERBOSE[6062][C-00000126] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/googletts.agi
[2015-12-17 17:01:12] VERBOSE[6062][C-00000126] res_agi.c: <SIP/2-00000181>AGI Script googletts.agi completed, returning 0
[2015-12-17 17:01:12] VERBOSE[6062][C-00000126] pbx.c: Executing [*1234@from-internal:5] Hangup(“SIP/2-00000181”, “”) in new stack

appreciate your help

I’ve tried installing the perl-Crypt-SSLeay.x86_64 package, but it says the package isn’t available. This is a Freepbx Distro install. Should I add a Repo to yum?

Maybe it is too late, anyway maybe can help someone:

try: yum install perl perl-LWP-Protocol-https perl-Crypt-SSLeay perl-libwww-perl perl-Crypt-SSLeay perl-IO-Socket-SSL sox mpg123

It might be perl-LWP-Protocol-https that is missing.

Also it is a good idea on asterisk CLI: agi set debug on.
You will see what is the error. :slight_smile:

1 Like

This solution still fixed my problem on freePBX14 2018 :smiley:

Hi all… I have noticed Google TTS has just stopped working again… Has anyone else found this with their systems?

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.