ciyidogan commited on
Commit
6061d63
·
verified ·
1 Parent(s): f779234

Update state_orchestrator.py

Browse files
Files changed (1) hide show
  1. state_orchestrator.py +7 -2
state_orchestrator.py CHANGED
@@ -264,10 +264,15 @@ class StateOrchestrator:
264
  result_data = event.data
265
  is_final = result_data.get("is_final", False)
266
 
267
- # Sadece final result'ları işle
268
  if not is_final:
 
 
 
 
269
  return
270
 
 
271
  text = result_data.get("text", "").strip()
272
  if not text:
273
  log_warning(f"⚠️ Empty final transcription", session_id=session_id)
@@ -283,7 +288,7 @@ class StateOrchestrator:
283
 
284
  log_info(f"💬 Final transcription: '{text}'", session_id=session_id)
285
 
286
- # ✅ STT'yi otomatik durdur - single utterance modunda zaten duracak ama emin olmak için
287
  await self.event_bus.publish(Event(
288
  type=EventType.STT_STOPPED,
289
  session_id=session_id,
 
264
  result_data = event.data
265
  is_final = result_data.get("is_final", False)
266
 
267
+ # Interim result'ları websocket'e gönder ama state değiştirme
268
  if not is_final:
269
+ # Sadece log, state değişikliği yok
270
+ text = result_data.get("text", "").strip()
271
+ if text:
272
+ log_debug(f"📝 Interim transcription: '{text}'", session_id=session_id)
273
  return
274
 
275
+ # Final result işleme
276
  text = result_data.get("text", "").strip()
277
  if not text:
278
  log_warning(f"⚠️ Empty final transcription", session_id=session_id)
 
288
 
289
  log_info(f"💬 Final transcription: '{text}'", session_id=session_id)
290
 
291
+ # ✅ STT'yi otomatik durdur
292
  await self.event_bus.publish(Event(
293
  type=EventType.STT_STOPPED,
294
  session_id=session_id,