# `ReqLLM.Speech.Result`
[🔗](https://github.com/agentjido/req_llm/blob/main/lib/req_llm/speech/result.ex#L1)

Result of a text-to-speech generation operation.

Contains the generated audio binary, media type, format, and optional duration.
Inspired by the Vercel AI SDK's `SpeechResult`.

## Fields

  * `:audio` - The generated audio as raw binary data
  * `:media_type` - The IANA media type of the audio (e.g., "audio/mpeg")
  * `:format` - The audio format as a string (e.g., "mp3", "wav")
  * `:duration_in_seconds` - The duration of the generated audio, or `nil`

## Examples

    %ReqLLM.Speech.Result{
      audio: <<...binary data...>>,
      media_type: "audio/mpeg",
      format: "mp3",
      duration_in_seconds: nil
    }

# `t`

```elixir
@type t() :: %ReqLLM.Speech.Result{
  audio: binary(),
  duration_in_seconds: float() | nil,
  format: String.t(),
  media_type: String.t()
}
```

---

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