uasername commited on
Commit
feeb524
·
verified ·
1 Parent(s): bfd6afc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
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
- # Convert the MP3 bytes to a numpy array using librosa.
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