diff --git a/GPT_SoVITS/TTS_infer_pack/TTS.py b/GPT_SoVITS/TTS_infer_pack/TTS.py index 566e998..2aede2b 100644 --- a/GPT_SoVITS/TTS_infer_pack/TTS.py +++ b/GPT_SoVITS/TTS_infer_pack/TTS.py @@ -615,7 +615,7 @@ class TTS: fragment_interval = inputs.get("fragment_interval", 0.3) seed = inputs.get("seed", -1) seed = -1 if seed in ["", None] else seed - set_seed(seed) + actual_seed = set_seed(seed) if return_fragment: # split_bucket = False @@ -824,13 +824,17 @@ class TTS: if not return_fragment: print("%.3f\t%.3f\t%.3f\t%.3f" % (t1 - t0, t2 - t1, t_34, t_45)) - yield self.audio_postprocess(audio, + yield [ + self.audio_postprocess(audio, self.configs.sampling_rate, batch_index_list, speed_factor, split_bucket, fragment_interval - ) + ), + f"text: {text} text_lang: {text_lang} prompt_text: {prompt_text} prompt_lang: {prompt_lang} top_k: {top_k} top_p: {top_p} temperature: {temperature} batch_size: {batch_size} batch_threshold: {batch_threshold} split_bucket: {split_bucket} return_fragment: {return_fragment} speed_factor: {speed_factor} fragment_interval: {fragment_interval} seed: {actual_seed}" + ] + except Exception as e: traceback.print_exc() # 必须返回一个空音频, 否则会导致显存不释放。 diff --git a/GPT_SoVITS/inference_webui.py b/GPT_SoVITS/inference_webui.py index 505b665..3355e91 100644 --- a/GPT_SoVITS/inference_webui.py +++ b/GPT_SoVITS/inference_webui.py @@ -211,6 +211,8 @@ with gr.Blocks(title="GPT-SoVITS WebUI") as app: with gr.Row(): inference_button = gr.Button(i18n("合成语音"), variant="primary") stop_infer = gr.Button(i18n("终止合成"), variant="primary") + with gr.Row(): + inference_details = gr.Markdown() inference_button.click( @@ -224,7 +226,7 @@ with gr.Blocks(title="GPT-SoVITS WebUI") as app: split_bucket,fragment_interval, seed ], - [output], + [output, inference_details], ) stop_infer.click(tts_pipline.stop, [], [])