On-device CoreML conversion of OpenMOSS-Team/MOSS-TTS-Nano-100M (0.1B multilingual streaming TTS with zero-shot voice cloning, 20 languages) and its codec MOSS-Audio-Tokenizer-Nano (22M, 48 kHz stereo, 12.5 Hz × 16 RVQ codebooks) for Apple platforms.
Sources/FluidAudio/TTS/MossTtsNano)reference clip ─CodecEncoder─► 16×T codes ─┐
text ─SentencePiece BPE─► ids ─────────────┴─► rows [T,17] ─Prefill─► hidden + KV
│ per 80 ms frame
Frame (local transformer + sampling) ─► 16 codes ─► CodecStep ─► 2×3840 samples @ 48 kHz
Step (global GPT-2, KV update) ◄── [assistant_slot, 16 codes]
Both .mlpackage (source) and precompiled .mlmodelc are shipped; load .mlmodelc directly.
| Bundle | I/O | Target |
|---|---|---|
MossNano-Prefill-T512-M1024-fp16 |
input_ids [1,512,17] int32, input_len [1] → hidden [1,768], kv_k/kv_v [12,1,12,1024,64] |
macOS 14 / iOS 17 |
MossNano-Step-M1024-fp16 |
input_ids [1,1,17], kv_k, kv_v, cur_len [1] → hidden, kv_k_out, kv_v_out |
macOS 14 / iOS 17 |
MossNano-Frame-fp16 |
global_hidden [1,768], text_u [1], audio_u [1,16], text_temperature, audio_temperature, audio_top_p, repetition_penalty (each [1]), seen [1,16,1024], greedy [1] → should_continue [1] int32, frame [1,16] int32 |
macOS 14 / iOS 17 |
MossNano-CodecStep-fp16 |
codes [16,1,1] int32, frame_index [1], 24 KV caches k{s}_{l}/v{s}_{l} [1,4,{500,800,1200,1600},64] → audio [1,2,3840], *_out caches |
macOS 14 / iOS 17 |
MossNano-CodecDecoder-fp16 |
codes [16,1,T≤125] → audio [1,2,T·3840] (batch, flexible length) |
macOS 14 / iOS 17 |
MossNano-CodecEncoder-fp32 |
audio [1,2,S] (S % 3840 == 0, ≤ 188 frames) → codes [16,1,S/3840] |
macOS 14 / iOS 17 |
config.json |
special token ids, pre-tokenized prompt template segments, sampling defaults | |
tokenizer.model |
SentencePiece BPE (16 384 pieces, byte fallback, nmt_nfkc) |
|
voices/en_2.json, voices/zh_1.json |
preset voice codes ([frames][16]) from the upstream demo clips (also shipped as .wav) |
Sampling runs inside the Frame graph (top-k 50 text / 25 audio fixed; temperature, top-p and
repetition penalty are inputs). The host supplies uniform randoms in [0,1); greedy = 1 selects
argmax. Upstream greedy decoding never emits the stop token, so use sampling (defaults: text T 1.5,
audio T 1.7, top-p 0.8).
Apache-2.0, following the upstream MOSS-TTS-Nano and MOSS-Audio-Tokenizer releases (see LICENSE).
MossNano-Prefill-T512-M1024-fp16.mlmodelc/weights/weight.bin 222 MBMossNano-Prefill-T512-M1024-fp16.mlpackage/Data/com.apple.CoreML/weights/weight.bin 222 MBMossNano-Step-M1024-fp16.mlmodelc/weights/weight.bin 220 MBMossNano-Step-M1024-fp16.mlpackage/Data/com.apple.CoreML/weights/weight.bin 220 MBMossNano-Frame-fp16.mlmodelc/weights/weight.bin 65 MBMossNano-Frame-fp16.mlpackage/Data/com.apple.CoreML/weights/weight.bin 65 MBMossNano-CodecEncoder-fp32.mlmodelc/weights/weight.bin 45 MBMossNano-CodecEncoder-fp32.mlpackage/Data/com.apple.CoreML/weights/weight.bin 45 MBMossNano-CodecStep-fp16.mlmodelc/weights/weight.bin 23 MBMossNano-CodecStep-fp16.mlpackage/Data/com.apple.CoreML/weights/weight.bin 23 MBMossNano-CodecDecoder-fp16.mlmodelc/weights/weight.bin 22 MBMossNano-CodecDecoder-fp16.mlpackage/Data/com.apple.CoreML/weights/weight.bin 22 MBMossNano-CodecStep-fp16.mlmodelc/coremldata.bin 1.6 kBMossNano-Frame-fp16.mlmodelc/coremldata.bin 0.6 kBMossNano-Step-M1024-fp16.mlmodelc/coremldata.bin 0.5 kBMossNano-Prefill-T512-M1024-fp16.mlmodelc/coremldata.bin 0.4 kBMossNano-CodecEncoder-fp32.mlmodelc/coremldata.bin 0.4 kBMossNano-CodecDecoder-fp16.mlmodelc/coremldata.bin 0.4 kBMossNano-CodecDecoder-fp16.mlmodelc/analytics/coremldata.bin 0.2 kBMossNano-CodecEncoder-fp32.mlmodelc/analytics/coremldata.bin 0.2 kBMossNano-CodecStep-fp16.mlmodelc/analytics/coremldata.bin 0.2 kBMossNano-Frame-fp16.mlmodelc/analytics/coremldata.bin 0.2 kBMossNano-Prefill-T512-M1024-fp16.mlmodelc/analytics/coremldata.bin 0.2 kBMossNano-Step-M1024-fp16.mlmodelc/analytics/coremldata.bin 0.2 kB有文件?提交种子。
提交种子