Athspi commited on
Commit
b6b39ee
·
verified ·
1 Parent(s): 1f4b6af

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -46,6 +46,9 @@ def tts_inference(text: str):
46
  onnx_outputs = ort_session.run(None, {"input_ids": input_ids})
47
  waveform = onnx_outputs[0]
48
 
 
 
 
49
  # Remove unnecessary dimensions.
50
  waveform = np.squeeze(waveform)
51
 
 
46
  onnx_outputs = ort_session.run(None, {"input_ids": input_ids})
47
  waveform = onnx_outputs[0]
48
 
49
+ # Ensure waveform is in float32 format (required by Gradio).
50
+ waveform = waveform.astype(np.float32)
51
+
52
  # Remove unnecessary dimensions.
53
  waveform = np.squeeze(waveform)
54