Re: advice: program to generate sound from characters



babaji <banerjee.anirban@xxxxxxxxx> writes:

Hello all :-) ,
Could someone please help me with a little bit of
advice.

I am planning to write a program which would take as input characters,
say a-z and would output a wav/mp3 file to represent them. e.g. input-
"myname" output-> an mp3 file where a tone will be played for say
0.5 sec to represent each character.

I have searched for packages and have come up with a lot of results. I
am a little overwhelmed by the complexity of some of the packages for
text to speech and the like. Could someone please suggest a simple
program/library which I could use to convert a letter to a tone and
get a wav/mp3 file as output.

I am sure noone has written it. YOu could write your own. Eg, you could use
sox as a translator from an ascii using the .dat data format, and then have
sox convert that to a .wav file.
you could write one .dat for each letter and then convert it.
iThe only problem would be to convert the time in the file to consecutive
times.

timebase=0
for i in m y n a m e
do
awk 'BEGIN {t='$timebase'} {print $1+t " " $2}' $i.dat>>output.dat
timebase=`echo $timebase + .5 |bc`
done
sox output.dat output.wav

Wher I assume that each a.dat, b.dat... have times which go from 0 to
..5-mint
where mint is the minimum timestep.



and a.dat, b.dat, c.dat .... are .dat files which contain the tones you
want to have put in for a b c ...



I have seen festival, and some other text2speech packages, but I am
just wondering if there is something much simpler for my
requirements.

I plan to use the program as a command line utility to convert small
chunks of text to tones.

Thanks,
-A
.