HuggingFace镜像/OmniVoice
模型介绍
文件和版本
分析

OmniVoice 🌍

OmniVoice

Hugging Face Model   Hugging Face Space     GitHub Code     Open In Colab

OmniVoice 是一款大规模多语言零样本文本转语音(TTS)模型,支持超过 600 种语言。它基于创新的扩散语言模型架构构建,能够生成高质量语音,同时具备出色的推理速度,并支持声音克隆与声音设计功能。

  • 论文:OmniVoice: Towards Omnilingual Zero-Shot Text-to-Speech with Diffusion Language Models
  • 代码库:GitHub
  • 演示:Hugging Face Space
  • Colab:Google Colab Notebook

核心特性

  • 支持 600+ 种语言:在零样本 TTS 模型中覆盖最广泛的语言范围。
  • 声音克隆:仅需简短参考音频,即可实现业界领先的声音克隆质量。
  • 声音设计:通过指定说话人属性(性别、年龄、音调、方言/口音、耳语等)控制语音。
  • 精细控制:支持非语言符号(如 [laughter])以及通过拼音或音素进行发音校正。
  • 快速推理:实时因子(RTF)低至 0.025(比实时快 40 倍)。
  • 扩散语言模型架构:设计简洁、高效且可扩展,兼顾语音质量与生成速度。

使用方法

首先,请安装 omnivoice 库:

我们建议使用全新的虚拟环境(例如 conda、venv 等)以避免冲突。

步骤 1:安装 PyTorch

NVIDIA GPU
# Install pytorch with your CUDA version, e.g.
pip install torch==2.8.0+cu128 torchaudio==2.8.0+cu128 --extra-index-url https://download.pytorch.org/whl/cu128

其他版本的安装方法请参见 PyTorch 官方网站。

Apple Silicon
pip install torch==2.8.0 torchaudio==2.8.0

步骤 2:安装 OmniVoice

pip install omnivoice

Python API

您可以按以下方式将 OmniVoice 用于零样本语音克隆:

from omnivoice import OmniVoice
import soundfile as sf
import torch

# Load the model
model = OmniVoice.from_pretrained(
    "k2-fsa/OmniVoice",
    device_map="cuda:0",
    dtype=torch.float16
)

# Generate audio
audio = model.generate(
    text="Hello, this is a test of zero-shot voice cloning.",
    ref_audio="ref.wav",
    ref_text="Transcription of the reference audio.",
) # audio is a list of `np.ndarray` with shape (T,) at 24 kHz.

sf.write("out.wav", audio[0], 24000)

如需了解更多生成模式(例如语音设计)、功能(例如非语言符号、发音纠正)以及全面的使用说明,请参阅我们的 GitHub 仓库。

讨论与交流

您可以直接在 GitHub Issues 上进行讨论。

您也可以扫描二维码加入我们的微信群或关注我们的微信公众号。

微信群微信公众号
wechatwechat

引用

@article{zhu2026omnivoice,
      title={OmniVoice: Towards Omnilingual Zero-Shot Text-to-Speech with Diffusion Language Models},
      author={Zhu, Han and Ye, Lingxuan and Kang, Wei and Yao, Zengwei and Guo, Liyong and Kuang, Fangjun and Han, Zhifeng and Zhuang, Weiji and Lin, Long and Povey, Daniel},
      journal={arXiv preprint arXiv:2604.00688},
      year={2026}
}

许可协议

我们的代码基于 Apache 2.0 许可协议发布。由于训练数据(例如 Emilia)的限制,预训练模型采用 CC-BY-NC 许可协议。

免责声明

严禁用户将本模型用于未授权的声音克隆、声音模仿、欺诈、诈骗或任何其他非法或不道德活动。所有用户应确保完全遵守适用的当地法律法规和道德标准。开发者对本模型的任何误用不承担责任,并倡导负责任的 AI 开发与使用,鼓励社区在 AI 研究和应用中坚守安全与道德原则。