mirror of
https://github.com/RVC-Boss/GPT-SoVITS.git
synced 2025-10-08 07:49:59 +08:00
timing
This commit is contained in:
parent
110cc3560c
commit
68c2441b12
@ -378,7 +378,6 @@ def get_tts_wav(ref_wav_path, prompt_text, prompt_language, text, text_language,
|
|||||||
|
|
||||||
for text in texts:
|
for text in texts:
|
||||||
# 解决输入目标文本的空行导致报错的问题
|
# 解决输入目标文本的空行导致报错的问题
|
||||||
t1 = ttime()
|
|
||||||
if (len(text.strip()) == 0):
|
if (len(text.strip()) == 0):
|
||||||
continue
|
continue
|
||||||
if (text[-1] not in splits): text += "。" if text_language != "en" else "."
|
if (text[-1] not in splits): text += "。" if text_language != "en" else "."
|
||||||
@ -434,6 +433,7 @@ def get_tts_wav(ref_wav_path, prompt_text, prompt_language, text, text_language,
|
|||||||
audio_opt.append(zero_wav)
|
audio_opt.append(zero_wav)
|
||||||
t4 = ttime()
|
t4 = ttime()
|
||||||
t.extend([t2 - t1,t3 - t2, t4 - t3])
|
t.extend([t2 - t1,t3 - t2, t4 - t3])
|
||||||
|
t1 = ttime()
|
||||||
print("%.3f\t%.3f\t%.3f\t%.3f" %
|
print("%.3f\t%.3f\t%.3f\t%.3f" %
|
||||||
(t[0], sum(t[1::3]), sum(t[2::3]), sum(t[3::3]))
|
(t[0], sum(t[1::3]), sum(t[2::3]), sum(t[3::3]))
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user