Force End Turn
Streaming:Flux
Flux detects the end of a turn natively. The ForceEndTurn message lets you override that detection and end the current turn immediately, on your own signal. Flux ends the turn on the audio transcribed so far and emits a standard EndOfTurn message.
Turn-taking modes
Section titled “Turn-taking modes”ForceEndTurn and eot_threshold together give you a spectrum of control over how turns end, and you can move between these modes mid-stream with a Configure message:
- Automatic — Flux’s native end-of-turn detection decides (the default).
EndOfTurncarries"trigger": "model". - Semi-manual — keep native detection running and override it with
ForceEndTurnwhenever you have a definitive signal. The model handles the ambiguous endings; you handle the unambiguous ones. - Fully manual — set
eot_threshold=1.0to suppress native detection entirely and drive every turn ending withForceEndTurn. See Bring Your Own Turn Detection.
Because eot_threshold can be changed on the fly with Configure, you can switch modes for a single turn — for example, raise it to 1.0 while a caller reads a fixed-length account ID so Flux won’t end the turn early, then lower it again for natural conversation.
Purpose
Section titled “Purpose”Some turn endings are unambiguous and don’t require the model to infer them. ForceEndTurn gives you an explicit override for these cases:
- Push-to-talk release — the user holds a button to speak and releases when done. The release is a definitive turn-end signal.
- DTMF tones and IVR events — a keypad press or menu selection ends the turn.
- UI actions — a “send” button or other application event marks the utterance complete.
- Application timeouts — your own logic decides the turn is over.
- External turn detection — you already run a VAD or endpointing stack and want to keep it while adopting Flux for transcription. See Bring Your Own Turn Detection.
Send a ForceEndTurn message
Section titled “Send a ForceEndTurn message”Send the following JSON as a WebSocket text frame. The message has no additional fields — it operates on the turn currently in progress.
{
"type": "ForceEndTurn"
}Response
Section titled “Response”When a turn is active, the server responds with a standard EndOfTurn message. The trigger field is set to manual, and the transcript reflects all audio received before the ForceEndTurn message arrived.
{
"type": "TurnInfo",
"request_id": "ad12514a-0d38-4f7e-8fba-cce10d8f174c",
"sequence_id": 42,
"event": "EndOfTurn",
"turn_index": 3,
"audio_window_start": 4.2,
"audio_window_end": 6.8,
"transcript": "I need to cancel my subscription",
"words": [
{ "word": "I", "confidence": 0.95 },
{ "word": "need", "confidence": 0.93 },
{ "word": "to", "confidence": 0.97 },
{ "word": "cancel", "confidence": 0.91 },
{ "word": "my", "confidence": 0.96 },
{ "word": "subscription", "confidence": 0.89 }
],
"end_of_turn_confidence": 0.35,
"trigger": "manual"
}The response behaves exactly like a natural EndOfTurn, with two things to note:
transcriptreflects the audio transcribed so far.ForceEndTurnends the turn on the latest transcription rather than triggering an additional decode pass, so the transcript matches the most recentUpdate. Audio received afterForceEndTurnbelongs to the next turn.end_of_turn_confidenceis the model’s actual confidence at the moment you forced the end — it is not inflated to1.0. In the example above,0.35shows the model was well short of ending the turn on its own. Use it as diagnostic data.
After the EndOfTurn, turn_index increments and Flux is ready for the next StartOfTurn — the same post-turn state as a natural end-of-turn.
The trigger field
Section titled “The trigger field”trigger is present on every EndOfTurn event and only there. It states what caused the turn to end.
| Value | Meaning |
|---|---|
model |
The turn ended by Flux’s native end-of-turn detection. |
manual |
The turn ended because you sent a ForceEndTurn message. |
timeout |
The turn ended because eot_timeout_ms elapsed. |
Behavior and edge cases
Section titled “Behavior and edge cases”| Condition | Behavior |
|---|---|
No active turn (before StartOfTurn or after EndOfTurn) |
Ignored, with a Warning. No EndOfTurn is emitted and turn_index does not advance. The server returns a Warning message with code FORCE_END_TURN_NO_ACTIVE_TURN (not an Error). Timing races between an external signal and Flux’s StartOfTurn are normal, so this is not a hard error. |
An EagerEndOfTurn is pending |
ForceEndTurn supersedes the eager state. EndOfTurn fires with "trigger": "manual" and no TurnResumed is emitted. |
| Active turn, no eager pending | EndOfTurn is emitted directly with "trigger": "manual". No EagerEndOfTurn is synthesized, and end_of_turn_confidence may be below eager_eot_threshold. |
Sent alongside CloseStream |
Messages are processed in strict order. ForceEndTurn then CloseStream: the turn ends with the transcript decoded so far, then the connection closes. CloseStream then ForceEndTurn: the connection closes and the later ForceEndTurn has no effect. |
Repeated ForceEndTurn messages |
The first ends the turn. Subsequent messages arrive with no active turn, so each returns a FORCE_END_TURN_NO_ACTIVE_TURN Warning and is otherwise ignored. |
Sent on /v1/listen (Nova-3) |
Returns an error. ForceEndTurn is supported only on the Flux /v2/listen endpoint. |
Related Resources
Section titled “Related Resources”- Bring Your Own Turn Detection - Keep your existing turn detection and drive Flux turns with
ForceEndTurn - End-of-Turn Detection Parameters - Tune
eot_threshold,eager_eot_threshold, andeot_timeout_ms - Configure - Update stream configuration mid-stream
- Close Stream - Close the WebSocket stream
- Understanding the Flux State Machine - Turn events and state transitions
- Getting Started with Flux - Quickstart guide with basic configuration