Re: advice: program to generate sound from characters
- From: babaji <banerjee.anirban@xxxxxxxxx>
- Date: Wed, 30 Jul 2008 17:26:52 -0700 (PDT)
On Jul 30, 4:35 pm, Unruh <unruh-s...@xxxxxxxxxxxxxx> wrote:
babaji <banerjee.anir...@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 say0.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
Thanks so much for your input, it is very helpful. I will bug you just
a little more since this is my first audio programming tryout.
I looked up Sox and installed at was trying to find the file format
of .dat files from
http://aaron.birenboim.com/unix/audioRecording.html
http://www.cs.rutgers.edu/~village/lab/dat2d2wav.html
http://www.boutell.com/scripts/silence.html
and from some other sources. Your script has solved nearly 90% of the
problem :-) . I will work on the rest, but if you can please provide
me another pointer, that would be great.
It seems that .dat is a generic format. Is it the same as .raw? From
http://www.boutell.com/scripts/silence.html and your code it seems
that the .dat file should have at least 2 fields: time and tone/
pitch , is this correct?
Thanks for the help,
-A
.
- Follow-Ups:
- References:
- advice: program to generate sound from characters
- From: babaji
- Re: advice: program to generate sound from characters
- From: Unruh
- advice: program to generate sound from characters
- Prev by Date: How do I extend a user's account
- Next by Date: Re: advice: program to generate sound from characters
- Previous by thread: Re: advice: program to generate sound from characters
- Next by thread: Re: advice: program to generate sound from characters
- Index(es):
Relevant Pages
|