Update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,6 @@ import os
|
|
3 |
from TTS.api import TTS
|
4 |
import time
|
5 |
|
6 |
-
count = 0
|
7 |
|
8 |
"""
|
9 |
For Fairseq models, use the following name format: tts_models/<lang-iso_code>/fairseq/vits. You can find the language ISO codes here and learn about the Fairseq models here.
|
@@ -22,15 +21,6 @@ api_hin = TTS(f"tts_models/hin/fairseq/vits", gpu=False) # Hindi
|
|
22 |
|
23 |
|
24 |
def audio_tts(txt, language, audio_file):
|
25 |
-
global count
|
26 |
-
count += 1
|
27 |
-
print(f"Count: {count}")
|
28 |
-
if count > 150:
|
29 |
-
time.sleep(30)
|
30 |
-
os.system("rm -R /tmp/*")
|
31 |
-
print(f"Reset count: {count}")
|
32 |
-
count = 0
|
33 |
-
gr.Error("Reset counter")
|
34 |
|
35 |
# TTS with on the fly voice conversion
|
36 |
print(f"Language: {language}")
|
|
|
3 |
from TTS.api import TTS
|
4 |
import time
|
5 |
|
|
|
6 |
|
7 |
"""
|
8 |
For Fairseq models, use the following name format: tts_models/<lang-iso_code>/fairseq/vits. You can find the language ISO codes here and learn about the Fairseq models here.
|
|
|
21 |
|
22 |
|
23 |
def audio_tts(txt, language, audio_file):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
# TTS with on the fly voice conversion
|
26 |
print(f"Language: {language}")
|