mirror of
https://github.com/FunAudioLLM/CosyVoice.git
synced 2026-02-04 09:29:25 +08:00
remove instruct warning
This commit is contained in:
6
webui.py
6
webui.py
@@ -57,9 +57,6 @@ def generate_audio(tts_text, mode_checkbox_group, sft_dropdown, prompt_text, pro
|
||||
prompt_wav = None
|
||||
# if instruct mode, please make sure that model is iic/CosyVoice-300M-Instruct and not cross_lingual mode
|
||||
if mode_checkbox_group in ['自然语言控制']:
|
||||
if cosyvoice.instruct is False:
|
||||
gr.Warning('您正在使用自然语言控制模式, {}模型不支持此模式, 请使用iic/CosyVoice-300M-Instruct模型'.format(args.model_dir))
|
||||
yield (cosyvoice.sample_rate, default_data)
|
||||
if instruct_text == '':
|
||||
gr.Warning('您正在使用自然语言控制模式, 请输入instruct文本')
|
||||
yield (cosyvoice.sample_rate, default_data)
|
||||
@@ -67,9 +64,6 @@ def generate_audio(tts_text, mode_checkbox_group, sft_dropdown, prompt_text, pro
|
||||
gr.Info('您正在使用自然语言控制模式, prompt音频/prompt文本会被忽略')
|
||||
# if cross_lingual mode, please make sure that model is iic/CosyVoice-300M and tts_text prompt_text are different language
|
||||
if mode_checkbox_group in ['跨语种复刻']:
|
||||
if cosyvoice.instruct is True:
|
||||
gr.Warning('您正在使用跨语种复刻模式, {}模型不支持此模式, 请使用iic/CosyVoice-300M模型'.format(args.model_dir))
|
||||
yield (cosyvoice.sample_rate, default_data)
|
||||
if instruct_text != '':
|
||||
gr.Info('您正在使用跨语种复刻模式, instruct文本会被忽略')
|
||||
if prompt_wav is None:
|
||||
|
||||
Reference in New Issue
Block a user