Transform receives LLMPacket variants and must handle interruptions.
Directory Structure
Step 1 — Add a Constant
Openapi/assistant-api/internal/transformer/transformer.go:
Step 2 — Implement TextToSpeechTransformer
InterruptionPacket must be handled immediately to stop playback — otherwise the user will hear the AI speaking over them.
Step 3 — Register in the Factory
Step 4 — Rebuild
Reference: Deepgram Aura Implementation
wss://api.deepgram.com/v1/speak, JSON control messages (Speak, Flush, Clear).