Re: [Asterisk-java-users] Asterisk-java and Text to Speech
Brought to you by:
srt
From: Robert A. <aug...@ya...> - 2006-10-16 19:04:16
|
David, Great info, I will try to dig in and see. Thanks a lot. robert > -----Original Message----- > From: ast...@li... > [mailto:ast...@li...] On > Behalf Of David Rudder > Sent: Monday, October 16, 2006 2:01 PM > To: ast...@li... > Subject: Re: [Asterisk-java-users] Asterisk-java and Text to Speech > > I have not used the Cepstral TTS with Asterisk, but it will > almost definitely work using the same strategy as with > Festival. I do this: > private char playText (String text) throws AgiException { > String soundsDir = "/var/lib/asterisks/sounds/tts/"; > String text2wavePath = "/usr/bin/text2wave"; > String waveName = "TTS_"+System.currentTimeMillis(); > exec("System", "echo '"+text+"'|"+text2wavePath+" -F > 8000 -o "+soundsDir+waveName+".wav"); > char digit = streamFile("tts/"+waveName, "0123456789*#"); > exec("System", "rm "+soundsDir+waveName+".wav"); > return digit; > } > > Basically, I use the System command to run the text2wave > program on the command-line. Then, I use streamFile to play > the new wave file that festival created. Finally, I delete > the created file. If Cepstral has a command-line > application, you can do the same thing. > > If the Cepstral integration has a new AGI command with it, > that allows you to run the TTS without an intermediate wave > file, it would be nice to be able to use that. You may be > able to use the Exec command. > > -Dave > > -------------------------------------------------------------- > ----------- > Using Tomcat but need to do more? Need to support web > services, security? > Get stuff done quickly with pre-integrated technology to make > your job easier Download IBM WebSphere Application Server > v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057& dat=121642 > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > |