[Tutor] creating a sound file from a string
Norman Khine
norman at khine.net
Tue Jan 20 13:25:05 CET 2009
Thanks I am looking at this now.
From unix I could run sox so that
$ sox uppercase-a.wav uppercase-b.wav ab.wav
this produces a merged uppercase-a.wav uppercase-b.wav
perhaps this is a better way, but requires having to execute an external
programme.
any thoughts?
cheers
norman
Kent Johnson wrote:
> On Tue, Jan 20, 2009 at 4:49 AM, Norman Khine <norman at khine.net> wrote:
>> does anyone know of a python module which would create a single sound file
>> based on the randomly generated string?
>>
>> i have looked at the python wave module, but if i am not wrong this works
>> with one file at the time.
>
> I think you can do this with the wave module. The code would be
> something like this:
>
> open output file and set number of channels, etc
> for each letter of input:
> open wave file for the letter
> read frames from letter file
> write frames to output file
> close output file
>
> Kent
>
More information about the Tutor
mailing list