Spaces:
Valdis35
/
Runtime error

TeraSpace commited on
Commit
b9eb9b8
1 Parent(s): 4cd2bd2

Update infer_onnx.py

Browse files
Files changed (1) hide show
  1. infer_onnx.py +2 -2
infer_onnx.py CHANGED
@@ -58,12 +58,12 @@ class TTS:
58
  return phoneme_ids_inter
59
 
60
 
61
- def __call__(self, text: str):
62
  phoneme_ids = self._get_seq(text)
63
  text = np.expand_dims(np.array(phoneme_ids, dtype=np.int64), 0)
64
  text_lengths = np.array([text.shape[1]], dtype=np.int64)
65
  scales = np.array(
66
- [0.667, 1, 0.8],
67
  dtype=np.float32,
68
  )
69
  audio = self.model.run(
 
58
  return phoneme_ids_inter
59
 
60
 
61
+ def __call__(self, text: str, lenght_scale=1.2):
62
  phoneme_ids = self._get_seq(text)
63
  text = np.expand_dims(np.array(phoneme_ids, dtype=np.int64), 0)
64
  text_lengths = np.array([text.shape[1]], dtype=np.int64)
65
  scales = np.array(
66
+ [0.667, lenght_scale, 0.8],
67
  dtype=np.float32,
68
  )
69
  audio = self.model.run(