[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-2noise--ChatTTS":3,"tool-2noise--ChatTTS":61},[4,18,26,36,44,53],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",147882,2,"2026-04-09T11:32:47",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":32,"last_commit_at":42,"category_tags":43,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",108111,"2026-04-08T11:23:26",[14,15,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":32,"last_commit_at":50,"category_tags":51,"status":17},4721,"markitdown","microsoft\u002Fmarkitdown","MarkItDown 是一款由微软 AutoGen 团队打造的轻量级 Python 工具，专为将各类文件高效转换为 Markdown 格式而设计。它支持 PDF、Word、Excel、PPT、图片（含 OCR）、音频（含语音转录）、HTML 乃至 YouTube 链接等多种格式的解析，能够精准提取文档中的标题、列表、表格和链接等关键结构信息。\n\n在人工智能应用日益普及的今天，大语言模型（LLM）虽擅长处理文本，却难以直接读取复杂的二进制办公文档。MarkItDown 恰好解决了这一痛点，它将非结构化或半结构化的文件转化为模型“原生理解”且 Token 效率极高的 Markdown 格式，成为连接本地文件与 AI 分析 pipeline 的理想桥梁。此外，它还提供了 MCP（模型上下文协议）服务器，可无缝集成到 Claude Desktop 等 LLM 应用中。\n\n这款工具特别适合开发者、数据科学家及 AI 研究人员使用，尤其是那些需要构建文档检索增强生成（RAG）系统、进行批量文本分析或希望让 AI 助手直接“阅读”本地文件的用户。虽然生成的内容也具备一定可读性，但其核心优势在于为机器",93400,"2026-04-06T19:52:38",[52,14],"插件",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":10,"last_commit_at":59,"category_tags":60,"status":17},4487,"LLMs-from-scratch","rasbt\u002FLLMs-from-scratch","LLMs-from-scratch 是一个基于 PyTorch 的开源教育项目，旨在引导用户从零开始一步步构建一个类似 ChatGPT 的大型语言模型（LLM）。它不仅是同名技术著作的官方代码库，更提供了一套完整的实践方案，涵盖模型开发、预训练及微调的全过程。\n\n该项目主要解决了大模型领域“黑盒化”的学习痛点。许多开发者虽能调用现成模型，却难以深入理解其内部架构与训练机制。通过亲手编写每一行核心代码，用户能够透彻掌握 Transformer 架构、注意力机制等关键原理，从而真正理解大模型是如何“思考”的。此外，项目还包含了加载大型预训练权重进行微调的代码，帮助用户将理论知识延伸至实际应用。\n\nLLMs-from-scratch 特别适合希望深入底层原理的 AI 开发者、研究人员以及计算机专业的学生。对于不满足于仅使用 API，而是渴望探究模型构建细节的技术人员而言，这是极佳的学习资源。其独特的技术亮点在于“循序渐进”的教学设计：将复杂的系统工程拆解为清晰的步骤，配合详细的图表与示例，让构建一个虽小但功能完备的大模型变得触手可及。无论你是想夯实理论基础，还是为未来研发更大规模的模型做准备",90106,"2026-04-06T11:19:32",[35,15,13,14],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":66,"readme_en":67,"readme_zh":68,"quickstart_zh":69,"use_case_zh":70,"hero_image_url":71,"owner_login":72,"owner_name":72,"owner_avatar_url":73,"owner_bio":74,"owner_company":75,"owner_location":75,"owner_email":75,"owner_twitter":76,"owner_website":77,"owner_url":78,"languages":79,"stars":92,"forks":93,"last_commit_at":94,"license":95,"difficulty_score":10,"env_os":96,"env_gpu":97,"env_ram":98,"env_deps":99,"category_tags":110,"github_topics":112,"view_count":10,"oss_zip_url":75,"oss_zip_packed_at":75,"status":17,"created_at":128,"updated_at":129,"faqs":130,"releases":166},5908,"2noise\u002FChatTTS","ChatTTS","A generative speech model for daily dialogue.","ChatTTS 是一款专为日常对话场景打造的生成式语音模型，特别适用于大语言模型助手等交互式应用。它主要解决了传统文本转语音（TTS）技术在对话中缺乏自然感、情感表达单一以及难以处理停顿、笑声等细微语气的问题，让机器生成的语音听起来更像真人在聊天。\n\n这款工具非常适合开发者、研究人员以及希望为应用增添自然语音交互功能的设计师使用。普通用户也可以通过社区开发的衍生产品体验其能力。ChatTTS 的核心亮点在于其对对话任务的深度优化：它不仅支持中英文双语，还能精准控制韵律细节，自动生成自然的 laughter（笑声）、pauses（停顿）和 interjections（插入语），从而实现多说话人的互动对话效果。在韵律表现上，ChatTTS 超越了大多数开源 TTS 模型。目前开源版本基于 4 万小时数据预训练而成，虽主要用于学术研究与教育目的，但已展现出强大的潜力，并支持流式音频生成与零样本推理，为后续的多情绪控制等进阶功能奠定了基础。","\u003Cdiv align=\"center\">\n\n\u003Ca href=\"https:\u002F\u002Ftrendshift.io\u002Frepositories\u002F10489\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002F2noise_ChatTTS_readme_4a68feb902da.png\" alt=\"2noise%2FChatTTS | Trendshift\" style=\"width: 250px; height: 55px;\" width=\"250\" height=\"55\"\u002F>\u003C\u002Fa>\n\n# ChatTTS\nA generative speech model for daily dialogue.\n\n[![Licence](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002F2noise\u002FChatTTS?style=for-the-badge)](https:\u002F\u002Fgithub.com\u002F2noise\u002FChatTTS\u002Fblob\u002Fmain\u002FLICENSE)\n[![PyPI](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002FChatTTS.svg?style=for-the-badge&color=green)](https:\u002F\u002Fpypi.org\u002Fproject\u002FChatTTS)\n\n[![Huggingface](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F🤗%20-Models-yellow.svg?style=for-the-badge)](https:\u002F\u002Fhuggingface.co\u002F2Noise\u002FChatTTS)\n[![Open In Colab](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FColab-F9AB00?style=for-the-badge&logo=googlecolab&color=525252)](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002F2noise\u002FChatTTS\u002Fblob\u002Fmain\u002Fexamples\u002Fipynb\u002Fcolab.ipynb)\n[![Discord](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDiscord-7289DA?style=for-the-badge&logo=discord&logoColor=white)](https:\u002F\u002Fdiscord.gg\u002FUd5Jxgx5yD)\n\n**English** | [**简体中文**](docs\u002Fcn\u002FREADME.md) | [**日本語**](docs\u002Fjp\u002FREADME.md) | [**Русский**](docs\u002Fru\u002FREADME.md) | [**Español**](docs\u002Fes\u002FREADME.md) | [**Français**](docs\u002Ffr\u002FREADME.md) | [**한국어**](docs\u002Fkr\u002FREADME.md)\n\n\u003C\u002Fdiv>\n\n## Introduction\n> [!Note]\n> This repo contains the algorithm infrastructure and some simple examples.\n\n> [!Tip]\n> For the extended end-user products, please refer to the index repo [Awesome-ChatTTS](https:\u002F\u002Fgithub.com\u002Flibukai\u002FAwesome-ChatTTS\u002Ftree\u002Fen) maintained by the community.  \n> You can find a diagram visualization of the codebase [here](https:\u002F\u002Fgithub.com\u002FCodeBoarding\u002FGeneratedOnBoardings\u002Fblob\u002Fmain\u002FChatTTS\u002Fon_boarding.md).\n\nChatTTS is a text-to-speech model designed specifically for dialogue scenarios such as LLM assistant.\n\n### Supported Languages\n- [x] English\n- [x] Chinese\n- [ ] Coming Soon...\n\n### Highlights\n> You can refer to **[this video on Bilibili](https:\u002F\u002Fwww.bilibili.com\u002Fvideo\u002FBV1zn4y1o7iV)** for the detailed description.\n\n1. **Conversational TTS**: ChatTTS is optimized for dialogue-based tasks, enabling natural and expressive speech synthesis. It supports multiple speakers, facilitating interactive conversations.\n2. **Fine-grained Control**: The model could predict and control fine-grained prosodic features, including laughter, pauses, and interjections. \n3. **Better Prosody**: ChatTTS surpasses most of open-source TTS models in terms of prosody. We provide pretrained models to support further research and development.\n\n### Dataset & Model\n> [!Important]\n> The released model is for academic purposes only.\n\n- The main model is trained with Chinese and English audio data of 100,000+ hours.\n- The open-source version on **[HuggingFace](https:\u002F\u002Fhuggingface.co\u002F2Noise\u002FChatTTS)** is a 40,000 hours pre-trained model without SFT.\n\n### Roadmap\n- [x] Open-source the 40k-hours-base model and spk_stats file.\n- [x] Streaming audio generation.\n- [x] Open-source DVAE encoder and zero shot inferring code.\n- [ ] Multi-emotion controlling.\n- [ ] ChatTTS.cpp (new repo in `2noise` org is welcomed)\n\n### Licenses\n\n#### The Code\n\nThe code is published under `AGPLv3+` license.\n\n#### The model\n\nThe model is published under `CC BY-NC 4.0` license. It is intended for educational and research use, and should not be used for any commercial or illegal purposes. The authors do not guarantee the accuracy, completeness, or reliability of the information. The information and data used in this repo, are for academic and research purposes only. The data obtained from publicly available sources, and the authors do not claim any ownership or copyright over the data.\n\n### Disclaimer\n\nChatTTS is a powerful text-to-speech system. However, it is very important to utilize this technology responsibly and ethically. To limit the use of ChatTTS, we added a small amount of high-frequency noise during the training of the 40,000-hour model, and compressed the audio quality as much as possible using MP3 format, to prevent malicious actors from potentially using it for criminal purposes. At the same time, we have internally trained a detection model and plan to open-source it in the future.\n\n### Contact\n> GitHub issues\u002FPRs are always welcomed.\n\n#### Formal Inquiries\nFor formal inquiries about the model and roadmap, please contact us at **open-source@2noise.com**.\n\n#### Online Chat\n##### 1. QQ Group (Chinese Social APP)\n- **Group 1**, 808364215\n- **Group 2**, 230696694\n- **Group 3**, 933639842\n- **Group 4**, 608667975\n\n##### 2. Discord Server\nJoin by clicking [here](https:\u002F\u002Fdiscord.gg\u002FUd5Jxgx5yD).\n\n## Get Started\n### Clone Repo\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002F2noise\u002FChatTTS\ncd ChatTTS\n```\n\n### Install requirements\n#### 1. Install Directly\n```bash\npip install --upgrade -r requirements.txt\n```\n\n#### 2. Install from conda\n```bash\nconda create -n chattts python=3.11\nconda activate chattts\npip install -r requirements.txt\n```\n\n#### Optional: Install vLLM (Linux only)\n```bash\npip install safetensors vllm==0.2.7 torchaudio\n```\n\n#### Unrecommended Optional: Install TransformerEngine if using NVIDIA GPU (Linux only)\n> [!Warning]\n> DO NOT INSTALL! \n> The adaptation of TransformerEngine is currently under development and CANNOT run properly now. \n> Only install it on developing purpose. See more details on at #672 #676\n\n> [!Note]\n> The installation process is very slow.\n\n```bash\npip install git+https:\u002F\u002Fgithub.com\u002FNVIDIA\u002FTransformerEngine.git@stable\n```\n\n#### Unrecommended Optional: Install FlashAttention-2 (mainly NVIDIA GPU)\n> [!Warning]\n> DO NOT INSTALL! \n> Currently the FlashAttention-2 will slow down the generating speed according to [this issue](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftransformers\u002Fissues\u002F26990). \n> Only install it on developing purpose.\n\n> [!Note]\n> See supported devices at the [Hugging Face Doc](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftransformers\u002Fperf_infer_gpu_one#flashattention-2).\n\n\n```bash\npip install flash-attn --no-build-isolation\n```\n\n### Quick Start\n> Make sure you are under the project root directory when you execute these commands below.\n\n#### 1. Launch WebUI\n```bash\npython examples\u002Fweb\u002Fwebui.py\n```\n\n#### 2. Infer by Command Line\n> It will save audio to `.\u002Foutput_audio_n.mp3`\n\n```bash\npython examples\u002Fcmd\u002Frun.py \"Your text 1.\" \"Your text 2.\"\n```\n\n## Installation\n\n1. Install the stable version from PyPI\n```bash\npip install ChatTTS\n```\n\n2. Install the latest version from GitHub\n```bash\npip install git+https:\u002F\u002Fgithub.com\u002F2noise\u002FChatTTS\n```\n\n3. Install from local directory in dev mode\n```bash\npip install -e .\n```\n\n### Basic Usage\n\n```python\nimport ChatTTS\nimport torch\nimport torchaudio\n\nchat = ChatTTS.Chat()\nchat.load(compile=False) # Set to True for better performance\n\ntexts = [\"PUT YOUR 1st TEXT HERE\", \"PUT YOUR 2nd TEXT HERE\"]\n\nwavs = chat.infer(texts)\n\nfor i in range(len(wavs)):\n    \"\"\"\n    In some versions of torchaudio, the first line works but in other versions, so does the second line.\n    \"\"\"\n    try:\n        torchaudio.save(f\"basic_output{i}.wav\", torch.from_numpy(wavs[i]).unsqueeze(0), 24000)\n    except:\n        torchaudio.save(f\"basic_output{i}.wav\", torch.from_numpy(wavs[i]), 24000)\n```\n\n### Advanced Usage\n\n```python\n###################################\n# Sample a speaker from Gaussian.\n\nrand_spk = chat.sample_random_speaker()\nprint(rand_spk) # save it for later timbre recovery\n\nparams_infer_code = ChatTTS.Chat.InferCodeParams(\n    spk_emb = rand_spk, # add sampled speaker \n    temperature = .3,   # using custom temperature\n    top_P = 0.7,        # top P decode\n    top_K = 20,         # top K decode\n)\n\n###################################\n# For sentence level manual control.\n\n# use oral_(0-9), laugh_(0-2), break_(0-7) \n# to generate special token in text to synthesize.\nparams_refine_text = ChatTTS.Chat.RefineTextParams(\n    prompt='[oral_2][laugh_0][break_6]',\n)\n\nwavs = chat.infer(\n    texts,\n    params_refine_text=params_refine_text,\n    params_infer_code=params_infer_code,\n)\n\n###################################\n# For word level manual control.\n\ntext = 'What is [uv_break]your favorite english food?[laugh][lbreak]'\nwavs = chat.infer(text, skip_refine_text=True, params_refine_text=params_refine_text,  params_infer_code=params_infer_code)\n\"\"\"\nIn some versions of torchaudio, the first line works but in other versions, so does the second line.\n\"\"\"\ntry:\n    torchaudio.save(\"word_level_output.wav\", torch.from_numpy(wavs[0]).unsqueeze(0), 24000)\nexcept:\n    torchaudio.save(\"word_level_output.wav\", torch.from_numpy(wavs[0]), 24000)\n```\n\n\u003Cdetails open>\n  \u003Csummary>\u003Ch4>Example: self introduction\u003C\u002Fh4>\u003C\u002Fsummary>\n\n```python\ninputs_en = \"\"\"\nchat T T S is a text to speech model designed for dialogue applications. \n[uv_break]it supports mixed language input [uv_break]and offers multi speaker \ncapabilities with precise control over prosodic elements like \n[uv_break]laughter[uv_break][laugh], [uv_break]pauses, [uv_break]and intonation. \n[uv_break]it delivers natural and expressive speech,[uv_break]so please\n[uv_break] use the project responsibly at your own risk.[uv_break]\n\"\"\".replace('\\n', '') # English is still experimental.\n\nparams_refine_text = ChatTTS.Chat.RefineTextParams(\n    prompt='[oral_2][laugh_0][break_4]',\n)\n\naudio_array_en = chat.infer(inputs_en, params_refine_text=params_refine_text)\ntorchaudio.save(\"self_introduction_output.wav\", torch.from_numpy(audio_array_en[0]), 24000)\n```\n\n\u003Ctable>\n\u003Ctr>\n\u003Ctd align=\"center\">\n\n**male speaker**\n\n\u003C\u002Ftd>\n\u003Ctd align=\"center\">\n\n**female speaker**\n\n\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd align=\"center\">\n\n[male speaker](https:\u002F\u002Fgithub.com\u002F2noise\u002FChatTTS\u002Fassets\u002F130631963\u002Fe0f51251-db7f-4d39-a0e9-3e095bb65de1)\n\n\u003C\u002Ftd>\n\u003Ctd align=\"center\">\n\n[female speaker](https:\u002F\u002Fgithub.com\u002F2noise\u002FChatTTS\u002Fassets\u002F130631963\u002Ff5dcdd01-1091-47c5-8241-c4f6aaaa8bbd)\n\n\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftable>\n\n\n\u003C\u002Fdetails>\n\n## FAQ\n\n#### 1. How much VRAM do I need? How about infer speed?\nFor a 30-second audio clip, at least 4GB of GPU memory is required. For the 4090 GPU, it can generate audio corresponding to approximately 7 semantic tokens per second. The Real-Time Factor (RTF) is around 0.3.\n\n#### 2. Model stability is not good enough, with issues such as multi speakers or poor audio quality.\n\nThis is a problem that typically occurs with autoregressive models (for bark and valle). It's generally difficult to avoid. One can try multiple samples to find a suitable result.\n\n#### 3. Besides laughter, can we control anything else? Can we control other emotions?\n\nIn the current released model, the only token-level control units are `[laugh]`, `[uv_break]`, and `[lbreak]`. In future versions, we may open-source models with additional emotional control capabilities.\n\n## Acknowledgements\n- [bark](https:\u002F\u002Fgithub.com\u002Fsuno-ai\u002Fbark), [XTTSv2](https:\u002F\u002Fgithub.com\u002Fcoqui-ai\u002FTTS) and [valle](https:\u002F\u002Farxiv.org\u002Fabs\u002F2301.02111) demonstrate a remarkable TTS result by an autoregressive-style system.\n- [fish-speech](https:\u002F\u002Fgithub.com\u002Ffishaudio\u002Ffish-speech) reveals capability of GVQ as audio tokenizer for LLM modeling.\n- [vocos](https:\u002F\u002Fgithub.com\u002Fgemelo-ai\u002Fvocos) which is used as a pretrained vocoder.\n\n## Special Appreciation\n- [wlu-audio lab](https:\u002F\u002Faudio.westlake.edu.cn\u002F) for early algorithm experiments.\n\n## Thanks to all contributors for their efforts\n[![contributors](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002F2noise_ChatTTS_readme_409d38d89152.png)](https:\u002F\u002Fgithub.com\u002F2noise\u002FChatTTS\u002Fgraphs\u002Fcontributors)\n\n\u003Cdiv align=\"center\">\n\n  ![counter](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002F2noise_ChatTTS_readme_73497b04f9dc.png)\n\n\u003C\u002Fdiv>\n","\u003Cdiv align=\"center\">\n\n\u003Ca href=\"https:\u002F\u002Ftrendshift.io\u002Frepositories\u002F10489\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002F2noise_ChatTTS_readme_4a68feb902da.png\" alt=\"2noise%2FChatTTS | Trendshift\" style=\"width: 250px; height: 55px;\" width=\"250\" height=\"55\"\u002F>\u003C\u002Fa>\n\n# ChatTTS\n一款用于日常对话的生成式语音模型。\n\n[![许可证](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002F2noise\u002FChatTTS?style=for-the-badge)](https:\u002F\u002Fgithub.com\u002F2noise\u002FChatTTS\u002Fblob\u002Fmain\u002FLICENSE)\n[![PyPI](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002FChatTTS.svg?style=for-the-badge&color=green)](https:\u002F\u002Fpypi.org\u002Fproject\u002FChatTTS)\n\n[![HuggingFace](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F🤗%20-Models-yellow.svg?style=for-the-badge)](https:\u002F\u002Fhuggingface.co\u002F2Noise\u002FChatTTS)\n[![在Colab中打开](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FColab-F9AB00?style=for-the-badge&logo=googlecolab&color=525252)](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002F2noise\u002FChatTTS\u002Fblob\u002Fmain\u002Fexamples\u002Fipynb\u002Fcolab.ipynb)\n[![Discord](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDiscord-7289DA?style=for-the-badge&logo=discord&logoColor=white)](https:\u002F\u002Fdiscord.gg\u002FUd5Jxgx5yD)\n\n**English** | [**简体中文**](docs\u002Fcn\u002FREADME.md) | [**日本語**](docs\u002Fjp\u002FREADME.md) | [**Русский**](docs\u002Fru\u002FREADME.md) | [**Español**](docs\u002Fes\u002FREADME.md) | [**Français**](docs\u002Ffr\u002FREADME.md) | [**한국어**](docs\u002Fkr\u002FREADME.md)\n\n\u003C\u002Fdiv>\n\n## 简介\n> [!注意]\n> 此仓库包含算法基础设施和一些简单的示例。\n\n> [!提示]\n> 对于面向最终用户的扩展产品，请参考社区维护的索引仓库 [Awesome-ChatTTS](https:\u002F\u002Fgithub.com\u002Flibukai\u002FAwesome-ChatTTS\u002Ftree\u002Fen)。  \n> 您可以在此处找到代码库的图示化说明：[这里](https:\u002F\u002Fgithub.com\u002FCodeBoarding\u002FGeneratedOnBoardings\u002Fblob\u002Fmain\u002FChatTTS\u002Fon_boarding.md)。\n\nChatTTS 是一款专为 LLM 助手等对话场景设计的文本转语音模型。\n\n### 支持的语言\n- [x] 英语\n- [x] 中文\n- [ ] 即将支持...\n\n### 特点\n> 详细描述请参阅 **[哔哩哔哩上的这段视频](https:\u002F\u002Fwww.bilibili.com\u002Fvideo\u002FBV1zn4y1o7iV)**。\n\n1. **对话型 TTS**：ChatTTS 针对对话任务进行了优化，能够生成自然且富有表现力的语音。它支持多说话人，便于进行交互式对话。\n2. **细粒度控制**：该模型可以预测并控制细粒度的韵律特征，包括笑声、停顿和插入语等。\n3. **更好的韵律表现**：ChatTTS 在韵律表现上超越了大多数开源 TTS 模型。我们提供了预训练模型，以支持进一步的研究与开发。\n\n### 数据集与模型\n> [!重要]\n> 发布的模型仅用于学术研究目的。\n\n- 主要模型使用超过 10 万小时的中英文音频数据进行训练。\n- 在 **[HuggingFace](https:\u002F\u002Fhuggingface.co\u002F2Noise\u002FChatTTS)** 上的开源版本是一个未经过 SFT 微调的 4 万小时预训练模型。\n\n### 路线图\n- [x] 开源 4 万小时基础模型及 spk_stats 文件。\n- [x] 流式音频生成。\n- [x] 开源 DVAE 编码器和零样本推理代码。\n- [ ] 多情感控制。\n- [ ] ChatTTS.cpp（欢迎在 `2noise` 组织下创建新仓库）。\n\n### 许可证\n\n#### 代码\n代码采用 `AGPLv3+` 许可证发布。\n\n#### 模型\n模型采用 `CC BY-NC 4.0` 许可证发布。它仅供教育和科研使用，不得用于任何商业或非法目的。作者不保证信息的准确性、完整性或可靠性。本仓库中使用的信息和数据仅用于学术和科研目的。这些数据来源于公开可用的资源，作者不主张对这些数据拥有任何所有权或版权。\n\n### 免责声明\nChatTTS 是一个功能强大的文本转语音系统。然而，负责任且合乎道德地使用这项技术非常重要。为了限制 ChatTTS 的滥用，我们在训练 4 万小时模型时加入了一小部分高频噪声，并尽可能使用 MP3 格式压缩音频质量，以防止恶意行为者可能将其用于犯罪目的。同时，我们内部也训练了一个检测模型，计划在未来开源。\n\n### 联系方式\n> 欢迎随时提交 GitHub 问题或拉取请求。\n\n#### 正式咨询\n关于模型和路线图的正式咨询，请发送邮件至 **open-source@2noise.com**。\n\n#### 在线交流\n##### 1. QQ 群（中国社交应用）\n- **群 1**，808364215\n- **群 2**，230696694\n- **群 3**，933639842\n- **群 4**，608667975\n\n##### 2. Discord 服务器\n点击 [这里](https:\u002F\u002Fdiscord.gg\u002FUd5Jxgx5yD) 加入。\n\n## 快速开始\n### 克隆仓库\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002F2noise\u002FChatTTS\ncd ChatTTS\n```\n\n### 安装依赖\n#### 1. 直接安装\n```bash\npip install --upgrade -r requirements.txt\n```\n\n#### 2. 使用 conda 安装\n```bash\nconda create -n chattts python=3.11\nconda activate chattts\npip install -r requirements.txt\n```\n\n#### 可选：安装 vLLM（仅限 Linux）\n```bash\npip install safetensors vllm==0.2.7 torchaudio\n```\n\n#### 不推荐的可选：安装 TransformerEngine（仅限使用 NVIDIA GPU 的 Linux 用户）\n> [!警告]\n> 请勿安装！  \n> TransformerEngine 的适配目前仍在开发中，尚无法正常运行。  \n> 仅建议在开发环境中安装。更多信息请参见 #672 和 #676。\n\n> [!注]\n> 安装过程非常缓慢。\n\n```bash\npip install git+https:\u002F\u002Fgithub.com\u002FNVIDIA\u002FTransformerEngine.git@stable\n```\n\n#### 不推荐的可选：安装 FlashAttention-2（主要针对 NVIDIA GPU）\n> [!警告]\n> 请勿安装！  \n> 根据 [此问题](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftransformers\u002Fissues\u002F26990)，FlashAttention-2 会降低生成速度。  \n> 仅建议在开发环境中安装。\n\n> [!注]\n> 支持的设备请参阅 Hugging Face 文档：[这里](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftransformers\u002Fperf_infer_gpu_one#flashattention-2)。\n\n```bash\npip install flash-attn --no-build-isolation\n```\n\n### 快速入门\n> 请确保在执行以下命令时位于项目根目录下。\n\n#### 1. 启动 WebUI\n```bash\npython examples\u002Fweb\u002Fwebui.py\n```\n\n#### 2. 命令行推理\n> 生成的音频将保存到 `.\u002Foutput_audio_n.mp3`\n\n```bash\npython examples\u002Fcmd\u002Frun.py \"您的文本 1.\" \"您的文本 2.\"\n```\n\n## 安装\n1. 从 PyPI 安装稳定版\n```bash\npip install ChatTTS\n```\n\n2. 从 GitHub 安装最新版\n```bash\npip install git+https:\u002F\u002Fgithub.com\u002F2noise\u002FChatTTS\n```\n\n3. 以开发模式从本地目录安装\n```bash\npip install -e .\n```\n\n### 基本用法\n\n```python\nimport ChatTTS\nimport torch\nimport torchaudio\n\nchat = ChatTTS.Chat()\nchat.load(compile=False) # 设置为 True 以获得更好的性能\n\ntexts = [\"将您的第一条文本放在这里\", \"将您的第二条文本放在这里\"]\n\nwavs = chat.infer(texts)\n\nfor i in range(len(wavs)):\n    \"\"\"\n    在某些版本的 torchaudio 中，第一行代码有效；而在其他版本中，第二行代码同样有效。\n    \"\"\"\n    try:\n        torchaudio.save(f\"basic_output{i}.wav\", torch.from_numpy(wavs[i]).unsqueeze(0), 24000)\n    except:\n        torchaudio.save(f\"basic_output{i}.wav\", torch.from_numpy(wavs[i]), 24000)\n```\n\n### 进阶用法\n\n```python\n###################################\n# 从高斯分布中采样一位说话人。\n\nrand_spk = chat.sample_random_speaker()\nprint(rand_spk) # 保存它以便稍后恢复音色\n\nparams_infer_code = ChatTTS.Chat.InferCodeParams(\n    spk_emb = rand_spk, # 添加采样的说话人 \n    temperature = .3,   # 使用自定义温度\n    top_P = 0.7,        # top P 解码\n    top_K = 20,         # top K 解码\n)\n\n###################################\n# 用于句子级别的手动控制。\n\n# 使用 oral_(0-9), laugh_(0-2), break_(0-7) \n# 在文本中生成特殊标记以进行合成。\nparams_refine_text = ChatTTS.Chat.RefineTextParams(\n    prompt='[oral_2][laugh_0][break_6]',\n)\n\nwavs = chat.infer(\n    texts,\n    params_refine_text=params_refine_text,\n    params_infer_code=params_infer_code,\n)\n\n###################################\n# 用于词语级别的手动控制。\n\ntext = '什么是[uv_break]你最喜欢的英语食物？[laugh][lbreak]'\nwavs = chat.infer(text, skip_refine_text=True, params_refine_text=params_refine_text,  params_infer_code=params_infer_code)\n\"\"\"\n在某些版本的 torchaudio 中，第一行代码有效；而在其他版本中，第二行代码同样有效。\n\"\"\"\ntry:\n    torchaudio.save(\"word_level_output.wav\", torch.from_numpy(wavs[0]).unsqueeze(0), 24000)\nexcept:\n    torchaudio.save(\"word_level_output.wav\", torch.from_numpy(wavs[0]), 24000)\n```\n\n\u003Cdetails open>\n  \u003Csummary>\u003Ch4>示例：自我介绍\u003C\u002Fh4>\u003C\u002Fsummary>\n\n```python\ninputs_en = \"\"\"\nChat TTS 是一款专为对话应用设计的文本转语音模型。 \n[uv_break]它支持混合语言输入 [uv_break]并提供多说话人功能，\n同时可以精确控制韵律元素，例如 \n[uv_break]笑声[uv_break][laugh], [uv_break]停顿，[uv_break]以及语调。 \n[uv_break]它能够生成自然且富有表现力的语音,[uv_break]因此请\n[uv_break]您在自行承担风险的前提下负责任地使用该项目。[uv_break]\n\"\"\".replace('\\n', '') # 英文仍处于实验阶段。\n\nparams_refine_text = ChatTTS.Chat.RefineTextParams(\n    prompt='[oral_2][laugh_0][break_4]',\n)\n\naudio_array_en = chat.infer(inputs_en, params_refine_text=params_refine_text)\ntorchaudio.save(\"self_introduction_output.wav\", torch.from_numpy(audio_array_en[0]), 24000)\n```\n\n\u003Ctable>\n\u003Ctr>\n\u003Ctd align=\"center\">\n\n**男声**\n\n\u003C\u002Ftd>\n\u003Ctd align=\"center\">\n\n**女声**\n\n\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd align=\"center\">\n\n[男声](https:\u002F\u002Fgithub.com\u002F2noise\u002FChatTTS\u002Fassets\u002F130631963\u002Fe0f51251-db7f-4d39-a0e9-3e095bb65de1)\n\n\u003C\u002Ftd>\n\u003Ctd align=\"center\">\n\n[女声](https:\u002F\u002Fgithub.com\u002F2noise\u002FChatTTS\u002Fassets\u002F130631963\u002Ff5dcdd01-1091-47c5-8241-c4f6aaaa8bbd)\n\n\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftable>\n\n\n\u003C\u002Fdetails>\n\n## 常见问题解答\n\n#### 1. 我需要多少显存？推理速度如何？\n对于一段30秒的音频，至少需要4GB的显存。使用4090显卡时，大约每秒可以生成7个语义标记对应的音频。实时因子（RTF）约为0.3。\n\n#### 2. 模型稳定性不够，存在多说话人或音频质量不佳等问题。\n\n这通常是自回归模型（如 bark 和 valle）会遇到的问题，一般很难完全避免。可以通过多次尝试不同的参数来找到合适的结果。\n\n#### 3. 除了笑声之外，我们还能控制其他内容吗？能否控制其他情感？\n\n目前发布的模型中，仅支持 `[laugh]`、`[uv_break]` 和 `[lbreak]` 这三种基于标记级别的控制单元。未来版本中，我们可能会开源具备更多情感控制能力的模型。\n\n## 致谢\n- [bark](https:\u002F\u002Fgithub.com\u002Fsuno-ai\u002Fbark)、[XTTSv2](https:\u002F\u002Fgithub.com\u002Fcoqui-ai\u002FTTS) 和 [valle](https:\u002F\u002Farxiv.org\u002Fabs\u002F2301.02111) 展示了自回归式系统在文本转语音任务中的卓越成果。\n- [fish-speech](https:\u002F\u002Fgithub.com\u002Ffishaudio\u002Ffish-speech) 展现了 GVQ 作为音频分词器在大语言模型建模中的潜力。\n- [vocos](https:\u002F\u002Fgithub.com\u002Fgemelo-ai\u002Fvocos)，它被用作预训练的声码器。\n\n## 特别感谢\n- [wlu-audio lab](https:\u002F\u002Faudio.westlake.edu.cn\u002F) 在早期算法实验中的支持。\n\n## 感谢所有贡献者的努力\n[![contributors](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002F2noise_ChatTTS_readme_409d38d89152.png)](https:\u002F\u002Fgithub.com\u002F2noise\u002FChatTTS\u002Fgraphs\u002Fcontributors)\n\n\u003Cdiv align=\"center\">\n\n  ![counter](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002F2noise_ChatTTS_readme_73497b04f9dc.png)\n\n\u003C\u002Fdiv>","# ChatTTS 快速上手指南\n\nChatTTS 是一款专为对话场景（如大语言模型助手）生成的语音合成模型，支持中英文混合输入，能够自然表达笑声、停顿等细粒度情感特征。\n\n## 环境准备\n\n*   **操作系统**: Linux \u002F macOS \u002F Windows\n*   **Python 版本**: 推荐 Python 3.11\n*   **硬件要求**:\n    *   **GPU**: 推荐使用 NVIDIA GPU。生成 30 秒音频至少需要 4GB 显存。\n    *   **CPU**: 仅支持推理，速度较慢。\n*   **前置依赖**: Git, pip 或 conda\n\n## 安装步骤\n\n### 方式一：使用 Conda 创建虚拟环境（推荐）\n\n```bash\nconda create -n chattts python=3.11\nconda activate chattts\ngit clone https:\u002F\u002Fgithub.com\u002F2noise\u002FChatTTS\ncd ChatTTS\npip install --upgrade -r requirements.txt\n```\n\n> **提示**：国内用户若下载依赖缓慢，可配置清华源或阿里源：\n> `pip install -r requirements.txt -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple`\n\n### 方式二：直接通过 PyPI 安装（仅作为库使用）\n\n```bash\npip install ChatTTS\n```\n\n### 方式三：安装最新开发版\n\n```bash\npip install git+https:\u002F\u002Fgithub.com\u002F2noise\u002FChatTTS\n```\n\n> **注意**：请勿安装 `TransformerEngine` 或 `FlashAttention-2`，目前版本可能导致运行错误或速度变慢。\n\n## 基本使用\n\n### 1. 启动 WebUI 界面（最直观）\n\n在项目根目录下运行以下命令，即可在浏览器中操作：\n\n```bash\npython examples\u002Fweb\u002Fwebui.py\n```\n\n### 2. 命令行快速推理\n\n直接在终端输入文本生成音频，文件将保存为 `.\u002Foutput_audio_n.mp3`：\n\n```bash\npython examples\u002Fcmd\u002Frun.py \"你好，这是 ChatTTS 的测试声音。\" \"Welcome to ChatTTS.\"\n```\n\n### 3. Python 代码调用（基础示例）\n\n创建一个 `.py` 文件，写入以下代码即可快速体验：\n\n```python\nimport ChatTTS\nimport torch\nimport torchaudio\n\n# 初始化模型\nchat = ChatTTS.Chat()\n# 加载模型 (compile=True 可提升性能，但首次运行较慢)\nchat.load(compile=False) \n\n# 准备文本\ntexts = [\"你好，我是你的 AI 助手。\", \"今天天气真不错！\"]\n\n# 生成音频\nwavs = chat.infer(texts)\n\n# 保存音频\nfor i in range(len(wavs)):\n    try:\n        torchaudio.save(f\"output_{i}.wav\", torch.from_numpy(wavs[i]).unsqueeze(0), 24000)\n    except:\n        torchaudio.save(f\"output_{i}.wav\", torch.from_numpy(wavs[i]), 24000)\n    \nprint(\"音频已保存为 output_0.wav 和 output_1.wav\")\n```\n\n### 进阶技巧：控制语气与笑声\n\nChatTTS 支持通过特殊标记控制语调、笑声和停顿：\n\n```python\n# 定义带有控制标记的文本\n# [uv_break]: 短暂停顿，[laugh]: 笑声，[lbreak]: 长停顿\ntext = '你好[uv_break]很高兴见到你[laugh]。今天我们要聊点什么？[lbreak]'\n\n# 跳过文本优化，直接按标记生成\nwavs = chat.infer(text, skip_refine_text=True)\n\ntorchaudio.save(\"controlled_output.wav\", torch.from_numpy(wavs[0]), 24000)\n```","某独立游戏开发者正在为一款叙事驱动的冒险游戏制作 NPC 对话音频，需要让不同角色拥有自然且富有情感的语音表现。\n\n### 没有 ChatTTS 时\n- 开发者需聘请多位配音演员录制海量台词，成本高昂且协调档期困难，导致项目预算严重超支。\n- 传统 TTS 生成的语音机械生硬，缺乏日常对话中的呼吸感、停顿和语气变化，玩家极易出戏。\n- 无法灵活控制角色情绪细节（如突然的笑声或犹豫的插词），每次修改台词都需重新录制或调整复杂参数。\n- 多角色互动场景下，声音辨识度低，难以区分不同 NPC 的性格特征，削弱了剧情的沉浸感。\n\n### 使用 ChatTTS 后\n- 开发者仅需输入文本即可快速生成高质量语音，无需依赖真人录音，大幅降低制作成本并缩短开发周期。\n- ChatTTS 生成的语音具备极佳的韵律感，自动融入自然的停顿、笑声和语气词，使 NPC 对话如同真人般流畅生动。\n- 通过细粒度控制功能，可精准指定角色在特定语句中加入大笑、迟疑等情感表达，无需重新训练模型即可动态调整。\n- 支持多说话人模式，能轻松区分不同角色的音色与说话风格，显著增强多人对话场景的层次感与真实度。\n\nChatTTS 将原本昂贵且僵化的游戏配音流程，转变为高效、低成本且充满情感张力的创意生产过程。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002F2noise_ChatTTS_e899683c.png","2noise","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002F2noise_341e38b0.png","",null,"2_Noise_","2noise.com","https:\u002F\u002Fgithub.com\u002F2noise",[80,84,88],{"name":81,"color":82,"percentage":83},"Python","#3572A5",99.5,{"name":85,"color":86,"percentage":87},"Go","#00ADD8",0.4,{"name":89,"color":90,"percentage":91},"Shell","#89e051",0.1,39042,4233,"2026-04-09T11:54:03","AGPL-3.0","Linux","需要 NVIDIA GPU（推荐），生成 30 秒音频至少需要 4GB 显存；可选安装 vLLM、FlashAttention-2 或 TransformerEngine（仅限 Linux 和 NVIDIA GPU，但当前版本不建议安装 FlashAttention-2 和 TransformerEngine）","未说明",{"notes":100,"python":101,"dependencies":102},"模型仅用于学术和研究目的，禁止商业用途。官方建议通过 conda 创建 Python 3.11 环境进行安装。虽然代码架构支持跨平台，但部分加速选项（如 vLLM、TransformerEngine）仅限 Linux。生成 30 秒音频至少需要 4GB 显存，RTF 约为 0.3（在 4090 上）。模型包含高频噪声且音质被压缩以防滥用。","3.11",[103,104,105,106,107,108,109],"torch","torchaudio","transformers","vllm==0.2.7 (可选)","safetensors (可选)","flash-attn (可选，不推荐)","TransformerEngine (可选，开发用，不推荐)",[35,13,14,111],"音频",[113,114,115,116,117,118,119,120,121,122,123,124,125,126,103,104,127],"agent","text-to-speech","chat","chatgpt","chattts","chinese","chinese-language","english","english-language","gpt","llm","llm-agent","natural-language-inference","python","tts","2026-03-27T02:49:30.150509","2026-04-10T01:05:25.590634",[131,136,141,146,151,156,161],{"id":132,"question_zh":133,"answer_zh":134,"source_url":135},26929,"在 Windows 上安装时遇到 pynini 或 nemo_text_processing 报错怎么办？","pynini 无法直接在 Windows 原生环境中安装。解决方法有两种：\n1. **代码修改法（推荐）**：打开 `ChatTTS\u002Fcore.py` 文件，找到约第 143 行，注释掉后续涉及 nemo_text_processing 初始化的 7 行代码。\n2. **环境配置法**：使用 WSL 子系统，或通过 conda 安装特定版本：`conda install -c conda-forge pynini=2.1.5`，然后固定版本安装其他依赖：`pip install WeTextProcessing==1.0.2` 和 `pip install nemo_text_processing==1.0.2`。","https:\u002F\u002Fgithub.com\u002F2noise\u002FChatTTS\u002Fissues\u002F164",{"id":137,"question_zh":138,"answer_zh":139,"source_url":140},26930,"如何固定生成的音色，避免每次调用声音不一致？","需要通过设置随机种子来固定音色。具体步骤如下：\n1. 使用 `torch.manual_seed(SEED)` 设置种子（例如 6666）。\n2. 调用 `chat.sample_random_speaker()` 获取说话人嵌入。\n3. 将结果填入 `params_infer_code` 参数中。\n注意：`params_refine_text` 和 `params_infer_code` 需要配合使用才能在不同文本下保持音色相对稳定。示例代码：\n```python\ntorch.manual_seed(6666)\nparams_infer_code = {\n    'spk_emb': chat.sample_random_speaker(),\n    'temperature': 0.1,\n    'top_P': 0.7,\n    'top_K': 20,\n}\n```","https:\u002F\u002Fgithub.com\u002F2noise\u002FChatTTS\u002Fissues\u002F15",{"id":142,"question_zh":143,"answer_zh":144,"source_url":145},26931,"流式输出音频时出现噪音或爆破音如何解决？","流式输出产生噪音通常是因为音频分割后包含了全零窗口或格式问题。解决方案包括：\n1. **跳过全零窗口**：在每 0.25 秒的窗口检查一次，跳过全为 0 的音频片段，这样合并后的音频会更流畅。\n2. **代码修复**：该问题已在后续版本（如 PR #564）中修复，建议更新到最新开发版（dev 分支），其中增加了删除空白片段的逻辑。","https:\u002F\u002Fgithub.com\u002F2noise\u002FChatTTS\u002Fissues\u002F521",{"id":147,"question_zh":148,"answer_zh":149,"source_url":150},26932,"使用 Zero-shot（模拟特定说话人）功能时生成结果为时长 0 秒的噪音怎么办？","这通常是因为缺少必要的随机种子设置或参数配置不完整。在最新的 dev 版本中，`InferCodeParams` 类新增了 `manual_seed` 字段。请确保：\n1. 加载音频样本时使用正确的采样率（如 24000）。\n2. 在 `InferCodeParams` 中正确传入 `spk_smp`（说话人样本嵌入）和 `txt_smp`（样本文本）。\n3. 尝试手动设置 `manual_seed` 字段以稳定生成过程。","https:\u002F\u002Fgithub.com\u002F2noise\u002FChatTTS\u002Fissues\u002F648",{"id":152,"question_zh":153,"answer_zh":154,"source_url":155},26933,"模型支持哪些情感控制令牌（Emotional Tokens）？","目前官方文档中没有列出特定的情感令牌列表（如 [laugh], [cry] 等）。根据维护者的回复，控制语调和情感的主要方式是通过调整文本内容本身以及推理参数（如 temperature, top_P 等）。如果需要控制输出长度以避免错误，建议直接通过字符数或词数来智能切分输入文本，而不是依赖未公开的情感令牌。","https:\u002F\u002Fgithub.com\u002F2noise\u002FChatTTS\u002Fissues\u002F769",{"id":157,"question_zh":158,"answer_zh":159,"source_url":160},26934,"macOS (M1\u002FM2) 用户安装 WeTextProcessing 失败如何解决？","在 macOS ARM 架构（osx-arm64）上直接通过 pip 安装 WeTextProcessing 往往会因为编译 pynini 失败而报错。必须使用 conda 先行安装预编译的 pynini 包，命令如下：\n`conda install -c conda-forge pynini=2.1.5`\n安装成功后，再指定版本安装 WeTextProcessing：\n`pip install WeTextProcessing==1.0.2`\n切勿直接使用 `pip install WeTextProcessing`，否则会自动拉取源码编译导致失败。","https:\u002F\u002Fgithub.com\u002F2noise\u002FChatTTS\u002Fissues\u002F162",{"id":162,"question_zh":163,"answer_zh":164,"source_url":165},26935,"ChatTTS 对英语音色的支持情况如何？有哪些已知限制？","目前的英语音色支持尚不完善。已知问题包括：模型在处理字母缩写、型号代码（如 GGG, RX7FC3S, AE86）时容易读错（例如将 GGG 读成 GAG）或省略字母。社区已上传了大量英语音色供测试，但建议等待后续版本更新以获得更好的英语朗读效果。","https:\u002F\u002Fgithub.com\u002F2noise\u002FChatTTS\u002Fissues\u002F281",[167,172,177,182,187,192],{"id":168,"version":169,"summary_zh":170,"released_at":171},180030,"v0.2.4","### 新增\r\n- 在 `examples\u002Fapi` 中添加了基于 FastAPI、兼容 OpenAI 的文本转语音 API 及音频格式转换工具 (d582fd5) by @yueguobin \r\n- 支持 Numpy 2+ (1092c1f) by @BBC-Esq \r\n### 修复\r\n- 'torch.serialization' 模块中无属性 'FILE_LIKE' 的问题 (8c0707b) by @aibaoku \r\n\r\n---\r\n\r\n### 新增\r\n\r\n* 在 `examples\u002Fapi` 中添加了基于 FastAPI、兼容 OpenAI 的文本转语音 API 及音频格式转换工具 (d582fd5) by @yueguobin \r\n* 支持 Numpy 2+ (1092c1f) by @BBC-Esq \r\n\r\n### 修复\r\n\r\n* 'torch.serialization' 模块中无属性 'FILE_LIKE' 的问题 (8c0707b) by @aibaoku \r\n","2025-05-23T13:00:56",{"id":173,"version":174,"summary_zh":175,"released_at":176},180031,"v0.2.3","### 修复\n- 停止使用废弃的 transformers API get_max_length() (a500911) by @fumiama \n","2025-02-18T06:24:55",{"id":178,"version":179,"summary_zh":180,"released_at":181},180032,"v0.2.2","### 新增\n- 支持将 HuggingFace 模型下载到自定义路径 (#863) by @BBC-Esq \n- `examples\u002Fapi` 允许在不传入参数的情况下修正文本，并加载正则化器以处理中文数字 (#865) by @JaysonAlbert \n- 支持自定义本地下载路径 (fefc931) by @fumiama \n- 在长句推理中保持同一音色 (8d7bcf0) by @fumiama \n\n### 修复\n- 缺少模块名 \"tools.audio\" (#880) by @benknam \n\n### 优化\n- `load_audio` 性能 (c3948c8) by @fumiama\n","2025-01-25T12:50:37",{"id":183,"version":184,"summary_zh":185,"released_at":186},180033,"v0.2.1","### 新增\n- NPU 支持 (#777) by @shen-shanshan\n\n### 修复\n- 中文正则化器中缺少`remove_interjections` (#783) by @IrisSally\n\n### 优化\n- 为了兼容性，将 DVAE 中的 gamma 改为 weight (#733) by @zly-idleness\n- 将所有模型迁移到 safetensors (b9b007ef) by @fumiama\n\n--- \n\n### 新增\n- NPU 支持 (#777) by @shen-shanshan\n\n### 修复\n- 中文正则化器中缺少`remove_interjections` (#783) by @IrisSally\n\n### 优化\n- 为了兼容性，将 DVAE 中的 gamma 改为 weight (#733) by @zly-idleness\n- 将所有模型迁移到 safetensors (b9b007ef) by @fumiama\n","2024-11-05T05:14:41",{"id":188,"version":189,"summary_zh":190,"released_at":191},180034,"v0.2.0","### 新增\n- 简单的 HTTP API 示例 (#530) by @briancaffey \n- 命令行流式推理实例 (#512) by @ZaymeShaw \n- 批量 Vocos 解码（按最长 token 生成矩阵，其余填0） (6e18575) by @fumiama \n- 适配新 VQ Encoder (9f0b7a0) by @fumiama \n- ZeroShot 支持 (b4da237) by @fumiama \n- 初步支持 vLLM (8e6184e) by @ylzz1997 \n- 命令行示例增加`--source`和`--custom_path`参数 (#669) by @weedge \n- 为引入微调，给`Speaker`类增加`inplace`参数 (#679) by @ain-soph \n- 给`Chat.load`函数增加`experimental`参数 (#682) by @ain-soph \n### 修复\n- 流式推理的声音有间断性毛刺 (7ee5426) by @fumiama \n- WebUI 相同条件下音频生成每次不同 (3edd47c) by @fumiama \n- `normalizer`更改 tag 导致模型将 tag 读出 (c6bae90) by @fumiama \n- 更换已失效的 GitCode 镜像 (c06f1d45) by @fumiama \n- repetition penalty idx 处理错误 (#738) by @niuzheng168 \n### 优化\n- 彻底移除`pretrain_models`字典 (77c7e20) by @fumiama \n- 将`tokenizer`独立为一个类 (77c7e20) by @fumiama \n- `normalizer`将所有不","2024-10-09T15:10:44",{"id":193,"version":194,"summary_zh":195,"released_at":196},180035,"v0.1.1","### 新增\n- Apple MPS GPU (实验性, 默认不开启) (#261, #472) by @rasonyang \n- 替换生僻字（汉字） (#350) by @6drf21e \n- `local`加载模式，重命名原`local`到`custom` (#361) by @fumiama \n- core 支持流式推理 (#360) by @Ox0400 \n- webui 支持流式推理 (#380) by @v3ucn \n- 用户可自定义 logger (#398) by @fumiama \n- cmd 支持批量推理 (#366) by @Ox0400 \n- 可自定义 DVAE coef 参数 (#405) by @fumiama \n- `download_models` `unload` API (4dd1f88) by @fumiama \n- normalizer 改为注册式，用户可以自行注册符合要求的接口 (#420) by @fumiama \n- 完善类型注解，将所有dict传参改为dataclass，方便调用时自动补全 (#422) by @fumiama \n- 打断推理进程，返回当前已推理的部分 (#433) by @fumiama \n- **实验性**：NVIDIA TransformerEngine 支持 (#496) by @fumiama \n- infer 参数 `show_tqdm` (3836db8) by @fumiama \n- **实验性**：flash_attention_2 支持 (c109089) by @fumiama \n\n### 修复\n- Normalizer 初始化错误 (#343) by @fumiama \n- compile 错误处理 (#377, #413) by @asamaayako \n- refine_text() 时可能加入 `","2024-07-04T05:31:17"]