Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,21 +18,7 @@ static_folder = os.path.join(script_path, "static")
|
|
| 18 |
# Ensure the static folder exists
|
| 19 |
os.makedirs(static_folder, exist_ok=True)
|
| 20 |
|
| 21 |
-
|
| 22 |
-
['mms fa','https://huggingface.co/willwade/mms-tts-multilingual-models-onnx/resolve/main/fas',"🌠 راد",'https://huggingface.co/facebook/mms-tts-fas'],
|
| 23 |
-
['coqui-vits-female1-karim23657','https://huggingface.co/karim23657/persian-tts-vits/tree/main/persian-tts-female1-vits-coqui',"🌺 نگار",'https://huggingface.co/Kamtera/persian-tts-female1-vits'],
|
| 24 |
-
['coqui-vits-male1-karim23657','https://huggingface.co/karim23657/persian-tts-vits/tree/main/persian-tts-male1-vits-coqui',"🌟 آرش",'https://huggingface.co/Kamtera/persian-tts-male1-vits'],
|
| 25 |
-
['coqui-vits-male-karim23657','https://huggingface.co/karim23657/persian-tts-vits/tree/main/male-male-coqui-vits',"🦁 کیان",'https://huggingface.co/Kamtera/persian-tts-male-vits'],
|
| 26 |
-
['coqui-vits-female-karim23657','https://huggingface.co/karim23657/persian-tts-vits/tree/main/female-female-coqui-vits',"🌷 مهتاب",'https://huggingface.co/Kamtera/persian-tts-female-vits'],
|
| 27 |
-
['coqui-vits-female-GPTInformal-karim23657','https://huggingface.co/karim23657/persian-tts-vits/tree/main/female-GPTInformal-coqui-vits',"🌼 شیوا",'https://huggingface.co/karim23657/persian-tts-female-GPTInformal-Persian-vits'],
|
| 28 |
-
['coqui-vits-male-SmartGitiCorp','https://huggingface.co/karim23657/persian-tts-vits/tree/main/male-SmartGitiCorp-coqui-vits',"🚀 بهمن",'https://huggingface.co/SmartGitiCorp/persian_tts_vits'],
|
| 29 |
-
['vits-piper-fa-ganji','https://huggingface.co/karim23657/persian-tts-vits/tree/main/vits-piper-fa-ganji',"🚀 برنا",'https://huggingface.co/SadeghK/persian-text-to-speech'],
|
| 30 |
-
['vits-piper-fa-ganji-adabi','https://huggingface.co/karim23657/persian-tts-vits/tree/main/vits-piper-fa-ganji-adabi',"🚀 برنا-1",'https://huggingface.co/SadeghK/persian-text-to-speech'],
|
| 31 |
-
['vits-piper-fa-gyro-medium','https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/vits-piper-fa_IR-gyro-medium.tar.bz2',"💧 نیما",'https://huggingface.co/gyroing/Persian-Piper-Model-gyro'],
|
| 32 |
-
['piper-fa-amir-medium','https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/vits-piper-fa_IR-amir-medium.tar.bz2',"⚡️ آریا",'https://huggingface.co/SadeghK/persian-text-to-speech'],
|
| 33 |
-
['vits-mimic3-fa-haaniye_low','https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/vits-mimic3-fa-haaniye_low.tar.bz2',"🌹 ریما",'https://github.com/MycroftAI/mimic3'],
|
| 34 |
-
['vits-piper-fa_en-rezahedayatfar-ibrahimwalk-medium','https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/vits-piper-fa_en-rezahedayatfar-ibrahimwalk-medium.tar.bz2',"🌠 پیام",'https://huggingface.co/mah92/persian-english-piper-tts-model'],
|
| 35 |
-
]
|
| 36 |
|
| 37 |
|
| 38 |
class Component:
|
|
@@ -186,7 +172,7 @@ with gzip.open(phonetc_data_file_path, 'at',encoding='utf-8') as f: # 'at' for
|
|
| 186 |
|
| 187 |
|
| 188 |
import soundfile as sf
|
| 189 |
-
from app_utils import tts_interface
|
| 190 |
|
| 191 |
def tts(input_data):
|
| 192 |
text = input_data.get('text')
|
|
|
|
| 18 |
# Ensure the static folder exists
|
| 19 |
os.makedirs(static_folder, exist_ok=True)
|
| 20 |
|
| 21 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
|
| 24 |
class Component:
|
|
|
|
| 172 |
|
| 173 |
|
| 174 |
import soundfile as sf
|
| 175 |
+
from app_utils import tts_interface , models
|
| 176 |
|
| 177 |
def tts(input_data):
|
| 178 |
text = input_data.get('text')
|