wardmundy
Nerd Uno
- Joined
- Oct 12, 2007
- Messages
- 19,206
- Reaction score
- 5,228
Playing with Amazon Polly TTS service today. In a word, UNBELIEVABLE! Yep, it's that good. First year is free for 5 million characters a month. After that, it's $4 for a million characters of text-to-speech. Dirt cheap!
If you'd like to try it out, call 1-843-606-0199. The IVR introduction uses Amazon Polly MP3 file converted to GSM for Asterisk. For comparison, choose option 1 in the IVR for today's news headlines which uses Google's best TTS voice. I think you'll agree that it's apples and oranges (and pretty lousy oranges at that). This is running on a Raspberry Pi 3, by the way.
There's a good tutorial on PHP implementation here. In the same install directory, you also have to install Amazon's AWS SDK using Composer:
Next, edit speak_text.php and add the following lines to the end of the file to convert the generated MP3 to something that can be used with Asterisk:
The generated text.gsm file is copied into the Asterisk sounds directory, /var/lib/asterisk/sounds/custom.
If you'd like to try it out, call 1-843-606-0199. The IVR introduction uses Amazon Polly MP3 file converted to GSM for Asterisk. For comparison, choose option 1 in the IVR for today's news headlines which uses Google's best TTS voice. I think you'll agree that it's apples and oranges (and pretty lousy oranges at that). This is running on a Raspberry Pi 3, by the way.
There's a good tutorial on PHP implementation here. In the same install directory, you also have to install Amazon's AWS SDK using Composer:
Code:
curl -sS https://getcomposer.org/installer | php
php composer.phar require aws/aws-sdk-php
Next, edit speak_text.php and add the following lines to the end of the file to convert the generated MP3 to something that can be used with Asterisk:
Code:
// convert MP3 to GSM for Asterisk
system('sox text.mp3 -r 8000 -c 1 /var/lib/asterisk/sounds/custom/text.gsm');
The generated text.gsm file is copied into the Asterisk sounds directory, /var/lib/asterisk/sounds/custom.
Last edited: