--- id: encodec version: "0.1.1" license: Creative Commons Attribution-NonCommercial 4.0 International license_treatment: noncommercial maintenance: dormant --- # encodec — High fidelity neural audio codec License: noncommercial · Maintenance: dormant · Downloads: 322.8K/mo ## What it is and what it does EnCodec is a neural audio compression system that encodes audio into discrete codes at very low bitrates. It provides two pre-trained models: a causal 24 kHz model for mono audio and a non-causal 48 kHz model for stereo audio, each supporting multiple target bitrates. The codec can compress to 1.5, 3, 6, 12, or 24 kbps depending on the model, and includes an optional language model that can achieve up to 40% additional compression through entropy coding. The package is designed for research and non-commercial use. It operates as both a command-line tool for direct audio compression and decompression, and a Python API for extracting discrete audio representations. Models are automatically downloaded via Torch Hub on first use. Installation requires Python 3.8 and a recent PyTorch version, making it a heavy dependency for projects that do not already use deep learning frameworks. Use it for: - Research on neural audio compression and discrete audio representations for machine learning. - Compressing audio archives to very low bitrates for storage in non-commercial settings. - Extracting discrete codes from audio for use as input to downstream models. - Comparing audio quality at different compression levels via the command-line interface. - Prototyping audio codec improvements using the provided MS-STFT discriminator code. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. EnCodec is a neural audio codec that compresses audio to low bitrates while preserving high fidelity, with separate models for 24 kHz mono and 48 kHz stereo audio. Yes, if you are conducting research on audio compression or need discrete audio codes for a non-commercial pipeline and can manage PyTorch as a dependency. No, if you need commercial licensing, active maintenance, or a lightweight codec for production systems. The noncommercial license and dormant maintenance status are the primary constraints. ## Install pip install encodec uv add encodec poetry add encodec ## Installing encodec Before you install: High install friction: requires Python 3.8 and PyTorch 1.11.0 or later. Maintenance is dormant—last release was 2022-10-25 and repository has not been updated since 2024-01-04, so expect no active bug fixes or dependency updates. License in practice: Licensed under CC-BY-NC 4.0 (noncommercial). You may use this package for research and personal projects, but commercial applications require explicit permission. Quickstart: pip install encodec from encodec import EncodecModel from encodec.utils import convert_audio model = EncodecModel.encodec_model_24khz() model.set_target_bandwidth(6.0) encoded_frames = model.encode(wav) Requires Python 3.8, PyTorch 1.11.0 or later, and external audio libraries; models auto-download via Torch Hub on first use. Verify before relying: - Whether PyTorch installation complexity or GPU requirements pose practical barriers for typical users. - Real-world audio quality trade-offs at different bitrates compared to other codecs. - Whether the 40% additional compression from the language model is reliable across audio types. - Actual runtime dependencies beyond what the package metadata declares. ## Package facts - License: Creative Commons Attribution-NonCommercial 4.0 International (noncommercial) - Python support: supports_current - Install friction: high - Maintenance: dormant - Downloads: 322.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags neural audio compression, audio codec low bitrate, high fidelity audio encoding, audio compression machine learning, lossy audio codec, discrete audio codes, audio-compression, neural-codec, research-only [View on SkillFed](https://skillfed.io/packages/encodec) · [View on PyPI](https://pypi.org/project/encodec/)