Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

"decoder.py" is a cross-platform module for decoding compressed audio files.
It uses external decoders by turning their stdout into a file-like object which is completely compatible with the Wave_read
class from wave.py module.

With it you can decode the following file formats:
MPEG Layers 1, 2, and 3 ( *.mp1, *.mp2, *.mp3 ),
MPEG-4 HE-AAC ( *.mp4, *.m4a, *.m4b, *.aac ),
OGG Vorbis ( *.ogg ),
Free Lossless Audio Codec ( *.flac ),
OGG FLAC ( *.oga ),
Windows Media Audio ( *.wma )

In combination with PyAudio, or some similar module/library, you can use "decoder.py" to play compressed audio files.

For full documentation consult the source code.

Release history Release notifications | RSS feed

This release

1.5XB This release

1.5WB

1.4ZB

1.4YB

1.4XB

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page