# `Codex.Voice.Models.OpenAISTTSession`
[🔗](https://github.com/nshkrdotcom/codex_sdk/blob/v0.16.1/lib/codex/voice/models/openai_stt.ex#L193)

Buffered streamed transcription session.

This GenServer consumes a `StreamedAudioInput` until it closes, then submits
the aggregated audio to the configured STT model and yields completed
transcript turns to callers.

# `t`

```elixir
@type t() :: %Codex.Voice.Models.OpenAISTTSession{
  api_key: String.t() | nil,
  completion: :done | {:error, term()} | nil,
  input: Codex.Voice.Input.StreamedAudioInput.t(),
  listener_task: Task.t() | nil,
  model: String.t(),
  settings: Codex.Voice.Config.STTSettings.t(),
  stream_task: Task.t() | nil,
  stt_model: Codex.Voice.Models.OpenAISTT.t(),
  trace_include_sensitive_audio_data: boolean(),
  trace_include_sensitive_data: boolean(),
  transcripts: [String.t()],
  waiters: [{GenServer.from(), reference()}],
  websocket: pid() | nil
}
```

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `start_link`

```elixir
@spec start_link(keyword()) :: GenServer.on_start()
```

Start a new streaming transcription session.

## Options

- `:input` - StreamedAudioInput to read audio from (required)
- `:settings` - STTSettings for transcription options (required)
- `:stt_model` - Optional `OpenAISTT` model struct to use as-is
- `:model` - Model name to use when `:stt_model` is not provided
- `:api_key` - API key (defaults to OPENAI_API_KEY env var)
- `:base_url` - API base URL when `:stt_model` is not provided
- `:client` - Optional HTTP client when `:stt_model` is not provided
- `:trace_include_sensitive_data` - Whether to include text in traces
- `:trace_include_sensitive_audio_data` - Whether to include audio in traces

---

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