Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -233,7 +233,7 @@ def tts_streaming(text: str, voice: str = "af_heart", speed: float = 1.0, format
|
|
233 |
audio_output = np.zeros((24000,), dtype=np.float32)
|
234 |
|
235 |
# Convert the model output (assumed to be float32 in [-1, 1]) to int16 PCM.
|
236 |
-
audio_int16 = (audio_output * 32767).astype(np.int16).flatten()[
|
237 |
print(audio_int16)
|
238 |
|
239 |
# Convert to a torch tensor (back into float range) for our helper functions.
|
|
|
233 |
audio_output = np.zeros((24000,), dtype=np.float32)
|
234 |
|
235 |
# Convert the model output (assumed to be float32 in [-1, 1]) to int16 PCM.
|
236 |
+
audio_int16 = (audio_output * 32767).astype(np.int16).flatten()[6000:-3000]
|
237 |
print(audio_int16)
|
238 |
|
239 |
# Convert to a torch tensor (back into float range) for our helper functions.
|