VoiceFlow
Voice receptionist that speaks naturally, understands context, and guides customers to a booking



Why this needed to be built
How it works
Built with
System design
What I learned
Groq is the reason real-time voice is possible
OpenAI's API averages 800–1,200ms for a full response at gpt-4o. For a voice conversation, anything over 500ms feels like a frozen call. Groq's LPU inference delivers Llama 3.3 70B responses in under 300ms consistently. Switching from OpenAI to Groq was the single change that made the product feel natural rather than broken.
Web Speech API silence detection is unpredictable
The browser's built-in silence detection ends the transcript after 2–5 seconds of quiet, but the threshold varies across Chrome, Edge, and Safari. The fix was a custom end-of-utterance detector: start a 1.5s timer on every `onresult` event, reset it if new words arrive, and fire the API call when the timer expires. This gives consistent behavior across browsers.
Prompting for voice: shorter is always better
A well-structured GPT response with headers and bullet points sounds terrible when spoken aloud. The system prompt had to forbid markdown, limit responses to 2 sentences max, and instruct the model to end with a question to keep the conversation going. Treating the LLM output as speech script rather than text output improved naturalness dramatically.
What I'd do differently
Two things. First, replace the request/response pattern with WebSockets for true streaming — pipe ElevenLabs audio chunks directly to the browser as they're generated instead of waiting for the full audio file. This would cut perceived latency from ~800ms to under 200ms; the architecture is already designed for it. Second, and more importantly: add phone line integration via Twilio or Vapi. The current version is browser-only, which is great for demos but limits real-world deployment. The core AI pipeline (Groq + ElevenLabs) is already fast enough for telephony; it just needs a SIP/PSTN layer on top. That's the planned next step.
Want me to build something similar for you?
Hire me for your project →