ChatTTS Cog model

June 2, 2024 · View on GitHub

Replicate

This is an implementation of the ChatTTS as a Cog model.

First, download the pre-trained weights:

cog run script/download-weights 

Then, you can run predictions:

cog predict -i text="Hello world" -i voice=2222 -i custom_voice=0 -i skip_refine=0 -i temperature=0.3 -i top_p=0.7 -i top_k=20 -i prompt=""

Parameters:

ParameterTypeRequiredDefaultDescription
textstrYes-The text to be synthesized into speech.
voiceintNo2222A number that determines the voice tone. Options are 2222, 7869, 6653, 4099, 5099. You can choose one of these options, or pass in any number for random selection.
promptstrNoEmptyThis sets laughter, pauses, etc., for example, [oral_2][laugh_0][break_6].
temperaturefloatNo0.3Temperature value for sampling.
top_pfloatNo0.7Top p value for nucleus sampling.
top_kintNo20Top k value for top-k sampling.
skip_refineintNo01 means to skip text refining, 0 means not to skip.
custom_voiceintNo0Seed value for custom voice tone generation, must be a positive integer. If set, it will take precedence and the voice parameter will be ignored.

ChatTTS Cog 模型

Replicate

这是一个 ChatTTS 的 Cog 模型实现。

首先,下载预训练权重:

cog run script/download-weights 

然后,你可以运行预测:

cog predict -i text="Hello world" -i voice=2222 -i custom_voice=0 -i skip_refine=0 -i temperature=0.3 -i top_p=0.7 -i top_k=20 -i prompt=""

参数说明:

参数名类型必填默认值描述
textstr-要合成为语音的文本。
voiceint2222用于确定声音音调的数字。选项有 2222、7869、6653、4099、5099。你可以选择其中一个选项,或者传递任何数字进行随机选择。
promptstr设置笑声、停顿等。例如,[oral_2][laugh_0][break_6]
temperaturefloat0.3采样时的温度值。
top_pfloat0.7核心采样的 top p 值。
top_kint20top-k 采样的 top k 值。
skip_refineint01 表示跳过文本精炼,0 表示不跳过。
custom_voiceint0用于定制声音音调生成的种子值,必须是正整数。如果设置了这个值,将优先使用,并忽略 voice 参数。