Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
#1
by
Tony111222333
- opened
app.py
CHANGED
@@ -71,8 +71,8 @@ vocos_22050 = Vocos.from_pretrained(VOCODER22_MODEL_PATH).to(device)
|
|
71 |
@torch.inference_mode()
|
72 |
def synthesise(text, ipa, prompt_selection, audio_prompt, temperature, speed):
|
73 |
print(text, prompt_selection, temperature, speed)
|
74 |
-
if len(text) >
|
75 |
-
raise gr.Error("Текст повинен бути коротшим за
|
76 |
|
77 |
if audio_prompt:
|
78 |
wav, sr = torchaudio.load(audio_prompt)
|
|
|
71 |
@torch.inference_mode()
|
72 |
def synthesise(text, ipa, prompt_selection, audio_prompt, temperature, speed):
|
73 |
print(text, prompt_selection, temperature, speed)
|
74 |
+
if len(text) > 100000:
|
75 |
+
raise gr.Error("Текст повинен бути коротшим за 100000 символів.")
|
76 |
|
77 |
if audio_prompt:
|
78 |
wav, sr = torchaudio.load(audio_prompt)
|