Skip to main content

NeuCodec 🎧

HuggingFace 🤗: Model, Distilled Model

NeuCodec Demo

Created by Neuphonic - building faster, smaller, on-device voice AI

A lightweight neural codec that encodes audio at just 0.8 kbps - perfect for researchers and builders who need something that just works for training high quality text-to-speech models.

Key Features

🔊 Low bit-rate compression - a speech codec that compresses and reconstructs audio with near-inaudible reconstruction loss
🎼 Upsamples from 16kHz → 24kHz
🌍 Ready for real-world use - train your own SpeechLMs without needing to build your own codec
🏢 Commercial use permitted - use it in your own tools or products
📊 Released with large pre-encoded datasets - we’ve compressed Emilia-YODAS from 1.7TB to 41GB using NeuCodec, significantly reducing the compute requirements needed for training

Model Details

NeuCodec is a Finite Scalar Quantisation (FSQ) based 0.8kbps audio codec for speech tokenization. It takes advantage of the following features:

  • It uses both audio (BigCodec) and semantic (Wav2Vec2-BERT) encoders.
  • We make use of Finite Scalar Quantisation (FSQ) resulting in a single vector for the quantised output, which makes it ideal for downstream modeling with Speech Language Models.
  • At 50 tokens/sec and 16 bits per token, the overall bit-rate is 0.8kbps.
  • The codec takes in 16kHz input and outputs 24kHz using an upsampling decoder.

Our work largely based on extending the work of X-Codec2.0.

Get Started

Use the code below to get started with the model.

To install from pypi in a dedicated environment:

Using conda + pip:

conda create -n neucodec python>3.9
conda activate neucodec
pip install neucodec

Using uv:

uv venv neucodec --python 3.10
source neucodec/bin/activate  # On Windows: neucodec\Scripts\activate
uv pip install neucodec

If you would like to use the onnx decoder, also install onnxruntime:

pip install onnxruntime

Then, to use the regular codec in python:

import librosa
import torch
import torchaudio
from torchaudio import transforms as T
from neucodec import NeuCodec
 
model = NeuCodec.from_pretrained("neuphonic/neucodec")
model.eval().cuda()   
 
y, sr = torchaudio.load(librosa.ex("libri1"))
if sr != 16_000:
    y = T.Resample(sr, 16_000)(y)[None, ...] # (B, 1, T_16)

with torch.no_grad():
    fsq_codes = model.encode_code(y)
    # fsq_codes = model.encode_code(librosa.ex("libri1")) # or directly pass your filepath!
    print(f"Codes shape: {fsq_codes.shape}")  
    recon = model.decode_code(fsq_codes).cpu() # (B, 1, T_24)

torchaudio.save("reconstructed.wav", recon[0, :, :], 24_000)

Training Details

The model was trained using the following data:

  • Emilia-YODAS
  • MLS
  • LibriTTS
  • Fleurs
  • CommonVoice
  • HUI
  • Additional proprietary set

All publically available data was covered by either the CC-BY-4.0 or CC0 license.

Citation

To cite this project, use the following bibtex entry:

@article{julian2025fsq,
  title={Finite Scalar Quantization Enables Redundant and Transmission-Robust Neural Audio Compression at Low Bit-rates},
  author={Julian, Harry and Beeson, Rachel and Konathala, Lohith and Ulin, Johanna and Gao, Jiameng},
  journal={arXiv preprint arXiv:2509.09550},
  year={2025},
  url={https://arxiv.org/abs/2509.09550}
}

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

neucodec-0.0.6.tar.gz (23.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

neucodec-0.0.6-py3-none-any.whl (28.1 kB view details)

Uploaded Python 3

File details

Details for the file neucodec-0.0.6.tar.gz.

File metadata

  • Download URL: neucodec-0.0.6.tar.gz
  • Upload date:
  • Size: 23.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.10.20 Linux/6.17.0-1018-azure

File hashes

Hashes for neucodec-0.0.6.tar.gz
Algorithm Hash digest
SHA256 9a19f107bf224a1c858967ccaace38fe1efbc328ca78c8f792b8dfca9cd993e6
MD5 b43e213504f4d3d550cba87473e5ec19
BLAKE2b-256 8d4250ce58b959a59e08e91d773efd29342b2ee50d199208c8871769b11ac51e

See more details on using hashes here.

File details

Details for the file neucodec-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: neucodec-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 28.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.10.20 Linux/6.17.0-1018-azure

File hashes

Hashes for neucodec-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 7e0231a631ac649b73769d8fb3c10b229054e42914c6da512c3f186dfb2cf57f
MD5 07fffbfce890dc331e4a98dacffb0cb8
BLAKE2b-256 6d9449abf361e89a90839f7861a1206632c15427a8a97a6344d95d46d0a5aa60

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.6 This release

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

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