diff --git a/tools/i18n/locale/en_US.json b/tools/i18n/locale/en_US.json index 8ef3daf..45e486b 100644 --- a/tools/i18n/locale/en_US.json +++ b/tools/i18n/locale/en_US.json @@ -37,6 +37,8 @@ "情感控制方式": "Emotion control method", "GPT2 采样设置": "GPT-2 Sampling Configuration", "参数会影响音频多样性和生成速度详见": "Influence both the diversity of the generated audio and the generation speed. For further details, refer to", + "是否进行采样": "Enable GPT-2 sampling", + "生成Token最大数量,过小导致音频被截断": "Maximum number of tokens to generate. If text exceeds this, the audio will be cut off.", "请上传情感参考音频": "Please upload emotion reference audio", "当前模型版本": "Current model version ", "请输入目标文本": "Please input text to synthesize", diff --git a/tools/i18n/locale/zh_CN.json b/tools/i18n/locale/zh_CN.json index 26a7596..95aaf56 100644 --- a/tools/i18n/locale/zh_CN.json +++ b/tools/i18n/locale/zh_CN.json @@ -36,5 +36,7 @@ "Token数": "Token数", "情感控制方式": "情感控制方式", "GPT2 采样设置": "GPT2 采样设置", - "参数会影响音频多样性和生成速度详见": "参数会影响音频多样性和生成速度详见" + "参数会影响音频多样性和生成速度详见": "参数会影响音频多样性和生成速度详见", + "是否进行采样": "是否进行采样", + "生成Token最大数量,过小导致音频被截断": "生成Token最大数量,过小导致音频被截断" } \ No newline at end of file diff --git a/webui.py b/webui.py index fbd3a51..13fecf8 100644 --- a/webui.py +++ b/webui.py @@ -209,9 +209,9 @@ with gr.Blocks(title="IndexTTS Demo") as demo: with gr.Accordion(i18n("高级生成参数设置"), open=False): with gr.Row(): with gr.Column(scale=1): - gr.Markdown(f"**{i18n('GPT2 采样设置')}** _{i18n('参数会影响音频多样性和生成速度详见')}[Generation strategies](https://huggingface.co/docs/transformers/main/en/generation_strategies)_") + gr.Markdown(f"**{i18n('GPT2 采样设置')}** _{i18n('参数会影响音频多样性和生成速度详见')} [Generation strategies](https://huggingface.co/docs/transformers/main/en/generation_strategies)._") with gr.Row(): - do_sample = gr.Checkbox(label="do_sample", value=True, info="是否进行采样") + do_sample = gr.Checkbox(label="do_sample", value=True, info=i18n("是否进行采样")) temperature = gr.Slider(label="temperature", minimum=0.1, maximum=2.0, value=0.8, step=0.1) with gr.Row(): top_p = gr.Slider(label="top_p", minimum=0.0, maximum=1.0, value=0.8, step=0.01) @@ -220,7 +220,7 @@ with gr.Blocks(title="IndexTTS Demo") as demo: with gr.Row(): repetition_penalty = gr.Number(label="repetition_penalty", precision=None, value=10.0, minimum=0.1, maximum=20.0, step=0.1) length_penalty = gr.Number(label="length_penalty", precision=None, value=0.0, minimum=-2.0, maximum=2.0, step=0.1) - max_mel_tokens = gr.Slider(label="max_mel_tokens", value=1500, minimum=50, maximum=tts.cfg.gpt.max_mel_tokens, step=10, info="生成Token最大数量,过小导致音频被截断", key="max_mel_tokens") + max_mel_tokens = gr.Slider(label="max_mel_tokens", value=1500, minimum=50, maximum=tts.cfg.gpt.max_mel_tokens, step=10, info=i18n("生成Token最大数量,过小导致音频被截断"), key="max_mel_tokens") # with gr.Row(): # typical_sampling = gr.Checkbox(label="typical_sampling", value=False, info="不建议使用") # typical_mass = gr.Slider(label="typical_mass", value=0.9, minimum=0.0, maximum=1.0, step=0.1)