Spaces:
Runtime error
Runtime error
clone the application
Browse files- app.py +5 -3
- packages.txt +2 -1
app.py
CHANGED
|
@@ -6,7 +6,9 @@ import subprocess
|
|
| 6 |
|
| 7 |
|
| 8 |
MAX_TXT_LEN = 100
|
| 9 |
-
|
|
|
|
|
|
|
| 10 |
def generate_audio(text):
|
| 11 |
if len(text) > MAX_TXT_LEN:
|
| 12 |
text = text[:MAX_TXT_LEN]
|
|
@@ -22,8 +24,8 @@ def generate_audio(text):
|
|
| 22 |
# )
|
| 23 |
# if synthesizer is None:
|
| 24 |
# raise NameError("model not found")
|
| 25 |
-
tts_engine= TextToSpeech()
|
| 26 |
-
text1 = subprocess.check_output("
|
| 27 |
text2 = text1.decode("utf-8")
|
| 28 |
return text2
|
| 29 |
# with tempfile.NamedTemporaryFile(suffix=".wav", delete=False) as fp:
|
|
|
|
| 6 |
|
| 7 |
|
| 8 |
MAX_TXT_LEN = 100
|
| 9 |
+
subprocess.check_output("git install lfs", shell=True)
|
| 10 |
+
subprocess.check_output("git clone https://huggingface.co/DigitalUmuganda/Kinyarwanda_YourTTS",
|
| 11 |
+
shell=True)
|
| 12 |
def generate_audio(text):
|
| 13 |
if len(text) > MAX_TXT_LEN:
|
| 14 |
text = text[:MAX_TXT_LEN]
|
|
|
|
| 24 |
# )
|
| 25 |
# if synthesizer is None:
|
| 26 |
# raise NameError("model not found")
|
| 27 |
+
#tts_engine= TextToSpeech()
|
| 28 |
+
text1 = subprocess.check_output("pwd", shell=True)+ subprocess.check_output("ls", shell=True)
|
| 29 |
text2 = text1.decode("utf-8")
|
| 30 |
return text2
|
| 31 |
# with tempfile.NamedTemporaryFile(suffix=".wav", delete=False) as fp:
|
packages.txt
CHANGED
|
@@ -1,2 +1,3 @@
|
|
| 1 |
libsndfile1
|
| 2 |
-
espeak-ng
|
|
|
|
|
|
| 1 |
libsndfile1
|
| 2 |
+
espeak-ng
|
| 3 |
+
git
|