kevinwang676 commited on
Commit
fa3039d
1 Parent(s): fa831c3

Update GPT_SoVITS/app.py

Browse files
Files changed (1) hide show
  1. GPT_SoVITS/app.py +2 -2
GPT_SoVITS/app.py CHANGED
@@ -424,7 +424,7 @@ def get_tts_wav(ref_wav_path, prompt_text, prompt_language, text, text_language,
424
  wav16k, sr = librosa.load(ref_wav_path, sr=16000)
425
  if (wav16k.shape[0] > 160000 or wav16k.shape[0] < 48000):
426
  gr.Warning(i18n("参考音频在3~10秒范围外,请更换!"))
427
- raise OSError(i18n("参考音频在3~10秒范围外,请更换!"))
428
  wav16k = torch.from_numpy(wav16k)
429
  zero_wav_torch = torch.from_numpy(zero_wav)
430
  if is_half == True:
@@ -731,7 +731,7 @@ with gr.Blocks(title="GPT-SoVITS WebUI") as app:
731
  # get_phoneme_button = gr.Button(i18n("目标文本转音素"), variant="primary")
732
  with gr.Row():
733
  inference_button = gr.Button(i18n("开启声音复刻之旅吧💕"), variant="primary", size='lg', scale=25)
734
- output = gr.Audio(label=i18n("为您合成的专属音频🎶"), scale=14)
735
 
736
  inference_button.click(
737
  get_tts_wav,
 
424
  wav16k, sr = librosa.load(ref_wav_path, sr=16000)
425
  if (wav16k.shape[0] > 160000 or wav16k.shape[0] < 48000):
426
  gr.Warning(i18n("参考音频在3~10秒范围外,请更换!"))
427
+ #raise OSError(i18n("参考音频在3~10秒范围外,请更换!"))
428
  wav16k = torch.from_numpy(wav16k)
429
  zero_wav_torch = torch.from_numpy(zero_wav)
430
  if is_half == True:
 
731
  # get_phoneme_button = gr.Button(i18n("目标文本转音素"), variant="primary")
732
  with gr.Row():
733
  inference_button = gr.Button(i18n("开启声音复刻之旅吧💕"), variant="primary", size='lg', scale=25)
734
+ output = gr.Audio(label=i18n("为您合成的专属音频🎶"), scale=14, interactive=True)
735
 
736
  inference_button.click(
737
  get_tts_wav,