Python aifc Module
Definition and Usage
Use it to open, inspect, and create AIFF files programmatically, including reading frames and writing new audio data.
Warning: The
aifc
module is deprecated and slated for removal in Python 3.13.Members
Member | Description |
---|---|
close() | Close the AIFF/AIFF-C file (method on file objects returned by open()). |
Error | Exception class raised for aifc-specific errors. |
getcompname() | Return the human-readable compression name (method on file objects). |
getcomptype() | Return the compression type code (e.g. 'NONE', 'ULAW') (method on file objects). |
getframerate() | Return the sampling rate (method on file objects). |
getmark() | Return a specific mark by id as (position, name) (method on file objects). |
getmarkers() | Return a list of all marks as (id, position, name) tuples (method on file objects). |
getnchannels() | Return the number of channels (method on file objects). |
getnframes() | Return the number of audio frames (method on file objects). |
getparams() | Return a named tuple of important parameters (method on file objects). |
getsampwidth() | Return the sample width in bytes (method on file objects). |
open() | Open an AIFF/AIFF-C file for reading or writing. |
readframes() | Read audio frames (method on file objects). |
rewind() | Rewind to the start of the audio stream (method on file objects). |
setcomptype() | Set the compression type code and name (method on file objects when writing). |
setframerate() | Set the sampling rate (method on file objects when writing). |
setmark() | Define or change a mark by id with (position, name) (method on file objects when writing). |
setnchannels() | Set the number of channels (method on file objects when writing). |
setnframes() | Set the number of frames (method on file objects when writing). |
setparams() | Set parameters in one call (method on file objects). |
setsampwidth() | Set the sample width in bytes (method on file objects when writing). |
tell() | Return the current position in the audio stream (method on file objects). |
writeframes() | Write audio frames from a buffer (method on file objects). |
writeframesraw() | Write raw audio frames without updating headers (method on file objects). |