# `Octoroom.Agent.TTS.OpenAI`
[🔗](https://github.com/samrat/octoroom/blob/v0.1.0/agents/lib/octoroom/agent/tts/open_ai.ex#L1)

OpenAI text-to-speech (`/v1/audio/speech`).

Reads `OPENAI_API_KEY`. OpenAI's raw PCM is 24 kHz only, so
`:sample_rate` must be 24 000. Besides `Octoroom.Agent.TTS`'s options it
takes `:instructions` (how to speak; `gpt-4o-mini-tts` only), `:speed`,
and `:stream` (`true`, the default, passes audio on as it downloads).

---

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