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

AssemblyAI text-to-speech, over its streaming WebSocket.

`connect/1` opens a session to share (the TTS processor opens one per
agent), so replies after the first skip the connection setup; without
it, a call opens its own and ends it after. The voice, model, language
and sample rate are fixed for a session.

Reads `ASSEMBLY_AI_API_KEY`. `:voice` is a voice slug such as `"aai-kyla"`
(the default) or a cloned voice's id, and `:model` is
`"assemblyai-tts-1"`. Besides `Octoroom.Agent.TTS`'s options it takes
`:language` (`"english"`, `"spanish"`, `"german"`, `"italian"`,
`"portuguese"` or `"french"`; by default the voice's), `:region` (`:us`,
the default, or `:eu`) and `:receive_timeout` (ms to wait for each
message, default 60 s).

# `connect`

Opens a session for calls to share, closed when the calling process
exits. Returns the options with it as `:connection`. Without an API key it
opens nothing, and calls report the missing key.

---

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