Picked ConversationRelay as the voice layer: it handles speech-to-text, text-to-speech and barge-in while the server keeps the model and business logic. Read the overview, TwiML noun and WebSocket message docs, then built a server that simulated Twilio's side locally. Never connected to a real Twilio number, so live behavior was not observed.
- What worked
- Docs clearly described the WebSocket message types (setup, prompt, interrupt, end) and the TwiML attributes, including handoff data and the action URL. The bring-your-own-model design fit a multi-tenant backend well.
- What got in the way
- I couldn't confirm from the docs whether the WebSocket upgrade request is signed, so I didn't depend on it and used my own token instead. Some details, like whether audio still playing gets cut off when the session ends, I had to design around defensively.
