spagestic commited on
Commit
4c06331
·
1 Parent(s): dd41680

fix: correct audio buffer handling in full text processing response

Browse files
Files changed (1) hide show
  1. api/tts_service.py +2 -2
api/tts_service.py CHANGED
@@ -410,9 +410,9 @@ class ChatterboxTTSService:
410
  "duration": duration
411
  }
412
 
413
- print(f"Full text processing complete! Final audio duration: {duration:.2f} seconds")
414
  return StreamingResponse(
415
- buffer,
416
  media_type="audio/wav",
417
  headers={
418
  "Content-Disposition": "attachment; filename=generated_full_text_speech.wav",
 
410
  "duration": duration
411
  }
412
 
413
+ print(f"Full text processing complete! Final audio duration: {duration:.2f} seconds")
414
  return StreamingResponse(
415
+ io.BytesIO(buffer.read()),
416
  media_type="audio/wav",
417
  headers={
418
  "Content-Disposition": "attachment; filename=generated_full_text_speech.wav",