# AdapterTurnControl
Source: https://docs.maelstrom-ai.co/dev/reference/realtime/interfaces/adapterturncontrol/
Documentation revision: 89a8f5e9d10cedcf0b30376d7846113f06f26120
SDK manifests in this build: @maelstrom-co/react@0.2.1, @maelstrom-co/client@0.2.1, @maelstrom-co/connectors@0.2.1, @maelstrom-co/protocol@0.2.1, @maelstrom-co/engine@0.2.1
These docs follow this source revision. Manifest versions do not prove release compatibility; verify the installed package exports before using an API.

Defined in: [packages/realtime/src/lib/realtime-session/provider-adapter.types.ts:142](https://github.com/maelstrom-co/maelstrom/blob/89a8f5e9d10cedcf0b30376d7846113f06f26120/packages/realtime/src/lib/realtime-session/provider-adapter.types.ts#L142)

Manual turn-boundary control for adapters that establish manual mode. `startTurn` opens the mic / STT stream, while `endTurn` flushes it and triggers the provider’s turn-final transcript. An adapter may expose or replace this control dynamically when automatic detection degrades; speech- native providers detect turns themselves and omit it.

An implementation decides what starting and ending a turn means; for example, it may unmute a microphone, open an STT stream, or flush buffered audio. Depending on the provider, calls while disconnected or with no captured audio may be no-ops, and an empty turn may produce no transcript. Operational failures may arrive as adapter error events while these promises resolve. For a fatal [RealtimeVoiceError](https://docs.maelstrom-ai.co/dev/reference/realtime/classes/realtimevoiceerror/), `RealtimeSession` exposes `state === 'error'` and preserves the cause in `lastError`, so consumers must observe both values. OpenAIAdapter omits `turnControl` because OpenAI owns turn detection.

Invariant: `RealtimeSession` NEVER calls these methods — they exist purely for the binding/UI layer to drive. The session stays agnostic to whether a provider is push-to-talk; only the surface that renders controls acts on this capability.

## Methods

### endTurn()

> **endTurn**(): `Promise`<`void`\>

Defined in: [packages/realtime/src/lib/realtime-session/provider-adapter.types.ts:146](https://github.com/maelstrom-co/maelstrom/blob/89a8f5e9d10cedcf0b30376d7846113f06f26120/packages/realtime/src/lib/realtime-session/provider-adapter.types.ts#L146)

Request the provider-defined end of a turn; an empty turn may produce no transcript.

#### Returns

`Promise`<`void`\>

* * *

### startTurn()

> **startTurn**(): `Promise`<`void`\>

Defined in: [packages/realtime/src/lib/realtime-session/provider-adapter.types.ts:144](https://github.com/maelstrom-co/maelstrom/blob/89a8f5e9d10cedcf0b30376d7846113f06f26120/packages/realtime/src/lib/realtime-session/provider-adapter.types.ts#L144)

Request the provider-defined start of a user turn; this may be a no-op.

#### Returns

`Promise`<`void`\>
