ccoreilly commited on
Commit
b79ce49
1 Parent(s): b8920a0

carrega piper

Browse files
Files changed (1) hide show
  1. app.py +5 -0
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]