ciyidogan commited on
Commit
cc4b358
·
verified ·
1 Parent(s): 31b7785

Update websocket_handler.py

Browse files
Files changed (1) hide show
  1. websocket_handler.py +2 -1
websocket_handler.py CHANGED
@@ -625,7 +625,8 @@ async def generate_and_stream_tts(
625
  "data": base64.b64encode(chunk).decode('utf-8'),
626
  "chunk_index": chunk_index,
627
  "total_chunks": total_chunks,
628
- "is_last": chunk_index == total_chunks - 1
 
629
  })
630
 
631
  # Small delay to prevent overwhelming the client
 
625
  "data": base64.b64encode(chunk).decode('utf-8'),
626
  "chunk_index": chunk_index,
627
  "total_chunks": total_chunks,
628
+ "is_last": chunk_index == total_chunks - 1,
629
+ "mime_type": "audio/mpeg" # ElevenLabs returns MP3
630
  })
631
 
632
  # Small delay to prevent overwhelming the client