NeuTTS Nano — Core ML (English)
Apple Core ML export of NeuTTS Nano (English) for on-device inference with the NeuCodec decoder.
Upstream weights, training, and licensing are from Neuphonic; this repository holds converted .mlpackage bundles and the matching tokenizer.json for Core ML clients.
Intended use
- On-device TTS on iOS / macOS using
MLModel(no server round-trip). - English text input; quality depends on how closely your client matches the original phoneme / text pipeline (see Integration notes).
Repository layout
Place these under a single directory (e.g. Application Support) before loading:
| Path | Role |
|---|---|
NeuTTSNano_seq256.mlpackage/ |
Causal LM backbone, no KV cache. Traced with a fixed maximum sequence length of 256 (input_ids shape (1, seq_len) int32). |
NeuCodecDecoder.mlpackage/ |
Codec decoder: exactly 200 speech-token indices in → 96_000 float32 PCM samples out at 24_000 Hz mono. |
tokenizer/tokenizer.json |
Hugging Face–style tokenizer (vocab + added tokens). |
Optional: coreml_meta.json if you ship export metadata alongside the bundles.
Model I/O contract (Core ML)
Backbone NeuTTSNano_seq256
- Input:
input_ids—MLMultiArrayshape[1, seq_len], dtype int32,1 ≤ seq_len ≤ 256. - Output:
logits— last-position logits (shape compatible with(1, 1, 194_256)in the reference app; greedy argmax over full vocab).
Speech token IDs in the unified vocabulary occupy 129_000 … 194_255; the codec expects 0-based indices relative to that speech range (subtract 129_000 before building the codes tensor).
Codec NeuCodecDecoder
- Input:
codes—MLMultiArrayshape[1, 1, 200], dtype int32 (exactly 200 tokens). - Output:
audio— float32 waveform samples (reference export: 96_000 samples ≈ 4.0 s at 24 kHz).
Shorter utterances are zero-padded on the token side in the reference client; the decoder still emits the full 96k sample buffer (trim / VAD in your app if needed).
Integration notes (on-device iOS client reference)
The iOS/macOS client on-device iOS client loads this layout from Application Support/NeuTTSNano/ and:
- Runs greedy autoregressive generation (no sampling temperature in the shipped path).
- Re-runs the full prefix at each step (no KV-cache Core ML model), so latency grows with sequence length.
- Uses lightweight text normalization (lowercase, whitespace); upstream NeuTTS often uses espeak-ng phonemisation — for best parity, consider feeding IPA/phoneme text if your platform allows.
Source of truth for shapes and constants: NeuTTSCoreMLService in the on-device iOS client package (defaultHFRepoID points to this repo).
Hardware
- Reference app compiles the backbone with CPU + GPU compute units and the codec with CPU only (ISTFT-heavy path).
Limitations
- Fixed-length codec: 200 tokens → ~4 s audio window per forward pass; long text may be truncated by the 256 token context budget (text + generated tokens share the same cap in the reference stack).
- English-only Nano checkpoint; not the multilingual NeuTTS Nano collection.
- This export is for Core ML runtimes; it is not a GGUF / ONNX substitute for the original
neuttsPython stack.
License
Weights and architecture are derived from Neuphonic’s NeuTTS Nano and NeuCodec releases. Use is subject to the NeuTTS Open License v1.0 and upstream terms on:
If you redistribute converted artifacts, keep attribution and comply with the upstream license.
Citation
If you use NeuTTS / NeuCodec academically or in product collateral, follow the citation guidance in the neuphonic/neutts-nano model card.
Core ML conversion maintained for on-device use; base models by Neuphonic.
- Downloads last month
- -
Model tree for aoiandroid/neutts-nano-coreml
Base model
neuphonic/neucodec