TTS Engine Custom - Watson IBM TTS

Hello everyone,

I recently deployed the IBM TTS on FreePBX using the TTS module, but when I add a custom engine the /var/lib/asterisk/agi-bin/propolys-tts.agi file does not include the custom engine, would I have some way to include the Custom engine code without the FreePBX modifications overwriting the propolys-tts.agi file?

Code implemented:

case 'watson':
                        exec($enginebin." $engine-tts-$hash '$text' $hash");

Engine code:

curl -X POST -u username:password  \
--header "Content-Type: application/json"  \
--header "Accept: audio/wav"  \
--data "{\"text\":\"$2\"}"  \
--output "/var/lib/asterisk/sounds/tts/$3.wav" \
/usr/bin/sox /var/lib/asterisk/sounds/tts/$3.wav -r 8000 -c 1 -e signed-integer /var/lib/asterisk/sounds/tts/$1.wav -q

If you don’t get an answer on this, be sure to submit a ticket. This “sounds” like a really cool capability.


1 Like

I hope it’s accepted.

Accepted isn’t the problem - I hope it’s implemented. If you have code, it’s much easier to make happen than if you just drop the request in their laps and say “here, dance monkies!”

I inserted the /var/lib/asterisk/agi-bin/propolys-tts.agi file into the /var/www/html/admin/modules/tts/agi-bin/propolys-tts.agi file, now when modifying anything in the TTS module via GUI the changes are not yet written but the FreePBX GUI is alarming the modifications to the files as shown below:

Works fine now

I suggest you fill out a CLA here and submit your patch to us so we can include it in FreePBX


What @tonyclewis said. It doesn’t hurt much. I did it once. Feeling came back in my left hand in about a week.

1 Like

Code Submissions Agreement submitted!