Jofthomas HF staff commited on
Commit
fb67188
·
verified ·
1 Parent(s): 146638e

Update TextGen/router.py

Browse files
Files changed (1) hide show
  1. TextGen/router.py +2 -1
TextGen/router.py CHANGED
@@ -309,7 +309,8 @@ def generate_voice_coqui(message: VoiceMessage = None):
309
  # Generate the audio stream from ElevenLabs
310
  for chunk in result:
311
  print("received : ",chunk)
312
- yield chunk#
 
313
 
314
  return StreamingResponse(audio_stream())
315
  @app.post("/generate_song")
 
309
  # Generate the audio stream from ElevenLabs
310
  for chunk in result:
311
  print("received : ",chunk)
312
+ # Assuming chunk is a tuple, where the second element is the audio data array
313
+ yield chunk[1].tobytes()
314
 
315
  return StreamingResponse(audio_stream())
316
  @app.post("/generate_song")