[Tutor] creating a sound file from a string
norman at khine.net
Tue Jan 20 14:12:33 CET 2009
Is this a safe way to generate random sound files on a web server?
>>> from os import popen
>>> merge = popen('sox uppercase-b.wav uppercase-a.wav merge.wav')
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
More information about the Tutor