微信扫码
添加专属顾问
我要投稿
import ChatTTSfrom IPython.display import Audiochat = ChatTTS.Chat()chat.load_models(compile=False) # Set to True for better performancetexts = ["PUT YOUR TEXT HERE",]wavs = chat.infer(texts, )torchaudio.save("output1.wav", torch.from_numpy(wavs[0]), 24000)#################################### Sample a speaker from Gaussian.rand_spk = chat.sample_random_speaker()params_infer_code = {'spk_emb': rand_spk, # add sampled speaker'temperature': .3, # using custom temperature'top_P': 0.7, # top P decode'top_K': 20, # top K decode}#################################### For sentence level manual control.# use oral_(0-9), laugh_(0-2), break_(0-7)# to generate special token in text to synthesize.params_refine_text = {'prompt': '[oral_2][laugh_0][break_6]'}wav = chat.infer(texts, params_refine_text=params_refine_text, params_infer_code=params_infer_code)#################################### For word level manual control.text = 'What is [uv_break]your favorite english food?[laugh][lbreak]'wav = chat.infer(text, skip_refine_text=True, params_refine_text=params_refine_text, params_infer_code=params_infer_code)torchaudio.save("output2.wav", torch.from_numpy(wavs[0]), 24000)https://colab.research.google.com/github/Kedreamix/ChatTTS/blob/main/ChatTTS_infer.ipynb#scrollTo=_xrONBIj9oxo53AI,企业落地大模型首选服务商
产品:场景落地咨询+大模型应用平台+行业解决方案
承诺:免费POC验证,效果达标后再合作。零风险落地应用大模型,已交付160+中大型企业
2026-01-25
AI编程能力70天就翻倍,B2B软件企业的护城河在哪?
2026-01-24
试用 Pomelli - Google Labs 推出的 AI 营销工具
2026-01-19
阿里AI直连购物车,超越谷歌、OpenAI率先走向商业履约
2026-01-11
2026 年是个临界点:利用 AI 工具的 1 人公司或小规模公司能创造数百万美元的收入
2025-12-31
Manus的结局,正在重塑中国AI应用创业的4条生存法则
2025-12-22
AI热点选品:当推荐系统遇上“热点”,我们需要一场变革
2025-12-17
这15个n8n工作流,直接干掉了90%的跨境电商营销工作
2025-12-07
基于多 Agent 协作的智能营销闭环:洞察、触达与转化
2025-11-21
2025-12-17
2025-11-06
2025-12-04
2026-01-11
2025-12-07
2025-11-21
2025-11-05
2025-12-22
2025-11-21
2026-01-25
2025-09-30
2025-06-26
2025-06-15
2025-06-03
2025-05-29
2025-05-26
2025-05-22