Set the compression type and description. Wave_write object has following methods close() obj = wave.open('sound.wav','wb')Ī mode of 'rb' returns a Wave_read object, while a mode of 'wb' returns a Wave_write object. The mode can be 'wb' for writing audio data or 'rb' for reading. The function needs two parameters - first the file name and second the mode. This function opens a file to read/write audio data. ![]() The file is opened in 'write' or read mode just as with built-in open() function, but with open() function in wave module wave.open() ![]() The functions in this module can write audio data in raw format to a file like object and read the attributes of a WAV file. The wave module in Python's standard library is an easy interface to the audio WAV format.
0 Comments
Leave a Reply. |