wave.Wave_write.setparams()
wave.Wave_write.setparams() is a Python method in the Wave Module category. Sets audio parameters: (nchannels, sampwidth, framerate, nframes, comptype, compname). The syntax is Wave_write.setparams(tuple). Returns: None. A typical example: wav.setparams((2, 2, 44100, 0, "NONE", "not compressed")). A close sibling is wave.open(), which opens a WAV audio file for reading or writing. A close sibling is wave.Wave_read.readframes(), which reads and returns up to n frames of audio data as bytes. A close sibling is wave.Wave_write.writeframes(), which writes audio frames to the file. More about this category: WAV audio file handling — open, readframes, writeframes, getparams. Related Wave Module entries: wave.open(), wave.Wave_read.readframes(), wave.Wave_write.writeframes(). This page is part of the free Python Reference documentation covering 978+ functions, methods, and modules with examples and parameter details. You can try wave.Wave_write.setparams() immediately in the Python playground, look up unfamiliar terms in the glossary, or return to the Python Reference homepage.