HuggingFace π€: Model, Distilled Model
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.
π 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
NeuCodec is a Finite Scalar Quantisation (FSQ) based 0.8kbps audio codec for speech tokenization. It takes advantage of the following features:
Our work largely based on extending the work of X-Codec2.0.
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)
The model was trained using the following data:
All publically available data was covered by either the CC-BY-4.0 or CC0 license.
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}
}
Python
100.0%
HuggingFace π€: Model, Distilled Model
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.
π 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
NeuCodec is a Finite Scalar Quantisation (FSQ) based 0.8kbps audio codec for speech tokenization. It takes advantage of the following features:
Our work largely based on extending the work of X-Codec2.0.
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)
The model was trained using the following data:
All publically available data was covered by either the CC-BY-4.0 or CC0 license.
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}
}
Python
100.0%