| 1 | # Voice input |
| 2 | |
| 3 | Transcription edits a composer draft. It does not submit an agent turn. Audio is |
| 4 | temporary client input, and only normal message submission sends the resulting |
| 5 | text. The current implementation transcribes locally on supported iOS devices; |
| 6 | environment-backed transcription is not implemented. |
| 7 | |
| 8 | The [shared controller](../../packages/client-runtime/src/voice-input/controller.ts) |
| 9 | owns the operation while the client supplies capture and transcription. Preparation |
| 10 | binds the transcriber and resolved locale for the whole recording. Draft ownership, |
| 11 | text, and revision are captured before recording and checked before insertion, so |
| 12 | a late transcript cannot overwrite a draft that was edited or replaced. |
| 13 | |
| 14 | Cancellation invalidates a result immediately, but resources stay owned until the |
| 15 | underlying work settles. Apple's native transcription call cannot be interrupted |
| 16 | once started. Releasing the session or deleting its recording when the abort signal |
| 17 | fires would race that work. The [transcription contract](../../packages/client-runtime/src/voice-input/transcription.ts) |
| 18 | therefore requires implementations to settle only after their work has stopped; |
| 19 | the [Apple binding](../../apps/mobile/src/native/voiceTranscription.ios.ts) checks |
| 20 | cancellation between native calls and discards late results. |