Downloads · 30 days
0
ragtag-ai/neucodec-encoder-rten
neucodec-encoder-rten is a text-to-speech model from ragtag-ai. Use it when you need text read aloud. It is set up for rten. The card lists the license as apache-2.0.
This is a Rust-runtime port of the NeuCodec encoder, exported to ONNX and converted for use with rten — a pure-Rust ONNX runtime.
Downloads · 30 days
0
Access
Public
Updated Jun 9, 2026
Repo size
1.8 GB
Likes
0
Public
Click a slice to open those files.
.rten1.8 GB · 100%
From the Hugging Face model README
This is a Rust-runtime port of the NeuCodec encoder, exported to ONNX and converted for use with rten — a pure-Rust ONNX runtime.
The encoder converts a 16 kHz mono audio reference into discrete codes that drive zero-shot voice cloning in the NeuTTS family of models.
This artifact exists to enable voice cloning in Ragtag, a local-first desktop AI application, under strict architectural constraints: no native ONNX runtime (no onnxruntime / ort), no GPL dependencies. The constraint-clean path through rten produced numerical parity with the original PyTorch encoder.
.rten (rten's native model format, converted from ONNX)This model was produced from the original NeuCodec encoder through the following pipeline:
neucodec Python package, encoder component onlytorch.onnx.export via a patched version of the author's export_encoder.py. The patch corrects two issues in the upstream export script (a probe-ordering bug and a stale alias-free patch written against a different module structure), and swaps an ONNX-hostile dynamic operation in UpSample1d/LowPassFilter1d for a fixed buffer. The patched model produces identical codes to the original PyTorch model.rten-convert from the ONNX export. The full encoder — including the 600M-parameter Wav2Vec2-BERT 2.0 semantic model — converts cleanly with no unsupported operators.The Rust runtime output was verified against the PyTorch reference:
The chain rten ≈ ORT ≈ PyTorch holds end-to-end.
This model is intended for use within Ragtag's clone pipeline. It is not a standalone TTS system. Using it requires:
The encoder runs on CPU; encoding a 20-second reference takes approximately 5 seconds on Apple Silicon.
This model is licensed under Apache License 2.0, derived from the original NeuCodec encoder which is also Apache 2.0 licensed.
When using this model, please retain the attribution to the original authors:
NeuCodec by Neuphonic
https://huggingface.co/neuphonic/neucodec
Licensed under Apache 2.0
The rten conversion and ONNX export patches are contributed by Ragtag / Captivated Ltd, also under Apache 2.0.
If you use this work, please cite both the original NeuCodec and this rten port:
@misc{neucodec2024,
author = {Neuphonic},
title = {NeuCodec},
year = {2024},
publisher = {Hugging Face},
url = {https://huggingface.co/neuphonic/neucodec}
}
@misc{neucodec-encoder-rten,
author = {Mallett, Leon},
title = {NeuCodec Encoder (rten port)},
year = {2026},
publisher = {Hugging Face},
url = {https://huggingface.co/ragtag-ai/neucodec-encoder-rten}
}