fix: do not fire no-speech reprompt while caller is still mid-utterance with live partial ASR
deploy / deploy (push) Failing after 3s
deploy / deploy (push) Failing after 3s
This commit is contained in:
@@ -956,6 +956,11 @@ class AudioSocketMediaRuntime:
|
||||
bool(partial.is_final),
|
||||
transcript_text[:160],
|
||||
)
|
||||
# Fresh speech content is still arriving, so push the
|
||||
# no-speech silence-timeout deadline forward instead of
|
||||
# interrupting a caller who is actively mid-utterance.
|
||||
if actor.state == "listening":
|
||||
actor.listening_since_monotonic = time.monotonic()
|
||||
actor.partial_transcript = transcript_text
|
||||
self._update_stable_partial_transcript(actor, transcript_text, provider_stable=bool(partial.is_stable or partial.is_final))
|
||||
intent = self._detect_early_intent(transcript_text)
|
||||
|
||||
Reference in New Issue
Block a user