Simple local app for real-time interview practice using Deepgram's Voice Agent API with an Express backend and server-side websocket proxy.
- Streams your microphone to Deepgram in real time
- Uses Deepgram's Voice Agent API for STT + managed LLM + TTS in one websocket
- Proxies the realtime websocket through the backend so the browser never sees the Deepgram API key
- Plays the agent's audio reply immediately
- Stops playback when you interrupt and start speaking again
- Either create a
.envfile in the project root:
DEEPGRAM_API_KEY=your_key_here
PORT=3000
ALLOWED_ORIGINS=http://127.0.0.1:3000,http://localhost:3000Or set your Deepgram API key in the shell before starting the server:
$env:DEEPGRAM_API_KEY="your_key_here"- Start the app:
node .\server.js- The server keeps your Deepgram API key entirely on the backend and opens the Deepgram Voice Agent websocket server-side with
Authorization: Token <API_KEY>. - Because the browser talks only to your local Express websocket proxy, this app does not depend on Deepgram browser token minting and does not require a
Memberkey just to generate frontend JWTs. - The Voice Agent settings in this app explicitly set
agent.think.providerto a managed model so the payload matches Deepgram's current schema. - The local
/wsproxy accepts only approved origins by default. OverrideALLOWED_ORIGINSonly if you intentionally host the UI elsewhere. - If you add or change the key, restart
node .\server.jsso the server picks it up. - This app uses Deepgram's Voice Agent API because it bundles speech-to-text, LLM orchestration, text-to-speech, and interruption-aware conversation flow.
- If your browser blocks autoplay, click the page once and then start the session again.
server.jsis the entry point.src/config.jsloads environment variables and backend config.src/server.jsruns the Express app, static hosting, health/config routes, and the websocket proxy to Deepgram.