ashishkblink commited on
Commit
b5ab43d
·
verified ·
1 Parent(s): ec8080d

Update pipe_method3.py

Browse files
Files changed (1) hide show
  1. pipe_method3.py +14 -0
pipe_method3.py CHANGED
@@ -85,6 +85,15 @@ SPEECH_END_SILENCE_FRAMES = 40 # 800ms
85
  MAX_UTTERANCE_MS = 12000
86
  PARTIAL_EMIT_EVERY_MS = 250
87
 
 
 
 
 
 
 
 
 
 
88
  # ----------------------------
89
  # LLM prompt
90
  # ----------------------------
@@ -299,6 +308,11 @@ async def voice(request: Request):
299
  async def voice_get(request: Request):
300
  return await voice(request)
301
 
 
 
 
 
 
302
  # ----------------------------
303
  # WebSocket /stream
304
  # ----------------------------
 
85
  MAX_UTTERANCE_MS = 12000
86
  PARTIAL_EMIT_EVERY_MS = 250
87
 
88
+
89
+ LAST_STATE = {
90
+ "connected": False,
91
+ "last_stt": "",
92
+ "last_llm": "",
93
+ "last_tts": "",
94
+ "updated_ms": 0,
95
+ }
96
+
97
  # ----------------------------
98
  # LLM prompt
99
  # ----------------------------
 
308
  async def voice_get(request: Request):
309
  return await voice(request)
310
 
311
+ @app.get("/debug/last")
312
+ async def debug_last():
313
+ return LAST_STATE
314
+
315
+
316
  # ----------------------------
317
  # WebSocket /stream
318
  # ----------------------------