
微软删除官方推理代码后,社区补上的完整 MLX 实现。支持 1.5B/7B 语音合成、零样本语音克隆、量化加速。
背景
2025 年9 月,微软以"负责任 AI 使用"为由删除了 VibeVoice-TTS 的官方推理代码。Hugging Face 上的模型权重仍在,但没有人能跑起来。
这个社区项目补上了完整的 TTS 推理管道。
技术栈
| 组件 | 说明 |
|---|---|
generate.py | 自回归 token 生成 + DPM-Solver++ 2M diffusion |
e2e_pipeline.py | 端到端管道(文本 → 音频),含语音克隆 |
model.py | Qwen2.5 backbone + diffusion head + KV Cache |
streaming_vae.py | VAE decoder(latents → 波形) |
vae_encoder.py | 参考音频编码(用于 voice cloning) |
支持的模型
| 模型 | 大小 | 来源 |
|---|---|---|
| vibevoice-1.5b-mlx | 4.7 GB | microsoft/VibeVoice-1.5B |
| vibevoice-7b-mlx | 18 GB | vibevoice/VibeVoice-7B |
快速开始
git clone https://github.com/gafiatulin/vibevoice-mlx && cd vibevoice-mlx
uv sync
# 基础合成
uv run vibevoice-mlx --text "Hello, world!" --output hello.wav
# 语音克隆
uv run vibevoice-mlx --ref-audio speaker.wav --text "Clone this voice" --output cloned.wav
# 量化加速
uv run vibevoice-mlx --quantize 8 --text "Test"
性能(M4 Max 64GB)
| 配置 | RTF | 峰值内存 |
|---|---|---|
| fp16 | 1.85x | 6.7 GB |
| int8 | 2.63x | 5.4 GB |
| int4 | 2.72x | 4.6 GB |
RTF > 1 意味着比实时更快。1.5B 在 Mac Studio 上完全毫无压力。
关键特性
- 零样本语音克隆:只需 10 秒参考音频
- 多说话人:支持多个参考音频切换
- 纯 MLX:无 PyTorch 依赖,Apple Silicon 专用
- 语音嵌入可缓存:先 encode 语音,后续反复使用
链接
暂无评论
