ciyidogan commited on
Commit
c14252e
·
verified ·
1 Parent(s): 5188a55

Update websocket_handler.py

Browse files
Files changed (1) hide show
  1. websocket_handler.py +9 -1
websocket_handler.py CHANGED
@@ -498,8 +498,16 @@ async def handle_audio_chunk(websocket: WebSocket, session: RealtimeSession, mes
498
  try:
499
  log_debug(f"🎤 Streaming audio chunk to STT, size: {len(decoded_audio)} bytes", session_id=session.session.session_id)
500
 
 
 
 
 
 
 
 
 
501
  async for result in session.stt_manager.stream_audio(decoded_audio):
502
- log_debug(f"📝 STT result: {result.text}, final: {result.is_final}", session_id=session.session.session_id)
503
 
504
  # Send transcription updates
505
  await websocket.send_json({
 
498
  try:
499
  log_debug(f"🎤 Streaming audio chunk to STT, size: {len(decoded_audio)} bytes", session_id=session.session.session_id)
500
 
501
+ # Her 10. chunk'ta bir test mesajı gönder
502
+ if not hasattr(session, 'chunk_counter'):
503
+ session.chunk_counter = 0
504
+ session.chunk_counter += 1
505
+
506
+ if session.chunk_counter % 10 == 0:
507
+ log_info(f"📊 Sent {session.chunk_counter} chunks to STT so far...", session_id=session.session.session_id)
508
+
509
  async for result in session.stt_manager.stream_audio(decoded_audio):
510
+ log_info(f"🎉 STT RESULT RECEIVED: {result.text}, final: {result.is_final}", session_id=session.session.session_id)
511
 
512
  # Send transcription updates
513
  await websocket.send_json({