Spaces:
Sleeping
Sleeping
Akito-UzukiP
commited on
Commit
·
401d293
1
Parent(s):
cefd4f0
limited length
Browse files
app.py
CHANGED
@@ -123,6 +123,7 @@ def tts_fn(text, speaker, sdp_ratio, noise_scale, noise_scale_w, length_scale, l
|
|
123 |
with torch.no_grad():
|
124 |
with open(__LOG__,"a",encoding="UTF-8") as f:
|
125 |
for slice in slices:
|
|
|
126 |
audio = infer(slice, sdp_ratio=sdp_ratio, noise_scale=noise_scale, noise_scale_w=noise_scale_w, length_scale=length_scale, sid=speaker, language=language)
|
127 |
audio_list.append(audio)
|
128 |
|
|
|
123 |
with torch.no_grad():
|
124 |
with open(__LOG__,"a",encoding="UTF-8") as f:
|
125 |
for slice in slices:
|
126 |
+
assert len(slice) < 150 # 限制输入的文本长度
|
127 |
audio = infer(slice, sdp_ratio=sdp_ratio, noise_scale=noise_scale, noise_scale_w=noise_scale_w, length_scale=length_scale, sid=speaker, language=language)
|
128 |
audio_list.append(audio)
|
129 |
|