---
title: suxin-light
canonical_url: "https://www.modelscope.cn/models/hzp2000itb/suxin-light"
md_url: "https://www.modelscope.cn/models/hzp2000itb/suxin-light.md"
repository: hzp2000itb/suxin-light
chinese_name: "苏心TTS：中英混读轻量端侧TTS"
last_updated: 2026-11-22
license: mit
pipeline_tag: text-to-speech
tasks:
  - text-to-speech
library_name:
  - onnx
frameworks:
  - onnx
language:
  - zh
  - en
domain:
  - audio
downloads: 84
stars: 1
tags:
  - tts
  - text-to-speech
  - onnx
  - onnxruntime
  - piper
  - vits
  - mandarin
  - chinese
  - english
  - bilingual
  - code-switching
  - on-device
  - edge
  - offline
  - arm
  - arm64
  - cpu
  - int8
  - quantization
  - distillation
  - low-latency
  - streaming
---

# suxin-light

> suxin-light - hzp2000itb 在 ModelScope 开源的模型。中英混读的离线端侧语音合成（TTS）模型：2865 万参数、int8 仅 67 MB，ONNX Runtime 纯 CPU 推理，8 核 Cortex-A55 上 4 线程 6 倍实时、不占 NPU；支持中文/英文/中英混读与流式合成，适合嵌入式设备、智能硬件语音播报与内网离线部署。

hzp2000itb/suxin-light 是 ModelScope 魔搭社区上的text-to-speech模型，采用 mit 许可。

- **Repository**: hzp2000itb/suxin-light
- **License**: mit
- **Tasks**: text-to-speech
- **Tags**: tts, text-to-speech, onnx, onnxruntime, piper, vits, mandarin, chinese, english, bilingual, code-switching, on-device, edge, offline, arm, arm64, cpu, int8, quantization, distillation, low-latency, streaming
- **Downloads**: 84
- **Stars**: 1
- **Last updated**: 2026-11-22

Source: https://www.modelscope.cn/models/hzp2000itb/suxin-light

---

# Suxin-Light（苏心TTS）：中英混读端侧 TTS

**2865 万参数 · int8 67 MB · ONNX Runtime · 8 核 Cortex-A55 纯 CPU 6 倍实时 · 不占 NPU · 支持流式合成**

中英混读的离线端侧语音合成（TTS / 文本转语音）模型：2865 万参数的 VITS 学生模型从 Fun-CosyVoice3-0.5B 蒸馏而来，波形由独创的 **SuxinVoc** 解码器生成（帧率输出、无上采样网络、单调相位映射 `φ = π tanh(h)`）。在 8 核 Cortex-A55 上不依赖 GPU / NPU，纯 CPU 4 线程即达实时速度的 6 倍；int8 图 67 MB，可部署进嵌入式设备、ARM 板卡与内网服务器。

适用场景：智能硬件语音播报、大模型语音助手的流式朗读、医院叫号、车载 / 工业广播、数据不出内网的离线环境。

On-device Mandarin–English TTS: a 28.65M-parameter VITS student distilled from Fun-CosyVoice3-0.5B, with the original **SuxinVoc** decoder (frame-rate output, no upsampling network, monotone phase map `φ = π tanh(h)`). On an 8-core Cortex-A55 it runs at six times real time with no NPU.

This repo ships the ONNX graphs deployed on an ARM Cortex-A55 edge device, and the frontend that runs them — `pypinyin` for Chinese, espeak-ng for English, PAD after syllable and word ends. Stock `piper-tts` cannot load `phoneme_type: mixed`. The student is a Piper VITS, not a CosyVoice fine-tune; teacher weights are not included.

本仓库为 ARM Cortex-A55 端侧设备上实际部署的 ONNX 图及配套前端（中文 pypinyin、英文 espeak-ng）。标准 piper-tts 无法加载 `phoneme_type: mixed`；学生模型是 Piper VITS，非 CosyVoice 微调，教师权重不在此处。

## Samples

| 中文 | English | Mixed |
|---|---|---|
| [zh.wav](examples/zh.wav) | [en.wav](examples/en.wav) | [mixed.wav](examples/mixed.wav) |

## On-device performance（ARM 端侧实测）

测试平台：ARM Cortex-A55 端侧设备（8 核 @1.5 GHz）· Linux 6.1.83 · ONNX Runtime 1.23.2（CPU EP）· int8-excldec 图，warm 状态，RTF 取 3 次中位数。

### RTF vs thread count

| threads | 1 | 2 | 3 | **4** | 6 |
|---|---|---|---|---|---|
| idle | 0.515 | 0.278 | 0.202 | **0.164** | 0.129 |
| +3 busy cores (ASR/VAD/KWS) | — | 0.282 | 0.205 | **0.167** | 0.212 |

单线程已快于实时；4 线程是推荐档位——负载下几乎不变（0.164 → 0.167），而 6 线程叠加负载会超发退化到 0.212。

### vs Matcha zh-en on the same board

| threads | **Suxin-Light int8** | Matcha + Vocos int8 | speed-up |
|---|---|---|---|
| 1 | 0.515 | 0.910 | 1.77× |
| 2 | 0.278 | 0.501 | 1.80× |
| 3 | 0.202 | 0.373 | 1.85× |
| 4 | 0.164 | 0.302 | 1.84× |
| 6 | 0.129 | 0.262 | 2.03× |

每一档都快 1.8–2.0 倍，加载快约 2.5 s，且两条线程扩展曲线形状一致。

### vs published baselines

sherpa-onnx 数据来自树莓派 4（4×Cortex-A72）——A55 单核吞吐约为 A72 的 60–70%，靠 8 核弥补，此表仅作背景对照。

| model | RTF @4T | Size |
|---|---|---|
| **Suxin-Light int8 (A55 ×8)** | **0.164** | 67 MB |
| our Matcha zh-en, same board | 0.302 | 90 MB |
| matcha-icefall-zh-baker, mono zh (RPi 4) | 0.391 | 73 MB |
| en_US-lessac-medium, Piper VITS (RPi 4) | 0.357 | 61 MB |
| vits-melo-tts-zh_en (RPi 4) | 2.518 | 163 MB |
| kokoro-multi-lang-v1_1 (RPi 4) | 3.191 | 311 MB |

中英双语在端侧明显更重：表内单语模型 RTF 0.16–0.41，双语模型 2.5–3.2。

### First-packet latency

RTF 0.164 却有 1.4 s 首包，瓶颈在流水线：切句要等句末标点，交叉淡化要扣压首块。首句在第一个逗号处切开、块间改淡出加 50 ms 静音后，两处等待消除。端到端首包（4 线程，毫秒）：

| case | no split | aggressive split | Δ |
|---|---|---|---|
| short sentence, 36 chars | 1279 | **832** | −35% |
| short sentence, 39 chars | 1358 | **501** | −63% |
| long sentence, 118 chars | 1626 | **824** | −49% |
| no punctuation, 33 chars | 1465 | 1446 | 0 |
| **median** | **1411** | **828** | **−41%** |

中位 1411 → 828 ms，短句受益最大；无标点句无边界可切，几乎不变。TTS 纯推理首包 855 → 571 ms。参照：Picovoice 在 x86 桌面测得 Piper TTS 首包 1720 ms，本机已优于桌面 CPU；Orca 的 106 ms 靠真流式（不等标点），是下一步方向。

### Recommended settings

`intra_op_num_threads: 4`，`noise_scale/noise_w: 0`，`pad_mode: group`，`use_lang_tags: false`，`aggressive_first_sentence: true`。加载加预热 14.3 s；合成音频回识 CER 0.128（误差集中在数字/单位归一化与中英混读的英文词）。

## Files（文件说明）

| File | Size | Notes |
|---|---|---|
| `zh_en-suxin-light.int8-excldec.onnx` | 67.3 MB | 默认图。QDQ int8，解码器 `/dec/` 与时长链路保浮点 |
| `zh_en-suxin-light.int8-excldec.onnx.json` | 6 KB | 音素表，22.05 kHz；`inference.*` 是 Piper 默认值，运行时覆盖 |
| `zh_en-suxin-light.onnx` | 87.7 MB | fp32 原图 |
| `zh_en-suxin-light.onnx.json` | 6 KB | 同音素表 |
| `suxin_tts/` | — | 前端与合成器 |
| `infer.py` | — | CLI（`suxin-tts` 的薄封装） |
| `pyproject.toml` / `uv.lock` | — | uv 工程 |

不要全图 int8：会毁掉 iSTFT 头，并把 `length_scale` 钳在校准值上。本图排除解码器、时长链路及 `scales` 消费节点。

`.onnx` 与代码同目录；`uv sync` 只装 Python 包，不会搬权重，请在本目录运行或传 `--model-dir`。

## Install

模型下载：`git clone` 本仓库即可（ONNX 图随仓库提供）；国内环境也可用魔搭 SDK 拉取，把 `<模型ID>` 换成发布后的 ID：

```python
from modelscope import snapshot_download
snapshot_download('<模型ID>', local_dir='suxin-light')
```

Python 3.10+（`.python-version` 即 3.10，与板子一致；此版本下锁文件钉住 `onnxruntime==1.23.2`，这是最后支持 cp310 的版本）。

```bash
uv sync
uv run suxin-tts "请到三号窗口办理 registration。" -o out.wav
```

`piper-tts>=1.3` 自带 `EspeakPhonemizer` 与 espeak-ng 数据。测试：`uv sync --group dev && uv run pytest`。不用 uv 时：`pip install -r requirements.txt && python infer.py`。fp32 图：`--model zh_en-suxin-light.onnx`。

```python
from suxin_tts import SuxinTTS

tts = SuxinTTS.from_pretrained(".")          # 目录下需有 .onnx 与 .onnx.json
audio = tts.synthesize_long("检验报告显示您的 blood sugar 偏高。")
# float32 mono, 22050 Hz
```

LLM token 流（与板子同策略，首句在首个逗号处切开）：

```python
async def tokens():
    for ch in "您的检验报告已经出来了，blood sugar 指标偏高。":
        yield ch

async for chunk in tts.synthesize_stream_from_tokens(tokens()):
    ...  # chunk: float32, 22050 Hz
```

## Runtime defaults（推荐运行参数）

以下是 Python 默认值，与 `.onnx.json` 内的数字不同：

| Knob | Value | Why |
|---|---|---|
| `noise_scale` / `noise_w` | `0.0` / `0.0` | int8 在 Piper 的 0.667 / 0.8 下易出噪 |
| `pad_mode` | `group` | PAD 只在声调/标点/空格后；Piper 的 `each` 会破坏本模型 |
| `use_lang_tags` | `false` | `<zh>`/`<en>` 改变时长，且训练 ID 里没有 |
| `normalize_audio` | `false` | RMS 增益会让短句发糊 |
| `aggressive_first_sentence` | `true` | 约 6 字或首个逗号即产首包 |
| threads | 4（8×A55） | 给 ASR/VAD/KWS 留核；6 线程负载下反而变慢 |

中文语境里的数字按汉字读（`请到3号窗口`），纯英文数字走 espeak（`in his 30s`）。

## Quality（音质指标）

缓存后验上的解码器复合成（130 句配对 dev），即蒸馏目标，非走 prior 的端到端 TTS：

| | log-mel | log-STFT |
|---|---|---|
| HiFi-GAN teacher (256) | 0.314 | 0.745 |
| **Suxin-Light (this repo)** | **0.328** | **0.759** |

x86 单线程 RTF：fp32 0.034，int8-excldec 0.026。

## 常见问题（FAQ）

**需要 GPU / NPU 吗？** 不需要。纯 CPU 推理：ARM 8 核 Cortex-A55 上 4 线程 6 倍实时；x86 单线程 RTF fp32 0.034 / int8 0.026。NPU 可以完整留给视觉或其他模型。

**支持中英混读吗，中文里夹英文单词会读错吗？** 支持。按 Unicode 脚本切分中英文片段，中文走 pypinyin、英文走 espeak-ng，PAD 只在音节 / 词末插入，不用手工切句或改写文本。

**可以流式合成吗，首包延迟多少？** 可以，token 边到边合成。端到端首包中位 828 ms（短句最快 501 ms），TTS 纯推理首包 571 ms。

**能部署在树莓派、RK3588 等其他板卡吗？** 只要目标平台有 ONNX Runtime、能跑 int8 算子即可；本仓库数据在 8 核 Cortex-A55 上实测，其他板卡未逐一验证。

**能直接用 piper-tts 加载吗？** 不能。`phoneme_type: mixed` 不在标准 piper-tts 的支持列表里，需要本仓库自带的前端。

**支持声音克隆 / 多说话人吗？** 不支持，这是单说话人播报音色，没有零样本克隆能力。

**怎么量化成 int8？** 不能全图 int8（会毁掉 iSTFT 头并把语速控制钳死），需排除波形通路（解码器 `/dec/`）、时长链路及 `scales` 消费节点；本仓库已提供排除好的图。

**可以商用吗？** 权重与推理代码为 MIT；英文 G2P 经 `piper-tts` 引入 espeak-ng（GPL-3.0），详见 `LICENSE`。

## Citation

```bibtex
@article{he2026suxin,
  title   = {Suxin-Light: Cached Latent Distillation and Monotone Phase Decoding
             for On-Device Bilingual Text-to-Speech},
  author  = {He, Zongping},
  year    = {2026}
}
```

## Acknowledgements

- [Piper](https://github.com/OHF-Voice/piper1-gpl) — VITS 引擎（GPL-3.0）
- [Fun-CosyVoice3](https://github.com/FunAudioLLM/CosyVoice) — 教师模型
- [espeak-ng](https://github.com/espeak-ng/espeak-ng)、[pypinyin](https://github.com/mozillazg/python-pinyin)
- ONNX Runtime

## License

权重与本推理代码为 MIT；英文 G2P 经 `piper-tts` 引入 espeak-ng（GPL-3.0）。见 `LICENSE`。
