Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -79,10 +79,7 @@ def text_to_speech(text: str) -> AgentAudio:
|
|
79 |
tts.save(AUDIO_OUTPUT_PATH)
|
80 |
with open(AUDIO_OUTPUT_PATH, "rb") as f:
|
81 |
audio_bytes = f.read()
|
82 |
-
|
83 |
-
# sr=None preserves the original sample rate.
|
84 |
-
audio_np, sr = librosa.load(io.BytesIO(audio_bytes), sr=None)
|
85 |
-
return AgentAudio(audio_np)
|
86 |
|
87 |
|
88 |
# # Define the audio output path
|
|
|
79 |
tts.save(AUDIO_OUTPUT_PATH)
|
80 |
with open(AUDIO_OUTPUT_PATH, "rb") as f:
|
81 |
audio_bytes = f.read()
|
82 |
+
return AgentAudio(audio_bytes)
|
|
|
|
|
|
|
83 |
|
84 |
|
85 |
# # Define the audio output path
|