[Asterisk-Users] TTS & Voice Rec (sphinx)

Donny Kavanagh kavando at trn.ca
Wed Oct 13 13:06:16 MST 2004


I'm not sure if this is a bug, or if I'm doing something wrong but I
followed the instructions on the wiki for festival, I installed 1.4.3
applied two patches, one for it not compiling on fedora core2 (newer
gcc) as well as one patch to make it work with cmd Festival.  This
seemed to work well however, it only works when called via the zaptel
card.  When I call via sip, I would see the Festival cmd execute on the
cli, but I heard nothing, and the sip call hung up.

 

I ended up writing an agi myself which I believe will run on an
unpatched copy of festival.  It also works fine on both versions I have
on my system 1.4.3 as well as 1.95beta.

 

As a side note, perhaps it would be a cool idea to be able to map agi's
to be functions within extensions.

 

--snip-

#!/usr/bin/perl

 

#make a tts dir inside your sounds dir.

 

use Asterisk::AGI;

use File::Basename;

use Digest::MD5 qw(md5_hex);

 

$AGI = new Asterisk::AGI;

 

my %input = $AGI->ReadParse();

my ($text)=@ARGV;

my $hash = md5_hex($text);

my $sounddir = "/var/lib/asterisk/sounds/tts";

my $wavefile = "$sounddir/"."tts-$hash.wav";

my $t2wp=
"/root/www.cstr.ed.ac.uk/download/festival/1.95/festival/bin/";

 

unless (-f $wavefile) {

        open(fileOUT, ">$sounddir"."/say-text-$hash.txt");

        print fileOUT "$text";

        close(fileOUT);

        my $execf=$t2wp."text2wave $sounddir/say-text-$hash.txt -F 8000
-o $wavefile";

        system($execf);

        unlink($sounddir."/say-text-$hash.txt");

}

$AGI->stream_file('tts/'.basename($wavefile,".wav"));

--snip-

 

As for sphinx I've done some research via google, searched the mailing
list and I've found very little information on this subject.

 

Looking at eagi-sphinx-test.c I think I see where the voice detection
occurs, however I'm not sure if it just listens for sound, or if it will
return a word it thinks its heard, or if we provide a word list of what
we are looking for etc.  I am just doing some preliminary research
before I go ahead and install it.

 

Has anyone else installed sphinx?  Do you have any working examples to
post etc, if you know anything share it because there's a definite lack
of information at the moment.

 

Thanks,

Donny

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20041013/3a3e5794/attachment.htm


More information about the asterisk-users mailing list