Update app.py
Browse files
app.py
CHANGED
@@ -30,16 +30,21 @@ def new_load_mod(instr="en_US-joe-medium"):
|
|
30 |
model=instr
|
31 |
print(f"model: {model}")
|
32 |
lang=instr.split("_")[0]
|
|
|
33 |
dia=instr.split("-")[0]
|
|
|
34 |
name=instr.split("-")[1]
|
|
|
35 |
style=instr.split("-")[2]
|
|
|
36 |
file=f'{instr}.onnx'
|
|
|
37 |
print(f"Loading model: {file}")
|
38 |
print(f"os.path: {os.path}")
|
39 |
if not os.path.isfile(f'{os.getcwd()}/voices/{file}'):
|
40 |
print(f"Model not found locally")
|
41 |
-
|
42 |
-
m_path= f"https://huggingface.co/mbarnig/lb_rhasspy_piper_female_tts/resolve/main/female2_model.onnx"
|
43 |
print(f"m_path: {m_path}")
|
44 |
print("Downloading json...")
|
45 |
json_file=requests.get(f"{m_path}.json")
|
|
|
30 |
model=instr
|
31 |
print(f"model: {model}")
|
32 |
lang=instr.split("_")[0]
|
33 |
+
print(f"lang: {lang}")
|
34 |
dia=instr.split("-")[0]
|
35 |
+
print(f"dia: {dia}")
|
36 |
name=instr.split("-")[1]
|
37 |
+
print(f"name: {name}")
|
38 |
style=instr.split("-")[2]
|
39 |
+
print(f"style: {style}")
|
40 |
file=f'{instr}.onnx'
|
41 |
+
print(f"file: {file}")
|
42 |
print(f"Loading model: {file}")
|
43 |
print(f"os.path: {os.path}")
|
44 |
if not os.path.isfile(f'{os.getcwd()}/voices/{file}'):
|
45 |
print(f"Model not found locally")
|
46 |
+
m_path= f"https://huggingface.co/rhasspy/piper-voices/resolve/main/{lang}/{dia}/{name}/{style}/{file}"
|
47 |
+
# m_path= f"https://huggingface.co/mbarnig/lb_rhasspy_piper_female_tts/resolve/main/female2_model.onnx"
|
48 |
print(f"m_path: {m_path}")
|
49 |
print("Downloading json...")
|
50 |
json_file=requests.get(f"{m_path}.json")
|