Quantcast
Channel: FreePBX Community Forums - Latest posts
Viewing all articles
Browse latest Browse all 227919

Google TTS not generating wav files

$
0
0

You might want to check your propoly-tts.agi files, there's two.

/var/lib/asterisk/agi-bin/propolys-tts.agi
/var/www/html/admin/modules/tts/agi/propolys-tts.agi

You should be able to edit the second one listed then disable and re-enable the tts module.

File: /var/www/html/admin/modules/tts/agi/propolys-tts.agi

 58         case 'swift':
 59                 exec($enginebin." -p audio/channels=1,audio/sampling-rate=8000 -o $wavefile -f $textfile");
 60                 break;
 61         case 'googleTTS':
 62                 exec($enginebin." -f $textfile -l en -r 8000 -o $wavefile");
 63                 break;

Also, for debugging you can run googletts-cli.pl though the command line.

/file/path/googletts-cli.pl -t 'Hello World' -l en -r 8000 -o /var/www/html/hello_world.wav
The file should then be available at http://[pbx_server]/hello_world.wav

Another thing that I did while debugging was add a debug line before executing the exec function. This will show up in your asterisk/full log file

debug("Command: ".$enginebin." -f $textfile -l en -r 8000 -o $wavefile",1);

tts sound files are saved in: /var/lib/asterisk/sounds/tts by default so i kept deleting the files in that folder each time I ran a test.

Another thing is to make sure tts engines is installed from the commercial modules. you have to add the engine name googleTTS with the absolute path and filename of the googletts-cli-pl file.

Since figuring out how to get this working I've since developed another script for an engine that I can use instead of googleTTS. I modified the googleTTS but it's not ready yet though.


Viewing all articles
Browse latest Browse all 227919

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>