Update TTS.py (#2450)

main
YYuX-1145 2 months ago committed by GitHub
parent 0d2f273402
commit dd2b9253aa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1073,7 +1073,7 @@ class TTS:
###### setting reference audio and prompt text preprocessing ########
t0 = time.perf_counter()
if (ref_audio_path is not None) and (ref_audio_path != self.prompt_cache["ref_audio_path"]):
if (ref_audio_path is not None) and (ref_audio_path != self.prompt_cache["ref_audio_path"] or (self.is_v2pro and self.prompt_cache["refer_spec"][0][1] is None)):
if not os.path.exists(ref_audio_path):
raise ValueError(f"{ref_audio_path} not exists")
self.set_ref_audio(ref_audio_path)

Loading…
Cancel
Save