Spaces:
Runtime error
Runtime error
persian tts
Browse files
app.py
CHANGED
@@ -3,9 +3,7 @@ import tempfile
|
|
3 |
from typing import Optional
|
4 |
from TTS.config import load_config
|
5 |
import gradio as gr
|
6 |
-
|
7 |
-
import os
|
8 |
-
import json
|
9 |
from TTS.utils.manage import ModelManager
|
10 |
from TTS.utils.synthesizer import Synthesizer
|
11 |
|
@@ -31,7 +29,7 @@ def tts(text: str):
|
|
31 |
# synthesize
|
32 |
if synthesizer is None:
|
33 |
raise NameError("model not found")
|
34 |
-
wavs = synthesizer.tts(text
|
35 |
# return output
|
36 |
with tempfile.NamedTemporaryFile(suffix=".wav", delete=False) as fp:
|
37 |
synthesizer.save_wav(wavs, fp)
|
@@ -39,8 +37,9 @@ def tts(text: str):
|
|
39 |
|
40 |
|
41 |
description="""
|
42 |
-
This is a demo of
|
43 |
Model trained on this dataset : https://www.kaggle.com/datasets/magnoliasis/persian-tts-dataset-famale
|
|
|
44 |
"""
|
45 |
article= ""
|
46 |
|
|
|
3 |
from typing import Optional
|
4 |
from TTS.config import load_config
|
5 |
import gradio as gr
|
6 |
+
|
|
|
|
|
7 |
from TTS.utils.manage import ModelManager
|
8 |
from TTS.utils.synthesizer import Synthesizer
|
9 |
|
|
|
29 |
# synthesize
|
30 |
if synthesizer is None:
|
31 |
raise NameError("model not found")
|
32 |
+
wavs = synthesizer.tts(text)
|
33 |
# return output
|
34 |
with tempfile.NamedTemporaryFile(suffix=".wav", delete=False) as fp:
|
35 |
synthesizer.save_wav(wavs, fp)
|
|
|
37 |
|
38 |
|
39 |
description="""
|
40 |
+
This is a demo of persian text to speech model.
|
41 |
Model trained on this dataset : https://www.kaggle.com/datasets/magnoliasis/persian-tts-dataset-famale
|
42 |
+
|
43 |
"""
|
44 |
article= ""
|
45 |
|