carrega piper
Browse files
app.py
CHANGED
@@ -37,12 +37,17 @@ def carrega_collectivat():
|
|
37 |
|
38 |
return synthesizer
|
39 |
|
|
|
|
|
|
|
40 |
|
41 |
model_bsc = carrega_bsc()
|
42 |
SPEAKERS = model_bsc.speakers
|
43 |
|
44 |
model_collectivat = carrega_collectivat()
|
45 |
|
|
|
|
|
46 |
def tts(text, speaker_idx):
|
47 |
if len(text) > MAX_TXT_LEN:
|
48 |
text = text[:MAX_TXT_LEN]
|
|
|
37 |
|
38 |
return synthesizer
|
39 |
|
40 |
+
def carrega_piper():
|
41 |
+
return Piper(os.getcwd() + "/models/piper/ca-upc_ona-x-low.onnx"
|
42 |
+
|
43 |
|
44 |
model_bsc = carrega_bsc()
|
45 |
SPEAKERS = model_bsc.speakers
|
46 |
|
47 |
model_collectivat = carrega_collectivat()
|
48 |
|
49 |
+
model_piper = carrega_piper()
|
50 |
+
|
51 |
def tts(text, speaker_idx):
|
52 |
if len(text) > MAX_TXT_LEN:
|
53 |
text = text[:MAX_TXT_LEN]
|