# `Codex.Voice.Model.STTModel`
[🔗](https://github.com/nshkrdotcom/codex_sdk/blob/v0.18.1/lib/codex/voice/model.ex#L65)

Behaviour for speech-to-text models.

STT models convert audio input into text transcriptions. They support
both single-shot transcription and streaming transcription sessions.

Note: The behaviour callbacks use module-level functions. Implementations
should use struct-based models where the struct is passed as the first
parameter to instance methods like `transcribe/5` and `create_session/5`.

# `create_session`

```elixir
@callback create_session(
  model :: struct(),
  input :: Codex.Voice.Input.StreamedAudioInput.t(),
  settings :: Codex.Voice.Config.STTSettings.t(),
  trace_include_sensitive_data :: boolean(),
  trace_include_sensitive_audio_data :: boolean()
) :: {:ok, pid()} | {:error, term()}
```

Creates a streaming transcription session.

The session receives audio input via the `StreamedAudioInput` and
produces text transcriptions for each detected turn.

## Parameters

- `input` - The streamed audio input
- `settings` - STT settings
- `trace_include_sensitive_data` - Whether to include text in traces
- `trace_include_sensitive_audio_data` - Whether to include audio in traces

## Returns

- `{:ok, session_pid}` - The session process
- `{:error, reason}` - If session creation fails

# `model_name`

```elixir
@callback model_name() :: String.t()
```

Returns the name of the STT model.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
