Downloads · 30 days
0
aoiandroid/moss-tts-nano-onnx-fp32
moss-tts-nano-onnx-fp32 is a text-to-speech model from aoiandroid. Use it when you need text read aloud. It is set up for onnxruntime. The card lists the license as apache-2.0.
On-device text-to-speech assets derived from OpenMOSS-Team/MOSS-TTS-Nano-100M and OpenMOSS-Team/MOSS-Audio-Tokenizer-Nano.
Downloads · 30 days
0
Access
Public
Updated May 17, 2026
Repo size
915 MB
Likes
0
Public
Click a slice to open those files.
.onnx579 MB · 100%
From the Hugging Face model README
On-device text-to-speech assets derived from OpenMOSS-Team/MOSS-TTS-Nano-100M and OpenMOSS-Team/MOSS-Audio-Tokenizer-Nano.
This repo bundles everything the on-device iOS / macOS client needs to synthesize speech without any server component:
onnx/onnx_shapes.json).tokenizer.model) plus a 1:1 verified fast tokenizer.json for swift-transformers.config.json, exposing all token IDs and model-side constants used by the prompt builder..
├── onnx/
│ ├── moss_tts_nano_lm_fp32.onnx # ~490 MiB — use on macOS (CoreML EP) / Mac-class iPad
│ ├── moss_tts_nano_lm_fp16.onnx # ~250 MiB — default for iPhone
│ ├── moss_tts_nano_decode_fp32.onnx # ~62 MiB
│ ├── moss_tts_nano_decode_fp16.onnx # ~32 MiB
│ └── onnx_shapes.json # prompt_len / frames / sample rate / special tokens
├── tokenizer/
│ ├── tokenizer.json # fast tokenizer (BPE + byte fallback) verified 1:1 against SPM
│ ├── tokenizer.model # original SentencePiece model
│ ├── tokenizer_config.json
│ └── special_tokens_map.json
└── config/
└── config.json # upstream MOSS-TTS-Nano config
| field | value | meaning |
|---|---|---|
prompt_len | 512 | Max prompt_input_ids rows (text tokens + MOSS template overhead). Pad/truncate per chunk. |
n_vq | 16 | Number of audio codebooks. |
n_vq_plus_one | 17 | Columns in prompt_input_ids (1 text column + 16 audio codebook columns, all set to audio_pad_token_id at the text-only prompt stage). |
max_new_frames | 32 | Frames the LM can emit per invocation. |
max_audio_samples | 1,920,000 (≈ 40 s @ 48 kHz) | Upper bound on the decoder output length. |
sample_rate | 48,000 Hz | Output WAV sample rate. |
channels | 2 | Stereo output. |
Long inputs must be split into prompt-budget-sized chunks in the client (sentence-aware, with a single MOSS prompt overhead per chunk) and the resulting WAV segments concatenated. The on-device iOS package does this via MossTTSNanoTextChunker.
prompt_input_ids / attention_mask on-device using the fast tokenizer.json (no server roundtrip).
MossTTSNanoPromptBuilder — Swift port of MossTTSNanoForCausalLM.build_inference_input_ids(mode="continuation").prompt_len = 512 and fills audio codebook columns with audio_pad_token_id.moss_tts_nano_lm_*.onnx to produce audio_codes of shape [1, max_new_frames, n_vq].moss_tts_nano_decode_*.onnx on a sliding window of frames to obtain raw 48 kHz stereo PCM.Exported via Notebooks/MOSS_TTS_Nano/export_moss_tts_nano_e2e_onnx.py (torchscript backend, opset 17) with:
python export_moss_tts_nano_e2e_onnx.py \
--mode split \
--prompt-len 512 \
--max-new-frames 32 \
--max-audio-samples 1920000 \
--write-shapes-json
FP16 graphs produced with onnxconverter_common.float16.convert_float_to_float16(keep_io_types=False).
Token IDs in onnx_shapes.json reflect the upstream config at export time (OpenMOSS-Team/MOSS-TTS-Nano-100M commit 44502f80).
Apache-2.0, same as the upstream MOSS-TTS-Nano-100M and MOSS-Audio-Tokenizer-Nano releases.
Thanks to the OpenMOSS team for releasing the MOSS-TTS-Nano and MOSS-Audio-Tokenizer-Nano weights under a permissive license that makes on-device deployment feasible.