Donny Kavanagh has released an AGI file to allow text to speech from Festival to be used with Asterisk without patching Festival. He also asks for help with Sphinx (speech to text). Here's his post:
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.
Note that this AGI scsript requires the Asterisk perl library. You do not need to start the Festival server for this to work!
Here's an example snippet for your extensions.conf:
exten => 1234,1,Answer
exten => 1234,2,AGI(festival-script.pl|Welcome to the wonderful world of Asterisk! Your phone number is ${CALLERIDNUM}.)
exten => 1234,3,Hangup
festival-script.pl (to be placed into /var/lib/asterisk/agi-bin/):
#!/usr/bin/perl
#make a tts dir inside your sounds dir.
#adjust the t2wp variable to point to your festival bin directory
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
Current Rating: 0/10 (0 votes) Similar Articles (Based on Title)Asterisk-Users Post: [bkw] - September 19, 2004 This is the full news entry:
bkw posted to the asterisk-users mailing list:
Just an FYI
localmask is deprecated...
As of latest CVS:
localnet=ip/mask
bkw
RSS feed Asterisk-Users - April 29, 2005 Sjaak has posted details of an RSS feed he has created for the Asterisk-Users and Biz lists.
Asterisk@home festival weather report - February 25, 2005 Dean Collins has posted a script to allow you to get a weather report via the Festival Speech Synthesis engine.
CVS Update: Fast AGI - September 23, 2004 Implement Fast AGI (agi://) over TCP socket (Astricon talk idea)
*-Dev: AGI via Asterisk Manager API - March 18, 2005 David Pollak has posted details of a method to run AGI commands through the manager interface.
VoIP-info.org: MacinTalk AGI for Mac Asterisk users - July 10, 2005 The wiki has a link to an agi by jcovert to call MacinTalk
AGI and DeadAGI - July 30, 2007 Some information on the changes in the way AGI and DeadAGI work.
Asterisk AGI 2.0 - October 25, 2007 Zoltan Gaspar has posted some ideas about improvements and a change of style for Asterisk Gateway Interfaces.
Added ability to perform SRV lookups for AGI URIs - September 30, 2009 Brent Thomson has posted some cool code to allow fast agi to be used with multiple failover servers.
Audio to remote AGI server - February 22, 2010 Tilghman Lesher has posted details of some patches he has written to add audio to a remote AGI.
Perx starts new Asterisk Blog, Reports on playing native file formats for Music On Hold - November 12, 2004 Perx posted a note to the wiki today about his blog entry for getting music on hold to use native file formats. This is also a new blog, so worth checking out!
*-Dev: OGG/Vorbis File Format - May 20, 2005 Jeffrey C. Ollie has posted details of an OGG/Vorbis file format for Asterisk up on the mantis.
Original Content (C) 2004-2010
Matt Riddell

Icons by: FastIcon.com
|
AstriDevCon: October 29th, Washington DC August 23, 2010 Average Vote: 10
John Todd has posted a note about the AstriDevCon conference which occurs within the Astricon conference.
Code Review: SRTP support for Asterisk March 12, 2009 Average Vote: 10
Terry Wilson has moved his SRTP branch onto the Digium review board.
The Everything Asterisk Video Collection August 5, 2010 Average Vote: 10
Steven Sokol has posted a blog entry on Asterisk Video Resources.
Voip-Forum: Lots of new articles March 12, 2005 Average Vote: 10
Oej's Voip-Forum.com site has posted lots of new news articles while I've been away. Hopefully you found them via the asterisk-docs site. If not I've bookmarked them for you.
Interview with Mark Spencer November 26, 2004 Average Vote: 9.9
We have managed to get an interview with Mark Spencer AKA Markster. Mark Spencer is the creator of Asterisk and by far the most active developer.
Asterisk and Kamailio realtime integration tutorial May 24, 2010 Average Vote: 9.9
Daniel-Constantin Mierla has posted a link to a tutorial on integrating Asterisk and Kamailio using realtime.
Asterisk and Kamailio (openser) realtime integration August 5, 2010 Average Vote: 9.8
Daniel-Constantin Mierla posted a writeup on combining Asterisk and Kamailio.
Asterisk IPv6 update February 1, 2010 Average Vote: 9.8
Olle has posted an update on IPV6 in Asterisk and a link to a blog post of his.
Proposal for T.38 transparent gateway design in Asterisk April 29, 2010 Average Vote: 9.8
Kevin Fleming has posted a proposed design for a transparent T.38 gateway for Asterisk:
Back to life July 21, 2010 Average Vote: 9.8
Hey all - I am back online after some pretty big projects which have taken all my time. Will be updating the Asterisk news over the next few days.
Announcing Adhearsion 0.8.5 August 25, 2010 Average Vote: 9.8
Ben Klang has posted a note about the latest release of Adhearsion - a framework for developing Asterisk based solutions using Ruby.
app_swift v2.0 released July 21, 2010 Average Vote: 9.8
Like a few of these news stories that I will be posting over the next couple of days this is a little old - hope it is not something you have already seen. This one is for a new version of the app_swift text-to-speech module for Asterisk 1.2, 1.4, and 1.6.
Monitoring Asterisk with Munin January 7, 2010 Average Vote: 9.7
I had a few requests for these munin plugins after some discussion on one of the Asterisk lists and thought people might like them.
GUI changes from Trixbox, FreePBX, 2600hz, BlueBox September 1, 2010 Average Vote: 9.7
Ok, bear with me on this one. If you understand all the ramifications, FreePBX has split to a new project called BlueBox contained within the 2600hz project. This obviously has implications for Trixbox that uses FreePBX to provide quite a bit of functionality.
Nerd Vittles: Finally... Installing Asterisk at Home on Your Windows PC February 9, 2006 Average Vote: 9.7
Ward Mundy has posted details of a how to for installing Asterisk at Home on a windows machine without removing windows.
Asterisk 1.8.0-beta5 Now Available September 9, 2010 The Asterisk Development Team has announced the release of Asterisk 1.8.0-beta5.
libpri 1.4.11.4 Now Available September 3, 2010 The Asterisk Development Team has announced the release of libpri 1.4.11.4.
New CDR Stats Package September 1, 2010 This one has been a long time coming. A new CDR stats package from Star2Billing to replace the 7 year old stalwart for viewing Asterisk call detail records.
GUI changes from Trixbox, FreePBX, 2600hz, BlueBox September 1, 2010 Ok, bear with me on this one. If you understand all the ramifications, FreePBX has split to a new project called BlueBox contained within the 2600hz project. This obviously has implications for Trixbox that uses FreePBX to provide quite a bit of functionality.
RazorQuotePBP Asterisk Payment Module August 31, 2010 RazorQuote has sent us a press release about the launch of RazorQuotePBP, a native Asterisk module that allows any Asterisk connected device to accept credit card payments.
CloudVox: Install an open source Asterisk phone app and get 250 dollars August 30, 2010 CloudVox is running a competition for people to receive 250 dollars for writing up some documentation for Open Source applications on CloudVox - first in first served.
AstriCon approaches August 25, 2010 John Todd has posted a note about the upcoming AstriCon conference in Washington, DC, and the innovation awards.
Announcing Adhearsion 0.8.5 August 25, 2010 Ben Klang has posted a note about the latest release of Adhearsion - a framework for developing Asterisk based solutions using Ruby.
Asterisk 1.8.0-beta4 Now Available August 25, 2010 The Asterisk Development Team has announced the release of Asterisk 1.8.0-beta4.
AstriDevCon: October 29th, Washington DC August 23, 2010 John Todd has posted a note about the AstriDevCon conference which occurs within the Astricon conference.
|