aifc.aifc.setcomptype()

aifc.setcomptype(type, name) Specify the compression type. If not specified, the audio data will not be compressed. In AIFF files, compression is not possible. The name parameter should be a human-readable description of the compression type as a bytes array, the type parameter should be a bytes array of length 4. Currently the following compression types are supported: b'NONE', b'ULAW', b'ALAW', b'G722'.

aifc.aifc.rewind()

aifc.rewind() Rewind the read pointer. The next readframes() will start from the beginning.

aifc.aifc.readframes()

aifc.readframes(nframes) Read and return the next nframes frames from the audio file. The returned data is a string containing for each frame the uncompressed samples of all channels.

aifc.aifc.getsampwidth()

aifc.getsampwidth() Return the size in bytes of individual samples.

aifc.aifc.getparams()

aifc.getparams() Returns a namedtuple() (nchannels, sampwidth, framerate, nframes, comptype, compname), equivalent to output of the get*() methods.

aifc.aifc.getnframes()

aifc.getnframes() Return the number of audio frames in the file.

aifc.aifc.getnchannels()

aifc.getnchannels() Return the number of audio channels (1 for mono, 2 for stereo).

aifc.aifc.getmarkers()

aifc.getmarkers() Return a list of markers in the audio file. A marker consists of a tuple of three elements. The first is the mark ID (an integer), the second is the mark position in frames from the beginning of the data (an integer), the third is the name of the mark (a string).

aifc.aifc.getmark()

aifc.getmark(id) Return the tuple as described in getmarkers() for the mark with the given id.

aifc.aifc.getframerate()

aifc.getframerate() Return the sampling rate (number of audio frames per second).