Update inference_webui.py

Fix inference_cli issue
This commit is contained in:
XXXXRT666 2024-08-23 10:56:31 +08:00 committed by GitHub
parent 5ffd4eeab5
commit 4621b57c95
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -397,7 +397,8 @@ def merge_short_text_in_array(texts, threshold):
##ref_wav_path+prompt_text+prompt_language+text(单个)+text_language+top_k+top_p+temperature
# cache_tokens={}#暂未实现清理机制
cache= {}
def get_tts_wav(ref_wav_path, prompt_text, prompt_language, text, text_language, how_to_cut=i18n("不切"), top_k=20, top_p=0.6, temperature=0.6, ref_free = False,speed=1,if_freeze=False,inp_refs=123):
def get_tts_wav(ref_wav_path, prompt_text, prompt_language, text, text_language, how_to_cut=i18n("不切"), top_k=20, top_p=0.6, temperature=0.6, ref_free
=False,speed=1,if_freeze=False,inp_refs=None):
global cache
if ref_wav_path:pass
else:gr.Warning(i18n('请上传参考音频'))