微信扫码
和创始人交个朋友
我要投稿
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=_xrONBIj9oxo
53AI,企业落地大模型首选服务商
产品:场景落地咨询+大模型应用平台+行业解决方案
承诺:免费场景POC验证,效果验证后签署服务协议。零风险落地应用大模型,已交付160+中大型企业
2025-02-21
用Grok、秘塔AI的Deep Research做股票网络调研
2025-02-20
全流程AI实现一个AIGC案例展示平台
2025-02-20
基于Multi-Agent的京东商家智能助手技术探索
2025-02-20
Excel重磅升级!零代码调用Deepseek自动处理表格!!
2025-02-20
扣子炸裂更新,轻松创建抖音 AI 分身,智能体将多场景落地抖音!
2025-02-19
Deepseek眼中的Martech(未经深思熟虑版)
2025-02-18
企服杂谈:接入DeepSeek,不如先想清楚这三件事
2025-02-18
面对大模型,SaaS厂商更难了
2024-12-25
2024-07-20
2024-07-18
2024-11-06
2024-11-02
2024-08-13
2024-07-25
2024-07-24
2024-07-16
2024-09-06