Case study
Euphonia
A real-time AI companion for mental-health support that you can talk to out loud, not just type to.
- Role
- Solo — design & engineering
- Timeline
- 4+ months · 2024
- Stack
- Next.js, TypeScript, Groq, Supabase, Redis, Radix UI
- Links
- Live

Problem
Talking helps, but a therapist isn't always available or affordable. Euphonia is a supportive AI companion you can talk to by voice or text — not a replacement for therapy, and it points people to real help when a conversation signals a crisis. Voice matters: a conversation only feels natural if the reply comes back fast enough that it doesn't feel like waiting on a server.
What I built
I designed and built Euphonia on my own, end to end.
- Two-way voice conversation. Speech-to-text turns what you say into text, an LLM replies, and text-to-speech speaks the reply back, with inference on Groq Cloud.
- Chat mode for when talking out loud isn't an option.
- Real-time chat and auth with Supabase.
- Full-stack app in Next.js and TypeScript, with the UI built on Radix UI.
Hard parts
- A fast voice loop. Every reply passes through speech-to-text, the LLM and text-to-speech. Keeping that whole loop short enough to feel like a conversation, not a walkie-talkie, shaped most of the architecture.
- Interruptions and silence. Real conversations have pauses, false starts and people talking over each other. Deciding when the user has finished speaking, and what to do when they interrupt a reply, is much harder than handling typed messages.
- Crisis safety. On a mental-health topic the bot has to stay supportive and know its limits — recognising when a conversation signals a crisis and pointing the person to real help instead of carrying on.
Outcome
Euphonia is live at euphonia.me.
What I'd do differently
- Observability first. I'd instrument latency for each stage of the voice loop (speech-to-text, LLM, text-to-speech) before launch, so slow turns are measured rather than felt.
- Evaluate replies earlier. For a sensitive topic especially, I'd build a set of test conversations — including crisis cases — from day one and check every prompt change against it.