Force End Turn

Send a ForceEndTurn message to end the current turn immediately from an external signal.
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

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). EndOfTurn carries "trigger": "model".
  • Semi-manual — keep native detection running and override it with ForceEndTurn whenever you have a definitive signal. The model handles the ambiguous endings; you handle the unambiguous ones.
  • Fully manual — set eot_threshold=1.0 to suppress native detection entirely and drive every turn ending with ForceEndTurn. 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

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

Send the following JSON as a WebSocket text frame. The message has no additional fields — it operates on the turn currently in progress.

JSON
1{
2 "type": "ForceEndTurn"
3}

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.

JSON
1{
2 "type": "TurnInfo",
3 "request_id": "ad12514a-0d38-4f7e-8fba-cce10d8f174c",
4 "sequence_id": 42,
5 "event": "EndOfTurn",
6 "turn_index": 3,
7 "audio_window_start": 4.2,
8 "audio_window_end": 6.8,
9 "transcript": "I need to cancel my subscription",
10 "words": [
11 { "word": "I", "confidence": 0.95 },
12 { "word": "need", "confidence": 0.93 },
13 { "word": "to", "confidence": 0.97 },
14 { "word": "cancel", "confidence": 0.91 },
15 { "word": "my", "confidence": 0.96 },
16 { "word": "subscription", "confidence": 0.89 }
17 ],
18 "end_of_turn_confidence": 0.35,
19 "trigger": "manual"
20}

The response behaves exactly like a natural EndOfTurn, with two things to note:

  • transcript reflects the audio transcribed so far. ForceEndTurn ends the turn on the latest transcription rather than triggering an additional decode pass, so the transcript matches the most recent Update. Audio received after ForceEndTurn belongs to the next turn.
  • end_of_turn_confidence is the model’s actual confidence at the moment you forced the end — it is not inflated to 1.0. In the example above, 0.35 shows 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

trigger is present on every EndOfTurn event and only there. It states what caused the turn to end.

ValueMeaning
modelThe turn ended by Flux’s native end-of-turn detection.
manualThe turn ended because you sent a ForceEndTurn message.
timeoutThe turn ended because eot_timeout_ms elapsed.

trigger is an open set — new values may be added, so handle unrecognized ones gracefully.

Behavior and edge cases

ConditionBehavior
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 pendingForceEndTurn supersedes the eager state. EndOfTurn fires with "trigger": "manual" and no TurnResumed is emitted.
Active turn, no eager pendingEndOfTurn is emitted directly with "trigger": "manual". No EagerEndOfTurn is synthesized, and end_of_turn_confidence may be below eager_eot_threshold.
Sent alongside CloseStreamMessages 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 messagesThe 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.