Update app.py
Browse files
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 |
|