This commit is contained in:
XXXXRT666 2024-07-10 17:12:31 +08:00
parent a166f0c3d5
commit c62c49be7c
2 changed files with 3 additions and 3 deletions

View File

@ -21,7 +21,7 @@ asr_dict = {
'lang': ['zh'], 'lang': ['zh'],
'size': ['large'], 'size': ['large'],
'path': 'funasr_asr.py', 'path': 'funasr_asr.py',
'precision': 'float32' 'precision': ['float32']
}, },
"Faster Whisper (多语种)": { "Faster Whisper (多语种)": {
'lang': ['auto', 'zh', 'en', 'ja'], 'lang': ['auto', 'zh', 'en', 'ja'],
@ -33,7 +33,7 @@ asr_dict = {
'lang': ['auto', 'zh', 'en', 'ja'], 'lang': ['auto', 'zh', 'en', 'ja'],
'size': ['small'], 'size': ['small'],
'path': 'sensevoice_asr.py', 'path': 'sensevoice_asr.py',
'precision': 'float32' 'precision': ['float32']
} }
} }

View File

@ -775,7 +775,7 @@ with gr.Blocks(title="GPT-SoVITS WebUI") as app:
precision = 'float32' precision = 'float32'
else: else:
precision = 'float32' precision = 'float32'
# return gr.Dropdown(choices=asr_dict[key]['lang']) # return gr.Dropdown(choices=asr_dict[key]['precision'])
return {"__type__": "update", "choices": asr_dict[key]['precision'],"value":precision} return {"__type__": "update", "choices": asr_dict[key]['precision'],"value":precision}
asr_model.change(change_lang_choices, [asr_model], [asr_lang]) asr_model.change(change_lang_choices, [asr_model], [asr_lang])
asr_model.change(change_size_choices, [asr_model], [asr_size]) asr_model.change(change_size_choices, [asr_model], [asr_size])