ASLP-lab commited on
Commit
ad7b918
·
verified ·
1 Parent(s): 2711fc1

Update app.py

Browse files

fix description

Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -21,7 +21,7 @@ PRESET_AUDIO_OPTIONS = {
21
  "ZoengJyutGaai": "asset/张悦楷.wav",
22
  "Trump": "asset/特朗普.wav",
23
  "Taiyi Zhenren": "asset/太乙真人.wav",
24
- "自定义上传": None
25
  }
26
 
27
  # 加载模型
@@ -51,7 +51,7 @@ def tts_inference(model_choice, text, preset_audio_choice, custom_audio):
51
  prompt_audio = "asset/F01_中立_20054.wav"
52
  elif model_choice == "CosyVoice2-Yue":
53
  model = cosyvoice_base
54
- if preset_audio_choice == "自定义上传":
55
  if custom_audio is None:
56
  return None, "请上传参考音频或选择预设音频"
57
  prompt_audio = custom_audio
@@ -102,8 +102,8 @@ demo = gr.Interface(
102
  gr.Audio(sources=["upload"], type="filepath", label="upload prompt audio(CosyVoice2-Yue only)")
103
  ],
104
  outputs=[
105
- gr.Audio(type="numpy", label="Generated Audio"),
106
- gr.Textbox(label="Status")
107
  ]
108
  )
109
 
 
21
  "ZoengJyutGaai": "asset/张悦楷.wav",
22
  "Trump": "asset/特朗普.wav",
23
  "Taiyi Zhenren": "asset/太乙真人.wav",
24
+ "Custom Upload": None
25
  }
26
 
27
  # 加载模型
 
51
  prompt_audio = "asset/F01_中立_20054.wav"
52
  elif model_choice == "CosyVoice2-Yue":
53
  model = cosyvoice_base
54
+ if preset_audio_choice == "Custom Upload":
55
  if custom_audio is None:
56
  return None, "请上传参考音频或选择预设音频"
57
  prompt_audio = custom_audio
 
102
  gr.Audio(sources=["upload"], type="filepath", label="upload prompt audio(CosyVoice2-Yue only)")
103
  ],
104
  outputs=[
105
+ gr.Audio(type="numpy", label="generated audio"),
106
+ gr.Textbox(label="status")
107
  ]
108
  )
109