Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import os
|
2 |
+
os.system('wget -q https://storage.googleapis.com/vakyansh-open-models/tts/marathi/mr-IN/female_voice_0/glow.zip && unzip -q glow.zip -d ttsv/checkpoints/female')
|
3 |
+
os.system('wget -q https://storage.googleapis.com/vakyansh-open-models/tts/marathi/mr-IN/female_voice_0/hifi.zip && unzip -q hifi.zip -d ttsv/checkpoints/female')
|
4 |
+
os.system('rm glow.zip && rm hifi.zip')
|
5 |
+
# os.system('wget -q https://storage.googleapis.com/vakyansh-open-models/tts/hindi/hi-IN/male_voice_1/glow.zip && unzip -q glow.zip -d ttsv/checkpoints/male')
|
6 |
+
# os.system('wget -q https://storage.googleapis.com/vakyansh-open-models/tts/hindi/hi-IN/male_voice_1/hifi.zip && unzip -q hifi.zip -d ttsv/checkpoints/male')
|
7 |
+
os.system('wget -q https://storage.googleapis.com/vakyansh-open-models/translit_models.zip -P ttsv/checkpoints/ && unzip -q ttsv/checkpoints/translit_models.zip -d ttsv/checkpoints/')
|
8 |
+
|
9 |
+
|
10 |
+
for path, subdirs, files in os.walk('ttsv/checkpoints/'):
|
11 |
+
print(subdirs)
|
12 |
+
for name in files:
|
13 |
+
print(os.path.join(path, name))
|
14 |
+
|
15 |
+
from ttsv.utils.inference.run_gradio import *
|
16 |
+
from argparse import Namespace
|
17 |
+
|
18 |
+
#os.system('python ttsv/utils/inference/run_gradio.py -a ttsv/checkpoints/glow/male -v ttsv/checkpoints/hifi/male -d cpu -L hi')
|
19 |
+
|
20 |
+
|
21 |
+
args = {
|
22 |
+
'acoustic':'/home/user/app/ttsv/checkpoints/female/glow_ckp',
|
23 |
+
'vocoder':'/home/user/app/ttsv/checkpoints/female/hifi_ckp',
|
24 |
+
'device':'cpu',
|
25 |
+
'lang':'mr'
|
26 |
+
}
|
27 |
+
|
28 |
+
build_gradio(Namespace(**args))
|