Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions chapters/live-stt/features/end-of-turn.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
title: "Semantic end-of-turn"
description: "Finalize a turn when the speaker has actually finished, not just when they go quiet"
---

Semantic end-of-turn detection decides that a speaker has finished their turn based on **what they said**, not only on how long they stayed silent. It runs on top of the usual [endpointing](https://docs.gladia.io/chapters/live-stt/features/endpointing) and lets the API hold a turn open through natural mid-sentence pauses, then finalize as soon as the thought is complete.

It is designed for conversational, turn-taking use cases — voice agents, IVR, live assistants — where cutting a speaker off on a brief hesitation ("I'd like… uh… a coffee, please") feels broken.

### Endpointing vs end-of-turn

Check warning on line 10 in chapters/live-stt/features/end-of-turn.mdx

View check run for this annotation

Mintlify / Mintlify Validation (gladia-95) - vale-spellcheck

chapters/live-stt/features/end-of-turn.mdx#L10

Did you really mean 'Endpointing'?

Both answer the same question — *has this turn finished?* — but they look at different signals.

**Endpointing** is **time-based**. It waits for a fixed amount of *silence* and, once that silence passes, closes the turn. It is simple and predictable, but silence is only a proxy for "finished": a speaker who pauses to think looks exactly like a speaker who is done. Set the window short and you cut people off mid-thought; set it long and every turn feels sluggish.

Check warning on line 14 in chapters/live-stt/features/end-of-turn.mdx

View check run for this annotation

Mintlify / Mintlify Validation (gladia-95) - vale-spellcheck

chapters/live-stt/features/end-of-turn.mdx#L14

Did you really mean 'Endpointing'?

**End-of-turn** is **meaning-based**. A model listens to the content of the turn and judges whether the speaker has actually reached the end of what they were saying. A pause in the middle of a sentence no longer forces a cut — the turn stays open until the utterance is genuinely complete, or a safety limit is reached.

The two are complementary, not exclusive: endpointing remains the silence-based safety net, and end-of-turn adds a layer of semantic judgment on top of it.

Check warning on line 18 in chapters/live-stt/features/end-of-turn.mdx

View check run for this annotation

Mintlify / Mintlify Validation (gladia-95) - vale-spellcheck

chapters/live-stt/features/end-of-turn.mdx#L18

Did you really mean 'endpointing'?

| | Endpointing | Semantic end-of-turn |

Check warning on line 20 in chapters/live-stt/features/end-of-turn.mdx

View check run for this annotation

Mintlify / Mintlify Validation (gladia-95) - vale-spellcheck

chapters/live-stt/features/end-of-turn.mdx#L20

Did you really mean 'Endpointing'?
|---|---|---|
| Decides on | Duration of silence | Whether the thought is complete |
| Mid-sentence pause | May cut the speaker off | Held open until the turn is complete |
| Best for | Simple, predictable segmenting | Natural turn-taking (voice agents, IVR) |
| Tuning | One silence window | Sensitivity + safety guard |

In short: **endpointing asks "has it been quiet long enough?"; end-of-turn asks "has the speaker actually finished?"**

Check warning on line 27 in chapters/live-stt/features/end-of-turn.mdx

View check run for this annotation

Mintlify / Mintlify Validation (gladia-95) - vale-spellcheck

chapters/live-stt/features/end-of-turn.mdx#L27

Did you really mean 'endpointing'?

### How to enable it

Add an `end_of_turn` object to your live configuration. Omit it and the session uses endpointing only (unchanged behaviour).

Check warning on line 31 in chapters/live-stt/features/end-of-turn.mdx

View check run for this annotation

Mintlify / Mintlify Validation (gladia-95) - vale-spellcheck

chapters/live-stt/features/end-of-turn.mdx#L31

Did you really mean 'endpointing'?

```json
{
"end_of_turn": {
"threshold": 0.5,
"max_wait_secs": 8

Check warning on line 37 in chapters/live-stt/features/end-of-turn.mdx

View check run for this annotation

Mintlify / Mintlify Validation (gladia-95) - vale-spellcheck

chapters/live-stt/features/end-of-turn.mdx#L37

Did you really mean 'max_wait_secs'?
}
}
```

### Parameters

**threshold** \
Definition: how confident the model must be that the turn is complete before finalizing it. Higher = the model waits until it is more certain the speaker is done.
- Default: 0.5
- Range: 0 to 1

Effect:
- Lower value = finalizes more eagerly (snappier turn-taking, but more likely to close on a natural pause).
- Higher value = waits for stronger evidence the turn is over (fewer premature cuts, slightly higher latency).

**emission_threshold** \

Check warning on line 53 in chapters/live-stt/features/end-of-turn.mdx

View check run for this annotation

Mintlify / Mintlify Validation (gladia-95) - vale-spellcheck

chapters/live-stt/features/end-of-turn.mdx#L53

Did you really mean 'emission_threshold'?
Definition: the confidence at which the `speech_turn_end` event is sent to your client, independent of the value that finalizes the utterance. Lets you surface an early "the speaker is wrapping up" signal to drive your UI or agent while keeping finalization conservative.
- Default: follows `threshold`
- Range: 0 to 1

**max_wait_secs** \
Definition: a safety limit. If the model never declares the turn complete, the utterance is finalized anyway once this much speech has elapsed, so a turn can never hang.
- Default: 8
- Range: 1 to 30

**probe_base_ms** \

Check warning on line 63 in chapters/live-stt/features/end-of-turn.mdx

View check run for this annotation

Mintlify / Mintlify Validation (gladia-95) - vale-spellcheck

chapters/live-stt/features/end-of-turn.mdx#L63

Did you really mean 'probe_base_ms'?
Definition: how often the model checks, while the speaker is still talking, whether the turn is wrapping up. This is what lets partial transcripts speed up as the end approaches.
- Default: 900
- Range: 100 to 5000

Effect:
- Lower value = more responsive turn-taking and lower latency to the final transcript, but a higher chance of finalizing on a brief mid-sentence pause.
- Higher value = more conservative, less likely to cut the speaker off.
- Keep the default unless you have a specific reason to change it; going near the minimum is not recommended for general use.

### Choosing between them

- **Meetings, lectures, captioning** — endpointing alone is usually enough; you want complete, clean segments and cadence matters less.

Check warning on line 75 in chapters/live-stt/features/end-of-turn.mdx

View check run for this annotation

Mintlify / Mintlify Validation (gladia-95) - vale-spellcheck

chapters/live-stt/features/end-of-turn.mdx#L75

Did you really mean 'endpointing'?
- **Voice agents, IVR, live assistants** — enable end-of-turn for natural turn-taking that survives hesitations, and tune `threshold` for how eagerly the agent should take its turn.
6 changes: 6 additions & 0 deletions chapters/live-stt/features/endpointing.mdx
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
---
title: "Endpointing"

Check warning on line 2 in chapters/live-stt/features/endpointing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (gladia-95) - vale-spellcheck

chapters/live-stt/features/endpointing.mdx#L2

Did you really mean 'Endpointing'?
description: "What's endpointing and how it works"

Check warning on line 3 in chapters/live-stt/features/endpointing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (gladia-95) - vale-spellcheck

chapters/live-stt/features/endpointing.mdx#L3

Did you really mean 'endpointing'?
---

Endpointing is the mechanism Gladia uses in live transcription to decide when a speaker has "finished" an utterance, so the API can close that utterance and emit a final transcript segment.

Check warning on line 6 in chapters/live-stt/features/endpointing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (gladia-95) - vale-spellcheck

chapters/live-stt/features/endpointing.mdx#L6

Did you really mean 'Endpointing'?

Check warning on line 6 in chapters/live-stt/features/endpointing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (gladia-95) - vale-spellcheck

chapters/live-stt/features/endpointing.mdx#L6

Did you really mean 'Gladia'?

In practice, endpointing answers the question: "How much silence should we wait before we consider the sentence (or turn) complete?"

Check warning on line 8 in chapters/live-stt/features/endpointing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (gladia-95) - vale-spellcheck

chapters/live-stt/features/endpointing.mdx#L8

Did you really mean 'endpointing'?

### Why endpointing matters

Check warning on line 10 in chapters/live-stt/features/endpointing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (gladia-95) - vale-spellcheck

chapters/live-stt/features/endpointing.mdx#L10

Did you really mean 'endpointing'?

Endpointing is one of the main knobs that controls the tradeoff between:

Check warning on line 12 in chapters/live-stt/features/endpointing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (gladia-95) - vale-spellcheck

chapters/live-stt/features/endpointing.mdx#L12

Did you really mean 'Endpointing'?
- **Latency (speed)**: how quickly you get final utterances
- **Completeness**: whether you avoid cutting someone off mid-thought
- **Chunking quality**: whether utterances align well with natural turns or sentences

Lower endpointing values feel "snappier" (great for voice agents), while higher values tend to produce cleaner, more complete segments (great for meetings and lectures).

Check warning on line 17 in chapters/live-stt/features/endpointing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (gladia-95) - vale-spellcheck

chapters/live-stt/features/endpointing.mdx#L17

Did you really mean 'endpointing'?

### How it works conceptually

During a live session, Gladia continuously analyzes the incoming audio stream and:

Check warning on line 21 in chapters/live-stt/features/endpointing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (gladia-95) - vale-spellcheck

chapters/live-stt/features/endpointing.mdx#L21

Did you really mean 'Gladia'?
1. Detects speech activity on each channel (voice activity detection)
2. Groups speech into an "utterance" while speech is ongoing
3. When it observes silence lasting at least endpointing seconds, it considers the utterance finished and closes it (finalizes it).

Check warning on line 24 in chapters/live-stt/features/endpointing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (gladia-95) - vale-spellcheck

chapters/live-stt/features/endpointing.mdx#L24

Did you really mean 'endpointing'?
4. The AI model is then used to transcribe the final result of the utterance.
5. If speech never pauses long enough, Gladia still has a safety mechanism to close the utterance (*maximum_duration_without_endpointing*, see next section)

Check warning on line 26 in chapters/live-stt/features/endpointing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (gladia-95) - vale-spellcheck

chapters/live-stt/features/endpointing.mdx#L26

Did you really mean 'Gladia'?

Check warning on line 26 in chapters/live-stt/features/endpointing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (gladia-95) - vale-spellcheck

chapters/live-stt/features/endpointing.mdx#L26

Did you really mean 'maximum_duration_without_endpointing'?

You can also subscribe to speech activity messages to know when speech [starts](https://docs.gladia.io/api-reference/v2/live/callback/speech-start) and [ends](https://docs.gladia.io/api-reference/v2/live/callback/speech-end) (useful to drive UI or agent turn-taking)

### The 2 key parameters

**endpointing (seconds)** \

Check warning on line 32 in chapters/live-stt/features/endpointing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (gladia-95) - vale-spellcheck

chapters/live-stt/features/endpointing.mdx#L32

Did you really mean 'endpointing'?
Definition: the duration of silence that closes the current utterance.
- Default: 0.05
- Range: 0.01 to 10
Expand All @@ -38,10 +38,16 @@
- Smaller value = closes utterances faster, but can split sentences if the speaker hesitates briefly.
- Larger value = waits longer before finalizing, which improves segment completeness but increases latency.

**maximum_duration_without_endpointing (seconds)**

Check warning on line 41 in chapters/live-stt/features/endpointing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (gladia-95) - vale-spellcheck

chapters/live-stt/features/endpointing.mdx#L41

Did you really mean 'maximum_duration_without_endpointing'?

Definition: maximum amount of time Gladia will keep an utterance open without detecting endpointing silence. If that limit is reached, the utterance is considered finished anyway.

Check warning on line 43 in chapters/live-stt/features/endpointing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (gladia-95) - vale-spellcheck

chapters/live-stt/features/endpointing.mdx#L43

Did you really mean 'Gladia'?

Check warning on line 43 in chapters/live-stt/features/endpointing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (gladia-95) - vale-spellcheck

chapters/live-stt/features/endpointing.mdx#L43

Did you really mean 'endpointing'?
- Default: 5
- Range: 5 to 60

Why it exists: it prevents extremely long, never-ending utterances (for example: constant background noise, a speaker who never pauses, or long monologues), which is important for downstream UX and processing stability.

### Endpointing vs end-of-turn

Check warning on line 49 in chapters/live-stt/features/endpointing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (gladia-95) - vale-spellcheck

chapters/live-stt/features/endpointing.mdx#L49

Did you really mean 'Endpointing'?

Endpointing is **time-based**: it closes a turn after a fixed amount of silence. That makes it simple and predictable, but silence is only a proxy for "finished" — a speaker who pauses to think looks the same as one who is done, so a short window can cut people off mid-thought.

Check warning on line 51 in chapters/live-stt/features/endpointing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (gladia-95) - vale-spellcheck

chapters/live-stt/features/endpointing.mdx#L51

Did you really mean 'Endpointing'?

[Semantic end-of-turn](https://docs.gladia.io/chapters/live-stt/features/end-of-turn) is **meaning-based**: a model judges whether the speaker has actually reached the end of their turn, so a natural mid-sentence pause no longer forces a cut. The two work together — endpointing stays the silence-based safety net, and end-of-turn adds semantic judgment on top. For natural turn-taking (voice agents, IVR), enable end-of-turn; for simple, predictable segmenting, endpointing alone is enough.

Check warning on line 53 in chapters/live-stt/features/endpointing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (gladia-95) - vale-spellcheck

chapters/live-stt/features/endpointing.mdx#L53

Did you really mean 'endpointing'?

Check warning on line 53 in chapters/live-stt/features/endpointing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (gladia-95) - vale-spellcheck

chapters/live-stt/features/endpointing.mdx#L53

Did you really mean 'endpointing'?
1 change: 1 addition & 0 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"chapters/live-stt/quickstart",
"chapters/live-stt/audio-intelligence",
"chapters/live-stt/features/endpointing",
"chapters/live-stt/features/end-of-turn",
"chapters/live-stt/features/partial-transcripts",
"chapters/live-stt/recommended-parameters"
]
Expand Down