Speech Synthesis

Speech Synthesis with Google API

  • Google TTS API is definitely better than Festival/ text2wave.
  • I’m not sure if there’s a usage limit.  In fact the API is actually undocumented.
  • Maybe not best for production-level use.
  • Find full instructions here.  http://zaf.github.com/asterisk-googletts/
  • I’m adding my notes below which are shorthand for the instructions from the original site.
apt-get -y install libwww-perl
wget http://github.com/zaf/asterisk-googletts/tarball/master
tar xzf master
cd zaf-asterisk-googletts-18d82a9/
cp googletts.agi /var/lib/asterisk/agi-bin/googletts.agi
[googletts]
exten => s,1,AGI(googletts.agi,"This is a simple google text to speech test in english.",en)
exten => s,n,AGI(googletts.agi,"hello\, I am a talking computer",en)
exten => s,n,wait(1)
exten => s,n,Hangup()

Speech Synthesis with Microsoft API

wget http://github.com/zaf/asterisk-mstts/tarball/master
tar xzf master
cd zaf-asterisk-mstts-eb7930d/
mkdir /tmp/mstts
cp mstts.agi /var/lib/asterisk/agi-bin/
nano /var/lib/asterisk/agi-bin/mstts.agi

You’ll need to edit the agi file and add your microsoft AppKey.

# Your Azure Marketplace credentials. #
my $clientid = "Some_Name_I_Gave_My_App";
my $clientsecret = "SOMEMICROSOFTSECRETKEYBLAH=";

Here’s a simple context for extensions.conf

[mstts]
exten => s,1,AGI(mstts.agi,"This is a simple microsoft text to speech test in english.",en)
exten => s,n,AGI(mstts.agi,"hello\, I am a talking computer",en)
exten => s,n,wait(1)
exten => s,n,Hangup();