resemble-ai/chatterbox

GitHub: resemble-ai/chatterbox

Resemble AI 开源的文本转语音模型系列,支持零样本声音克隆、23种语言及副语言标签,Turbo 版实现单步高质量生成。

Stars: 23634 | Forks: 3129

![Chatterbox Turbo 图片](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/d7961202d4111955.jpg) # Chatterbox TTS [![Alt Text](https://img.shields.io/badge/listen-demo_samples-blue)](https://resemble-ai.github.io/chatterbox_turbo_demopage/) [![Alt Text](https://huggingface.co/datasets/huggingface/badges/resolve/main/open-in-hf-spaces-sm.svg)](https://huggingface.co/spaces/ResembleAI/chatterbox-turbo-demo) [![Alt Text](https://static-public.podonos.com/badges/insight-on-pdns-sm-dark.svg)](https://podonos.com/resembleai/chatterbox) [![Discord](https://img.shields.io/discord/1377773249798344776?label=join%20discord&logo=discord&style=flat)](https://discord.gg/rJq9cRJBJ6) *由 * resemble-logo-horizontal *用心制作* **Chatterbox** 是由 Resemble AI 开发的一系列最先进开源 text-to-speech 模型。 我们很高兴推出 **Chatterbox-Turbo**,这是我们迄今为止最高效的模型。**Turbo** 基于精简的 350M 参数架构构建,与之前的模型相比,只需更少的计算量和 VRAM 即可提供高质量的语音。我们还蒸馏了 speech-token-to-mel 解码器(之前的瓶颈),将生成步骤从 10 步减少到仅 **一步**,同时保持高保真的音频输出。 **Paralinguistic tags** 现已成为 Turbo 模型的原生功能,允许您使用 `[cough]`、`[laugh]`、`[chuckle]` 等标签来增加独特的真实感。虽然 Turbo 主要是为低延迟语音代理构建的,但它在旁白和创意工作流程方面也表现出色。 如果您喜欢该模型,但需要扩展或调整它以提高准确性,请查看我们价格具有竞争力的 TTS 服务 (链接)。它提供可靠的性能,延迟低于 200ms——非常适合代理、应用程序或交互式媒体中的生产使用。 Podonos Turbo Eval ### ⚡ Model Zoo 为您的应用程序选择合适的模型。 | 模型 | 大小 | 语言 | 关键特性 | 最适用于 | 🤗 | 示例 | |:----------------------------------------------------------------------------------------------------------------| :--- | :--- |:--------------------------------------------------------|:---------------------------------------------|:--------------------------------------------------------------------------| :--- | | **Chatterbox-Turbo** | **350M** | **英语** | Paralinguistic 标签 (`[laugh]`),更低的计算量和 VRAM | 零样本语音代理,生产环境 | [Demo](https://huggingface.co/spaces/ResembleAI/chatterbox-turbo-demo) | [收听](https://resemble-ai.github.io/chatterbox_turbo_demopage/) | | Chatterbox-Multilingual [(语言列表)](#supported-languages) | 500M | 23+ | 零样本克隆,多语言 | 全球应用程序,本地化 | [Demo](https://huggingface.co/spaces/ResembleAI/Chatterbox-Multilingual-TTS) | [收听](https://resemble-ai.github.io/chatterbox_demopage/) | | Chatterbox [(技巧与窍门)](#original-chatterbox-tips) | 500M | 英语 | CFG 和夸张度调节 | 具有创意控制的通用零样本 TTS | [Demo](https://huggingface.co/spaces/ResembleAI/Chatterbox) | [收听](https://resemble-ai.github.io/chatterbox_demopage/) | ## 安装 ``` pip install chatterbox-tts ``` 或者,您可以从源代码安装: ``` # conda create -yn chatterbox python=3.11 # conda activate chatterbox git clone https://github.com/resemble-ai/chatterbox.git cd chatterbox pip install -e . ``` 我们在 Debian 11 操作系统上使用 Python 3.11 开发并测试了 Chatterbox;依赖项的版本已在 `pyproject.toml` 中锁定以确保一致性。您可以在此安装模式下修改代码或依赖项。 ## 用法 ##### Chatterbox-Turbo ``` import torchaudio as ta import torch from chatterbox.tts_turbo import ChatterboxTurboTTS # 加载 Turbo model model = ChatterboxTurboTTS.from_pretrained(device="cuda") # 使用 Paralinguistic Tags 生成 text = "Hi there, Sarah here from MochaFone calling you back [chuckle], have you got one minute to chat about the billing issue?" # 生成音频(需要 reference clip 用于 voice cloning) wav = model.generate(text, audio_prompt_path="your_10s_ref_clip.wav") ta.save("test-turbo.wav", wav, model.sr) ``` ##### Chatterbox 和 Chatterbox-Multilingual ``` import torchaudio as ta from chatterbox.tts import ChatterboxTTS from chatterbox.mtl_tts import ChatterboxMultilingualTTS # 英语示例 model = ChatterboxTTS.from_pretrained(device="cuda") text = "Ezreal and Jinx teamed up with Ahri, Yasuo, and Teemo to take down the enemy's Nexus in an epic late-game pentakill." wav = model.generate(text) ta.save("test-english.wav", wav, model.sr) # 多语言示例 multilingual_model = ChatterboxMultilingualTTS.from_pretrained(device=device) french_text = "Bonjour, comment ça va? Ceci est le modèle de synthèse vocale multilingue Chatterbox, il prend en charge 23 langues." wav_french = multilingual_model.generate(french_text, language_id="fr") ta.save("test-french.wav", wav_french, model.sr) chinese_text = "你好,今天天气真不错,希望你有一个愉快的周末。" wav_chinese = multilingual_model.generate(chinese_text, language_id="zh") ta.save("test-chinese.wav", wav_chinese, model.sr) # 如果你想使用不同的声音进行合成,请指定 audio prompt AUDIO_PROMPT_PATH = "YOUR_FILE.wav" wav = model.generate(text, audio_prompt_path=AUDIO_PROMPT_PATH) ta.save("test-2.wav", wav, model.sr) ``` 请参阅 `example_tts.py` 和 `example_vc.py` 获取更多示例。 ## 支持的语言 阿拉伯语 • 丹麦语 • 德语 • 希腊语 • 英语 • 西班牙语 • 芬兰语 • 法语 • 希伯来语 • 印地语 • 意大利语 • 日语 • 韩语 • 马来语 • 荷兰语 • 挪威语 • 波兰语 • 葡萄牙语 • 俄语 • 瑞典语 • 斯瓦希里语 • 土耳其语 • 中文 ## 原版 Chatterbox 技巧 - **一般用途(TTS 和语音代理):** - 确保参考音频片段与指定的语言标签匹配。否则,语言迁移输出可能会继承参考片段语言的口音。为了缓解这种情况,请将 `cfg_weight` 设置为 `0`。 - 默认设置(`exaggeration=0.5`,`cfg_weight=0.5`)适用于所有语言的大多数提示。 - 如果参考说话人的语速较快,将 `cfg_weight` 降低到 `0.3` 左右可以改善节奏。 - **表现力强或戏剧性的语音:** - 尝试较低的 `cfg_weight` 值(例如 `~0.3`)并将 `exaggeration` 增加到 `0.7` 或更高。 - 较高的 `exaggeration` 往往会加快语速;降低 `cfg_weight` 有助于通过较慢、更从容的节奏来补偿。 ## 内置 PerTh 水印用于负责任的 AI Chatterbox 生成的每个音频文件都包含 [Resemble AI 的 Perth (感知阈值) 水印器](https://github.com/resemble-ai/perth) —— 这种不可感知的神经水印可以经受 MP3 压缩、音频编辑和常见操作,同时保持几乎 100% 的检测准确率。 ## 水印提取 您可以使用以下脚本查找水印。 ``` import perth import librosa AUDIO_PATH = "YOUR_FILE.wav" # 加载 watermarked audio watermarked_audio, sr = librosa.load(AUDIO_PATH, sr=None) # 初始化 watermarker(与用于嵌入的相同) watermarker = perth.PerthImplicitWatermarker() # 提取 watermark watermark = watermarker.get_watermark(watermarked_audio, sample_rate=sr) print(f"Extracted watermark: {watermark}") # 输出:0.0(无 watermark)或 1.0(watermarked) ``` ## 官方 Discord 👋 加入我们的 [Discord](https://discord.gg/rJq9cRJBJ6),让我们一起构建一些很棒的东西! ## 评估 Chatterbox Turbo 使用 Podonos 进行了评估,这是一个用于可重现的主观语音评估的平台。 我们使用 Podonos 的标准化评估套件将 Chatterbox Turbo 与有竞争力的 TTS 系统进行了比较,重点关注整体偏好、自然度和表现力。 评估报告: - [Chatterbox Turbo vs ElevenLabs Turbo v2.5](https://podonos.com/resembleai/chatterbox-turbo-vs-elevenlabs-turbo) - [Chatterbox Turbo vs Cartesia Sonic 3](https://podonos.com/resembleai/chatterbox-turbo-vs-cartesia-sonic3) - [Chatterbox Turbo vs VibeVoice 7B](https://podonos.com/resembleai/chatterbox-turbo-vs-vibevoice7b) 这些评估是在相同条件下进行的,可通过 Podonos 公开访问。 ## 致谢 - [Podonos](https://podonos.com) — 支持可重现的主观语音评估 - [Cosyvoice](https://github.com/FunAudioLLM/CosyVoice) - [Real-Time-Voice-Cloning](https://github.com/CorentinJ/Real-Time-Voice-Cloning) - [HiFT-GAN](https://github.com/yl4579/HiFTNet) - [Llama 3](https://github.com/meta-llama/llama3) - [S3Tokenizer](https://github.com/xingchensong/S3Tokenizer) ## 引用 如果您觉得这个模型有用,请考虑引用。 ``` @misc{chatterboxtts2025, author = {{Resemble AI}}, title = {{Chatterbox-TTS}}, year = {2025}, howpublished = {\url{https://github.com/resemble-ai/chatterbox}}, note = {GitHub repository} } ``` ## 免责声明 不要使用此模型做坏事。提示源自互联网上免费可用的数据。
标签:AI语音, Chatterbox, DLL 劫持, Hugging Face, IPv6支持, ResembleAI, SoTA, Transformer, TTS, Turbo模型, Vectored Exception Handling, VRAM优化, 人工智能, 人机交互, 低延迟, 凭据扫描, 副语言标签, 参数架构, 大语言模型, 实时语音, 开源模型, 扩散模型, 数字人, 文本转语音, 有声读物, 深度学习, 用户模式Hook绕过, 语音助手, 语音合成, 语音生成, 逆向工具, 音频生成