skillfed

encodec

High fidelity neural audio codec

encodec v0.1.1 322.8K downloads/30d#7,607 on PyPI4,014
NONCOMMERCIAL license Creative Commons Attribution-NonCommercial 4.0 International DORMANT released

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 on this page — 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

encodec on PyPI

pip

pip install encodec

uv

uv add encodec

poetry

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 the current Python release (>=3.8.0)
Install friction high — source build required
Runtime dependencies none
Maintenance dormant — 1,389 days since the last release
Last repo commit
First released
Downloads 322,834/month — #7,607 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: encodec-0.1.1.tar.gz

Topic :: Multimedia :: Sound/AudioTopic :: Scientific/Engineering :: Artificial Intelligence

Tags

neural audio compressionaudio codec low bitratehigh fidelity audio encodingaudio compression machine learninglossy audio codecdiscrete audio codes
audio-compressionneural-codecresearch-only

More Artificial Intelligence packages

Further reading