Google text to speech for asterisk: Difference between revisions

From KlavoWiki
Jump to navigationJump to search
 
(16 intermediate revisions by the same user not shown)
Line 3: Line 3:
== Dependencies ==
== Dependencies ==


=== mpg123 ===
=== CentOS ===
<pre>
<pre>
wget http://waix.dl.sourceforge.net/project/mpg123/mpg123/1.13.4/mpg123-1.13.4.tar.bz2
yum -y install perl perl-libwww-perl sox cpan bzip2
tar jxf mpg123-1.13.4.tar.bz2
</pre>
cd mpg123-1.13.4
 
==== mpg123 ====
<pre>
rpm -Uhv http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
yum -y install mpg123
</pre>
'''or'''
<pre>
cd /usr/src
wget http://internode.dl.sourceforge.net/project/mpg123/mpg123/1.22.2/mpg123-1.22.2.tar.bz2
tar jxf mpg123-1.22.2.tar.bz2
rm -f mpg123-1.22.2.tar.bz2
cd mpg123-1.22.2
./configure
./configure
make
make
Line 13: Line 25:
</pre>
</pre>


=== Raspbian ===
<pre>
<pre>
yum -y install perl sox
apt-get install -y perl libwww-perl sox mpg123
</pre>
</pre>


=== CPAN:LWP ===
=== CPAN:LWP ===
Line 21: Line 35:


<pre>
<pre>
yum -y install perl cpan
PERL_MM_USE_DEFAULT=1 perl -MCPAN -e "install Bundle::LWP"
</pre>
PERL_MM_USE_DEFAULT=1 perl -MCPAN -e "install CGI::Util"
 
<pre>
perl -MCPAN -eshell
</pre>
once in the shell type in:
 
<pre>
install Bundle::LWP
</pre>
</pre>


== Install ==
== Install ==
<pre>
<pre>
wget https://github.com/downloads/zaf/asterisk-googletts/asterisk-googletts-0.5.tar.gz
wget https://github.com/zaf/asterisk-googletts/blob/master/googletts.agi
tar xvzf asterisk-googletts-0.5.tar.gz
mv googletts.agi /var/lib/asterisk/agi-bin/
cp asterisk-googletts-0.5/googletts.agi /var/lib/asterisk/agi-bin/
chmod 755 /var/lib/asterisk/agi-bin/googletts.agi
</pre>
</pre>


Line 43: Line 49:
<pre>
<pre>
exten => 1234,1,Answer
exten => 1234,1,Answer
exten => 1234,n,agi(googletts.agi,"Google text to speech for Asteirsk",en)
exten => 1234,n,agi(googletts.agi,"Google text to speech for Asterisk",en)
exten => 1234,n,agi(googletts.agi,"has been successfully installed.",en)
exten => 1234,n,agi(googletts.agi,"has been successfully installed.",en)
exten => 1234,n,agi(googletts.agi,"Hip Hip Hooray",en)
exten => 1234,n,agi(googletts.agi,"Hip Hip Hooray",en)

Latest revision as of 02:34, 3 August 2015

Here is a nifty little text to speech API for Asterisk using google Voice called Google's text to speech for asterisk

Dependencies

CentOS

yum -y install perl perl-libwww-perl sox cpan bzip2

mpg123

rpm -Uhv http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
yum -y install mpg123

or

cd /usr/src
wget http://internode.dl.sourceforge.net/project/mpg123/mpg123/1.22.2/mpg123-1.22.2.tar.bz2
tar jxf mpg123-1.22.2.tar.bz2
rm -f mpg123-1.22.2.tar.bz2
cd mpg123-1.22.2
./configure
make
make install

Raspbian

apt-get install -y perl libwww-perl sox mpg123


CPAN:LWP

Install LWP. For a list of CPAN mirrors

PERL_MM_USE_DEFAULT=1 perl -MCPAN -e "install Bundle::LWP"
PERL_MM_USE_DEFAULT=1 perl -MCPAN -e "install CGI::Util"

Install

wget https://github.com/zaf/asterisk-googletts/blob/master/googletts.agi
mv googletts.agi /var/lib/asterisk/agi-bin/
chmod 755 /var/lib/asterisk/agi-bin/googletts.agi

Usage

exten => 1234,1,Answer
exten => 1234,n,agi(googletts.agi,"Google text to speech for Asterisk",en)
exten => 1234,n,agi(googletts.agi,"has been successfully installed.",en)
exten => 1234,n,agi(googletts.agi,"Hip Hip Hooray",en)
exten => 1234,n,HangUp