What if your app could talk back โ like a real person?
This weekend I built a browser-based AI Voice Assistant that listens, understands, and responds โ all in real time. No browser plugins, no command syntax, no install โ just a mic and a modern web browser.
Itโs like talking to ChatGPT โ but with your voice, and without any UI friction.
๐ ๏ธ Tech Stack Overview
- ๐ค LiveKit โ WebRTC-based real-time audio streaming
- โ๏ธ Deepgram โ ASR (speech-to-text) transcription
- ๐ง OpenAI โ LLM for understanding and generating replies
- ๐๏ธ Cartesia (optional) โ for visual context-aware logic (DOM/UI understanding)
โ๏ธ Flow Architecture
Hereโs the high-level pipeline:
- A[User Speaks] --> B[LiveKit Streams Audio]
- B --> C[Deepgram Transcribes Speech]
- C --> D[OpenAI Interprets + Responds]
- D --> E[Response Returned (and Spoken)]
LiveKit handles reliable, low-latency mic audio. Deepgram transcribes voice input in real time. OpenAI then processes the transcription and generates a contextual reply. You can optionally use Web Speech API for speech synthesis โ so the assistant actually โtalks back.โ
๐ฆ Dev Setup
Youโll need API keys for:
- LiveKit Cloud or self-hosted server
- Deepgram API
- OpenAI Platform
And a basic setup like this:
- Start mic capture and send audio to LiveKit room
- Pipe LiveKit audio to Deepgram (WebSocket or media pipeline)
- On final transcript, send to OpenAI
- Get response โ optionally use SpeechSynthesis API
I'll be open-sourcing a simple implementation soon. Let me know if you're interested and Iโll drop the repo here.
๐ Real-World Use Cases
- AI customer support agents
- Accessibility tools for hands-free apps
- Internal smart copilots
- Voice-controlled AI tutors or dashboards
- Lightweight browser-based companions
This is a super flexible base โ especially with Cartesia if you want the assistant to understand or act on what's on screen.
๐งต Docs & Links
LiveKit: https://docs.livekit.io
Deepgram: https://developers.deepgram.com/docs/quickstart
OpenAI: https://platform.openai.com/docs
Cartesia: https://cartesia.ai
Top comments (0)