Repository navigation
feat: enable manual flushing in elevenlabs stt - #7287
chenghao-mou merged 8 commits into
Conversation
Adapt provider flush support from Long Chen’s #4043 to the session manual_flush capability. Preserve streaming connections across turn boundaries and enable the capability only in supported provider modes. Co-authored-by: Long Chen <longch1024@gmail.com>
There was a problem hiding this comment.
Note
Newer findings are available below. Devin Review posted a newer report on this PR, in addition to the findings presented here.
Devin Review found 2 potential issues.
1 flag not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
| if is_given(endpointing): | ||
| self._capabilities.manual_flush = opts.endpointing == "manual" |
There was a problem hiding this comment.
🔴 Premature manual-flush mode switch
After update_options(endpointing="manual"), manual_flush turns on before active streams leave VAD mode. Their flushes send no speech_end, so a manual turn commit can time out.
Learn more
The capability is read dynamically by the session to decide whether it can flush an active STT stream. A realtime stream defers an endpointing change until its config.updated acknowledgement and the current utterance boundary; its flush handler only sends speech_end when _active_endpointing is manual. Updating the instance capability immediately makes those decisions disagree during the transition. The reverse change also suppresses needed flushes until the stream enters VAD mode.
Example: A stream is speaking in VAD mode. update_options(endpointing="manual") sets manual_flush=True, but _active_endpointing remains vad until the turn ends. A session commit flushes; the stream ignores the manual boundary and the commit waits without a forced final.
Recommended fix: Coordinate capability changes with the active streams' acknowledged endpointing transitions, or ensure that every flush accepted while manual_flush is true can finalize the current turn. Cover both directions and boundary-deferred updates.
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Devin Review found 1 new potential issue.
🐛 1 issue in files not directly in the diff
🐛 Sarvam flush discards subsequent speech
When a caller uses flush() between utterances, _process_audio ends the stream and stops consuming audio. Later frames on that stream never reach Sarvam.
Enable framework-driven commits for ElevenLabs Scribe v2 realtime on #7285. Manual mode advertises
manual_flush; provider errors reach the stream consumer with payloads confined to PII fields.Adapts @longcw's #4043 for @IngLP's report #4087. Other providers are deferred to #7989. Short-utterance accuracy remains unverified.
Addresses AGT-3516
Initial prompt and agent context
Model: GPT-6