Spaces:
Runtime error
Runtime error
upload file by file
Browse files
app.py
CHANGED
@@ -3,13 +3,19 @@ from typing import Optional
|
|
3 |
import gradio as gr
|
4 |
import numpy as np
|
5 |
from TTS.api import TTS
|
6 |
-
from huggingface_hub import
|
7 |
import subprocess
|
8 |
|
9 |
|
10 |
MAX_TXT_LEN = 100
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
-
snapshot_download(repo_id="DigitalUmuganda/Kinyarwanda_YourTTS",revision="main")
|
13 |
def generate_audio(text):
|
14 |
if len(text) > MAX_TXT_LEN:
|
15 |
text = text[:MAX_TXT_LEN]
|
|
|
3 |
import gradio as gr
|
4 |
import numpy as np
|
5 |
from TTS.api import TTS
|
6 |
+
from huggingface_hub import hf_hub_download
|
7 |
import subprocess
|
8 |
|
9 |
|
10 |
MAX_TXT_LEN = 100
|
11 |
+
REPO_NAME="DigitalUmuganda/Kinyarwanda_YourTTS"
|
12 |
+
hf_hub_download(repo_id=REPO_NAME,filename="config.json")
|
13 |
+
hf_hub_download(repo_id=REPO_NAME,filename="SE_checkpoint.pth.tar")
|
14 |
+
hf_hub_download(repo_id=REPO_NAME,filename="config_se.json")
|
15 |
+
hf_hub_download(repo_id=REPO_NAME,filename="model.pth")
|
16 |
+
hf_hub_download(repo_id=REPO_NAME,filename="speakers.pth")
|
17 |
+
hf_hub_download(repo_id=REPO_NAME,filename="conditioning_audio.wav")
|
18 |
|
|
|
19 |
def generate_audio(text):
|
20 |
if len(text) > MAX_TXT_LEN:
|
21 |
text = text[:MAX_TXT_LEN]
|