supertone-inc/supertonic
GitHub: supertone-inc/supertonic
基于 ONNX Runtime 的轻量级本地多语言文本转语音系统,无需云端和 GPU 即可在各类设备上实现高速语音合成。
Stars: 11314 | Forks: 1177
# Supertonic — 极速、本地运行、高精度 TTS
[](https://huggingface.co/spaces/Supertone/supertonic-3)
[](https://huggingface.co/Supertone/supertonic-3)
[](https://github.com/supertone-inc/supertonic/tree/release/supertonic-2)
[-Demo-lightgrey)](https://huggingface.co/spaces/Supertone/supertonic#interactive-demo)
[-Models-lightgrey)](https://huggingface.co/Supertone/supertonic)
### 技术细节
- **Runtime**: 采用 ONNX Runtime 进行跨平台推理
- **Browser 支持**: 使用 onnxruntime-web 进行客户端推理
- **批处理**: 支持批处理推理以提高吞吐量
- **音频输出**: 输出 16 位 WAV 文件
## 性能亮点
Supertonic 3 专为实用的本地推理而设计:体积小巧足以在本地运行,同时与更大型的开源 TTS 系统相比依然具有竞争力。
### 朗读准确率
`、`` 和 ``
- **灵活部署**: 跨 Python、JavaScript、浏览器、移动端和原生运行环境的现成示例
## 支持语言
Supertonic 3 支持 31 种语言:
| 代码 | 语言 | 代码 | 语言 | 代码 | 语言 | 代码 | 语言 |
|------|----------|------|----------|------|----------|------|----------|
| `en` | 英语 | `ko` | 韩语 | `ja` | 日语 | `ar` | 阿拉伯语 |
| `bg` | 保加利亚语 | `cs` | 捷克语 | `da` | 丹麦语 | `de` | 德语 |
| `el` | 希腊语 | `es` | 西班牙语 | `et` | 爱沙尼亚语 | `fi` | 芬兰语 |
| `fr` | 法语 | `hi` | 印地语 | `hr` | 克罗地亚语 | `hu` | 匈牙利语 |
| `id` | 印度尼西亚语 | `it` | 意大利语 | `lt` | 立陶宛语 | `lv` | 拉脱维亚语 |
| `nl` | 荷兰语 | `pl` | 波兰语 | `pt` | 葡萄牙语 | `ro` | 罗马尼亚语 |
| `ru` | 俄语 | `sk` | 斯洛伐克语 | `sl` | 斯洛文尼亚语 | `sv` | 瑞典语 |
| `tr` | 土耳其语 | `uk` | 乌克兰语 | `vi` | 越南语 | | |
我们跨多个生态系统提供了现成的 TTS 推理示例:
| 语言/平台 | 路径 | 描述 |
|-------------------|------|-------------|
| [**Python**](py/) | `py/` | ONNX Runtime 推理 |
| [**Node.js**](nodejs/) | `nodejs/` | 服务器端 JavaScript |
| [**Browser**](web/) | `web/` | WebGPU/WASM 推理 |
| [**Java**](java/) | `java/` | 跨平台 JVM |
| [**C++**](cpp/) | `cpp/` | 高性能 C++ |
| [**C#**](csharp/) | `csharp/` | .NET 生态系统 |
| [**Go**](go/) | `go/` | Go 实现 |
| [**Swift**](swift/) | `swift/` | macOS 应用程序 |
| [**iOS**](ios/) | `ios/` | 原生 iOS 应用 |
| [**Rust**](rust/) | `rust/` | 内存安全系统 |
| [**Flutter**](flutter/) | `flutter/` | 跨平台应用 |
## 自然语言处理
Supertonic 专为处理包含自然散文、标点符号、缩写和专有名词的复杂、真实文本输入而设计。
**测试用例概览:**
| 类别 | 主要挑战 | Supertonic | ElevenLabs | OpenAI | Gemini | Microsoft |
|:--------:|:--------------:|:----------:|:----------:|:------:|:------:|:---------:|
| 金融表达式 | 小数货币、缩写量级 (M, K)、货币符号、货币代码 | ✅ | ❌ | ❌ | ❌ | ❌ |
| 电话号码 | 区号、连字符、分机号 | ✅ | ❌ | ❌ | ❌ | ❌ |
| 技术单位 | 带小数的数字和单位、缩写技术符号 | ✅ | ❌ | ❌ | ❌ | ❌ |
**文本:** **挑战:** - 货币中的小数点($5.2M 应读作“five point two million”) - 缩写的量级单位(M 代表百万,K 代表千) - 货币符号 ($) 需要正确发音为“dollars” **音频样本:** | 系统 | 结果 | 音频样本 | |--------|--------|--------------| | **Supertonic** | ✅ | [🎧 播放音频](https://drive.google.com/file/d/1eancUOhiSXCVoTu9ddh4S-OcVQaWrPV-/view?usp=sharing) | | ElevenLabs Flash v2.5 | ❌ | [🎧 播放音频](https://drive.google.com/file/d/1-r2scv7XQ1crIDu6QOh3eqVl445W6ap_/view?usp=sharing) | | OpenAI TTS-1 | ❌ | [🎧 播放音频](https://drive.google.com/file/d/1MFDXMjfmsAVOqwPx7iveS0KUJtZvcwxB/view?usp=sharing) | | Gemini 2.5 Flash TTS | ❌ | [🎧 播放音频](https://drive.google.com/file/d/1dEHpNzfMUucFTJPQK0k4RcFZvPwQTt09/view?usp=sharing) | | VibeVoice Realtime 0.5B | ❌ | [🎧 放音频](https://drive.google.com/file/d/1b69XWBQnSZZ0WZeR3avv7E8mSdoN6p6P/view?usp=sharing) |
**文本:** **挑战:** - 括号中的区号应作为单独的数字读取 - 带有连字符分隔符的电话号码 (555-0142) - 缩写的分机号表示法 - 分机号码 (402) **音频样本:** | 系统 | 结果 | 音频样本 | |--------|--------|--------------| | **Supertonic** | ✅ | [🎧 播放音频](https://drive.google.com/file/d/1z-e5iTsihryMR8ll1-N1YXkB2CIJYJ6F/view?usp=sharing) | | ElevenLabs Flash v2.5 | ❌ | [🎧 播放音频](https://drive.google.com/file/d/1HAzVXFTZfZm0VEK2laSpsMTxzufcuaxA/view?usp=sharing) | | OpenAI TTS-1 | ❌ | [🎧 播放音频](https://drive.google.com/file/d/15tjfAmb3GbjP_kmvD7zSdIWkhtAaCPOg/view?usp=sharing) | | Gemini 2.5 Flash TTS | ❌ | [🎧 播放音频](https://drive.google.com/file/d/1BCL8n7yligUZyso970ud7Gf5NWb1OhKD/view?usp=sharing) | | VibeVoice Realtime 0.5B | ❌ | [🎧 播放音频](https://drive.google.com/file/d/1c0c0YM_Qm7XxSk2uSVYLbITgEDTqaVzL/view?usp=sharing) |
**文本:** **挑战:** - 带有缩写的小数持续时间 (2.3h = two point three hours) - 带有缩写的速度单位 (30kph = thirty kilometers per hour) - 技术缩写(h 代表小时,kph 代表每小时公里数) - 需要正确发音的技术/工程上下文 **音频样本:** | 系统 | 结果 | 音频样本 | |--------|--------|--------------| | **Supertonic** | ✅ | [🎧 播放音频](https://drive.google.com/file/d/1kvOBvswFkLfmr8hGplH0V2XiMxy1shYf/view?usp=sharing) | | ElevenLabs Flash v2.5 | ❌ | [🎧 播放音频](https://drive.google.com/file/d/1_SzfjWJe5YEd0t3R7DztkYhHcI_av48p/view?usp=sharing) | | OpenAI TTS-1 | ❌ | [🎧 播放音频](https://drive.google.com/file/d/1P5BSilj5xFPTV2Xz6yW5jitKZohO9o-6/view?usp=sharing) | | Gemini 2.5 Flash TTS | ❌ | [🎧 播放音频](https://drive.google.com/file/d/1GU82SnWC50OvC8CZNjhxvNZFKQb7I9_Y/view?usp=sharing) | | VibeVoice Realtime 0.5B | ❌ | [🎧 播放音频](https://drive.google.com/file/d/1lUTrxrAQy_viEK2Hlu3KLLtTCe8jvbdV/view?usp=sharing) |
## 基于 Supertonic 构建
| 项目 | 描述 | 链接 |
|---------|-------------|-------|
| **TLDRL** | 免费、本地运行的 TTS 扩展,用于朗读任何网页 | [Chrome](https://chromewebstore.google.com/detail/tldrl-lightning-tts-power/mdbiaajonlkomihpcaffhkagodbcgbme) |
| **Read Aloud** | 开源 TTS 浏览器扩展 | [Chrome](https://chromewebstore.google.com/detail/read-aloud-a-text-to-spee/hdhinadidafjejdhmfkjgnolgimiaplp) · [Edge](https://microsoftedge.microsoft.com/addons/detail/read-aloud-a-text-to-spe/pnfonnnmfjnpfgagnklfaccicnnjcdkm) · [GitHub](https://github.com/ken107/read-aloud) |
| **PageEcho** | iOS 上的电子书阅读器应用 | [App Store](https://apps.apple.com/us/app/pageecho/id6755965837) |
| **VoiceChat** | 浏览器中本地运行的端到端语音 LLM 聊天机器人 | [演示](https://huggingface.co/spaces/RickRossTN/ai-voice-chat) · [GitHub](https://github.com/irelate-ai/voice-chat) |
| **OmniAvatar** | 通过照片 + 语音生成会说话的头像视频 | [演示](https://huggingface.co/spaces/alexnasa/OmniAvatar) |
| **CopiloTTS** | 通过 ONNX Runtime 实现的 Kotlin 多平台 TTS SDK | [GitHub](https://github.com/sigmadeltasoftware/CopiloTTS) |
| **Voice Mixer** | 用于混合和修改语音风格的 PyQt5 工具 | [GitHub](https://github.com/Topping1/Supertonic-Voice-Mixer) |
| **Supertonic MNN** | 基于 MNN 的轻量级库 (fp32/fp16/int8) | [GitHub](https://github.com/vra/supertonic-mnn) · [PyPI](https://pypi.org/project/supertonic-mnn/) |
| **Transformers.js** | 支持 Supertonic 的 Hugging Face JS 库 | [GitHub PR](https://github.com/huggingface/transformers.js/pull/1459) · [演示](https://huggingface.co/spaces/webml-community/Supertonic-TTS-WebGPU) |
| **Pinokio** | 适用于 Mac、Windows 和 Linux 的一键式本地云 | [Pinokio](https://pinokio.co/) · [GitHub](https://github.com/SUP3RMASS1VE/SuperTonic-TTS) |
## 引用
以下论文描述了 Supertonic 中使用的核心技术。如果您在研究中使用了本系统,或发现这些技术非常有用,请考虑引用相关论文:
### SupertonicTTS:主要架构
本文介绍了 SupertonicTTS 的整体架构,包括语音自编码器、基于流匹配的文本到潜在表示模块以及高效的设计选择。
```
@article{kim2025supertonic,
title={SupertonicTTS: Towards Highly Efficient and Streamlined Text-to-Speech System},
author={Kim, Hyeongju and Yang, Jinhyeok and Yu, Yechan and Ji, Seunghun and Morton, Jacob and Bous, Frederik and Byun, Joon and Lee, Juheon},
journal={arXiv preprint arXiv:2503.23108},
year={2025},
url={https://arxiv.org/abs/2503.23108}
}
```
### Length-Aware RoPE:文本-语音对齐
本文介绍了 Length-Aware Rotary Position Embedding (LARoPE),它改进了交叉注意力机制中的文本-语音对齐。
```
@article{kim2025larope,
title={Length-Aware Rotary Position Embedding for Text-Speech Alignment},
author={Kim, Hyeongju and Lee, Juheon and Yang, Jinhyeok and Morton, Jacob},
journal={arXiv preprint arXiv:2509.11084},
year={2025},
url={https://arxiv.org/abs/2509.11084}
}
```
### Self-Purifying Flow Matching:含噪标签训练
本文描述了在使用有噪声或不可靠标签的情况下,稳健地训练流匹配模型的自净化技术。
```
@article{kim2025spfm,
title={Training Flow Matching Models with Reliable Labels via Self-Purification},
author={Kim, Hyeongju and Yu, Yechan and Yi, June Young and Lee, Juheon},
journal={arXiv preprint arXiv:2509.19091},
year={2025},
url={https://arxiv.org/abs/2509.19091}
}
```
## 许可证
本项目的示例代码在 MIT 许可证下发布。 - 详情请参见 [LICENSE](https://github.com/supertone-inc/supertonic?tab=MIT-1-ov-file)。
随附的模型在 OpenRAIL-M 许可证下发布。 - 详情请参见 [LICENSE](https://huggingface.co/Supertone/supertonic-3/blob/main/LICENSE) 文件。
此模型使用 PyTorch 进行训练,PyTorch 在 BSD 3-Clause 许可证下发布,但并未随本项目一起重新分发。 - 详情请参见 [LICENSE](https://docs.pytorch.org/FBGEMM/general/License.html)。
版权所有 (c) 2026 Supertone Inc.
在其他语言和平台中运行 Supertonic
**Node.js 示例** ([详情](nodejs/)) ``` cd nodejs npm install npm start ``` **Browser 示例** ([详情](web/)) ``` cd web npm install npm run dev ``` **Java 示例** ([详情](java/)) ``` cd java mvn clean install mvn exec:java ``` **C++ 示例** ([详情](cpp/)) ``` cd cpp mkdir build && cd build cmake .. && cmake --build . --config Release ./example_onnx ``` **C# 示例** ([详情](csharp/)) ``` cd csharp dotnet restore dotnet run ``` **Go 示例** ([详情](go/)) ``` cd go go mod download go run example_onnx.go helper.go ``` **Swift 示例** ([详情](swift/)) ``` cd swift swift build -c release .build/release/example_onnx ``` **Rust 示例** ([详情](rust/)) ``` cd rust cargo build --release ./target/release/example_onnx ``` **iOS 示例** ([详情](ios/)) ``` cd ios/ExampleiOSApp xcodegen generate open ExampleiOSApp.xcodeproj ``` 在 Xcode 中:Targets → ExampleiOSApp → Signing:选择你的 Team,然后选择你的 iPhone 作为运行目标并进行构建。
示例 1:金融表达式
**文本:** **挑战:** - 货币中的小数点($5.2M 应读作“five point two million”) - 缩写的量级单位(M 代表百万,K 代表千) - 货币符号 ($) 需要正确发音为“dollars” **音频样本:** | 系统 | 结果 | 音频样本 | |--------|--------|--------------| | **Supertonic** | ✅ | [🎧 播放音频](https://drive.google.com/file/d/1eancUOhiSXCVoTu9ddh4S-OcVQaWrPV-/view?usp=sharing) | | ElevenLabs Flash v2.5 | ❌ | [🎧 播放音频](https://drive.google.com/file/d/1-r2scv7XQ1crIDu6QOh3eqVl445W6ap_/view?usp=sharing) | | OpenAI TTS-1 | ❌ | [🎧 播放音频](https://drive.google.com/file/d/1MFDXMjfmsAVOqwPx7iveS0KUJtZvcwxB/view?usp=sharing) | | Gemini 2.5 Flash TTS | ❌ | [🎧 播放音频](https://drive.google.com/file/d/1dEHpNzfMUucFTJPQK0k4RcFZvPwQTt09/view?usp=sharing) | | VibeVoice Realtime 0.5B | ❌ | [🎧 放音频](https://drive.google.com/file/d/1b69XWBQnSZZ0WZeR3avv7E8mSdoN6p6P/view?usp=sharing) |
示例 2:电话号码
**文本:** **挑战:** - 括号中的区号应作为单独的数字读取 - 带有连字符分隔符的电话号码 (555-0142) - 缩写的分机号表示法 - 分机号码 (402) **音频样本:** | 系统 | 结果 | 音频样本 | |--------|--------|--------------| | **Supertonic** | ✅ | [🎧 播放音频](https://drive.google.com/file/d/1z-e5iTsihryMR8ll1-N1YXkB2CIJYJ6F/view?usp=sharing) | | ElevenLabs Flash v2.5 | ❌ | [🎧 播放音频](https://drive.google.com/file/d/1HAzVXFTZfZm0VEK2laSpsMTxzufcuaxA/view?usp=sharing) | | OpenAI TTS-1 | ❌ | [🎧 播放音频](https://drive.google.com/file/d/15tjfAmb3GbjP_kmvD7zSdIWkhtAaCPOg/view?usp=sharing) | | Gemini 2.5 Flash TTS | ❌ | [🎧 播放音频](https://drive.google.com/file/d/1BCL8n7yligUZyso970ud7Gf5NWb1OhKD/view?usp=sharing) | | VibeVoice Realtime 0.5B | ❌ | [🎧 播放音频](https://drive.google.com/file/d/1c0c0YM_Qm7XxSk2uSVYLbITgEDTqaVzL/view?usp=sharing) |
示例 3:技术单位
**文本:** **挑战:** - 带有缩写的小数持续时间 (2.3h = two point three hours) - 带有缩写的速度单位 (30kph = thirty kilometers per hour) - 技术缩写(h 代表小时,kph 代表每小时公里数) - 需要正确发音的技术/工程上下文 **音频样本:** | 系统 | 结果 | 音频样本 | |--------|--------|--------------| | **Supertonic** | ✅ | [🎧 播放音频](https://drive.google.com/file/d/1kvOBvswFkLfmr8hGplH0V2XiMxy1shYf/view?usp=sharing) | | ElevenLabs Flash v2.5 | ❌ | [🎧 播放音频](https://drive.google.com/file/d/1_SzfjWJe5YEd0t3R7DztkYhHcI_av48p/view?usp=sharing) | | OpenAI TTS-1 | ❌ | [🎧 播放音频](https://drive.google.com/file/d/1P5BSilj5xFPTV2Xz6yW5jitKZohO9o-6/view?usp=sharing) | | Gemini 2.5 Flash TTS | ❌ | [🎧 播放音频](https://drive.google.com/file/d/1GU82SnWC50OvC8CZNjhxvNZFKQb7I9_Y/view?usp=sharing) | | VibeVoice Realtime 0.5B | ❌ | [🎧 播放音频](https://drive.google.com/file/d/1lUTrxrAQy_viEK2Hlu3KLLtTCe8jvbdV/view?usp=sharing) |
标签:Hugging Face, JS文件枚举, MITM代理, NLP, ONNX, ONNX Runtime, Supertone, TTS, 人工智能, 凭据扫描, 可视化界面, 声音克隆, 多语言支持, 安全测试框架, 开源模型, 文本转语音, 无网络依赖, 日志审计, 本地推理, 深度学习, 用户模式Hook绕过, 端侧AI, 端侧推理, 网络安全, 语音合成, 语音生成, 轻量级模型, 边缘计算, 逆向工具, 隐私保护