I use an additional shell script that breaks up the text into sentences, which hopefully have less than 100 characters. These sentences are then processed by the perl script and concatenated into a single wave file:

#!/bin/sh

OUTDIR=${1:-.}

while read file text
do
    echo $file
    (echo $text | sed -e 's/\. /.\n/g' | while read s
    do
        ./getsound.pl - "$s" | sox -t wav - -t raw -r 8000 -sw -c 1 -
    done) | sox -t raw -r 8000 -sw -c 1 - $OUTDIR/$(basename $file .gsm).wav
done

This script expects stdin to be a list like:

hello.gsm Hello there.
thankyou.gsm Thank you.
long.gsm This is a long piece of text. And another sentence.

So far, I have not had to process a sentence that is longer than 100 characters, but this would not be too hard to cater to. I have attached the perl script for perusal.

Jeffrey Bird

Colin Anderson wrote:
Curious if the perl scropt overcomes the 100 char limitation?

-----Original Message-----
From: Rod Bacon [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 13, 2005 12:41 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion;
[EMAIL PROTECTED]
Subject: Re: [Asterisk-Users] OT: Online TTS engines?


Can I get a copy of that PERL script?


==========================================
Rod Bacon
Empowered Communications
Ground Floor, 102 York St. South Melbourne
Victoria, Australia. 3205
Phone: +613 99401600    Fax: +613 99401650
FWD: 512237                   ICQ: 5662270
==========================================


Jeffrey Bird wrote:
  
I have been using the web demo of ScanSoft's SpeechWorks - RealSpeak at 
http://www.scansoft.com/speechworks/realspeak/demo/default.asp. It has 
very nice output. I even managed to get a nifty perl script going that 
can do TTS from the command line for me.

Jeffrey Bird

Colin Anderson wrote:

    
The one I like:

http://www.rhetorical.com/cgi-bin/demo.cgi

is toast. I think they went broke or got aquired by someone. Also, is 
there
a Festival voice that sounds as good as Rhetorical or the AT & T 
stuff? The
default one is barely legible. Since Festival is a little brutal to
configure, I'd like to get someone's recommendation then go through 
the pain
of reconfiguring it only once. 
_______________________________________________
--Bandwidth and Colocation sponsored by Easynews.com --

Asterisk-Users mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users
 

      
_______________________________________________
--Bandwidth and Colocation sponsored by Easynews.com --

Asterisk-Users mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


    
_______________________________________________
--Bandwidth and Colocation sponsored by Easynews.com --

Asterisk-Users mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
--Bandwidth and Colocation sponsored by Easynews.com --

Asterisk-Users mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
  

Attachment: getsound.pl
Description: Perl program

_______________________________________________
--Bandwidth and Colocation sponsored by Easynews.com --

Asterisk-Users mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to