[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-1293":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":44,"readmeContent":45,"aiSummary":46,"trendingCount":16,"starSnapshotCount":16,"syncStatus":47,"lastSyncTime":48,"discoverSource":49},1293,"ChatTTS","2noise\u002FChatTTS","2noise","A generative speech model for daily dialogue.","https:\u002F\u002F2noise.com",null,"Python",39430,4242,206,57,0,3,42,193,29,106,"GNU Affero General Public License v3.0",false,"main",true,[27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"agent","chat","chatgpt","chattts","chinese","chinese-language","english","english-language","gpt","llm","llm-agent","natural-language-inference","python","text-to-speech","torch","torchaudio","tts","2026-06-12 04:00:08","\u003Cdiv align=\"center\">\n\n\u003Ca href=\"https:\u002F\u002Ftrendshift.io\u002Frepositories\u002F10489\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Ftrendshift.io\u002Fapi\u002Fbadge\u002Frepositories\u002F10489\" 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\u002Fcontrib.rocks\u002Fimage?repo=2noise\u002FChatTTS)](https:\u002F\u002Fgithub.com\u002F2noise\u002FChatTTS\u002Fgraphs\u002Fcontributors)\n\n\u003Cdiv align=\"center\">\n\n  ![counter](https:\u002F\u002Fcounter.seku.su\u002Fcmoe?name=chattts&theme=mbs)\n\n\u003C\u002Fdiv>\n","ChatTTS 是一个专为日常对话设计的生成式语音模型。其核心功能包括优化的对话文本转语音能力，支持多说话人和自然流畅的语音合成，能够预测并控制细微的韵律特征如笑声、停顿等，从而在韵律表现上超越了许多开源TTS模型。技术上，该项目基于Python开发，利用了PyTorch和Torchaudio框架，并且提供了预训练模型以支持进一步的研究与开发。适用于需要高质量对话语音合成的应用场景，比如虚拟助手、客户服务机器人等。当前版本主要支持中文和英文两种语言。",2,"2026-06-11 02:42:53","top_all"]