[Tutor] creating a sound file from a string

Kent Johnson kent37 at tds.net
Tue Jan 20 13:03:55 CET 2009

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 mailing list