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)