Spaces:
Sleeping
Sleeping
fix: correct audio buffer handling in full text processing response
Browse files- 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",
|