Irpan commited on
Commit
4c14db4
·
1 Parent(s): 5dfe481
Files changed (1) hide show
  1. tts.py +1 -2
tts.py CHANGED
@@ -14,11 +14,10 @@ def synthesize(text, model_id):
14
  processor = models_info[model_id]["processor"]
15
  model = models_info[model_id]["model"]
16
  inputs = processor(text, return_tensors="pt")
17
-
18
  with torch.no_grad():
19
  output = model(**inputs).waveform.cpu().float().numpy()
20
 
21
- output = (output * 32768).astype(np.int16)
22
  sampling_rate = 22050
23
 
24
  return (sampling_rate, output)
 
14
  processor = models_info[model_id]["processor"]
15
  model = models_info[model_id]["model"]
16
  inputs = processor(text, return_tensors="pt")
17
+
18
  with torch.no_grad():
19
  output = model(**inputs).waveform.cpu().float().numpy()
20
 
 
21
  sampling_rate = 22050
22
 
23
  return (sampling_rate, output)