Custom Integration - xAI (Grok) TTS for Home Assistant - Claude wrote the code

I wanted to use xAI's new TTS API (Eve voice) in my Home Assistant voice pipeline instead of OpenAI. Rather than write it myself, I worked with Claude to build the integration through conversation — describing what I needed, hitting errors, iterating on fixes. Claude wrote all the code.

The result is a working custom component with a full UI config flow, all five xAI voices (Eve, Ara, Rex, Sal, Leo), and support for xAI's expressive speech tags like [pause], [laugh], <emphasis>, <slow>, etc.

Eve is genuinely good — noticeably more expressive than OpenAI's Ballad voice for longer content, and at the same price point ($15/1M characters).

The main technical challenge was that HA's modern TTS platform requires async_stream_tts_audio returning a TTSAudioResponse — the older async_get_tts_audio path silently fails in voice pipelines. That took a while to figure out and isn't well documented.

Repo: GitHub - therealakahn/ha-xai-tts: Custom Home Assistant TTS integration for xAI (Grok) — Eve, Ara, Rex, Sal, and Leo voices with expressive speech tags support · GitHub

Happy to answer questions. No HACS support planned — it's provided as-is.