🎤Micdrop

How a Real-Time Voice AI Agent Works

The turns of a call

A call is a loop of turns. Each turn goes through six steps:

  1. The client, in a browser or a mobile app, captures the microphone and runs voice activity detection (VAD) to tell when the user is speaking. Audio leaves the browser only during speech.
  2. A WebSocket carries that audio to your Node.js server. Your provider API keys stay on the server, so the browser never needs a session token.
  3. Speech to text (STT) transcribes the audio as it arrives.
  4. When the user stops speaking, the LLM writes the answer.
  5. Text to speech (TTS) turns the answer into audio while the LLM is still writing it. The server streams that audio to the browser, which plays it.
  6. When the user speaks over the answer, the client stops playback and the server cancels the LLM and the TTS.

Interruptions and echo

Interruptions need echo cancellation. Without it, the microphone picks up the assistant’s voice. If interruptions stayed on, the assistant would answer itself, so Micdrop turns them off. The browser’s echo cancellation usually removes the assistant’s voice from the microphone signal. With headphones, that voice never reaches the microphone.

Realtime models

A realtime speech to speech model, such as the OpenAI Realtime API or Gemini Live, can replace speech to text, the LLM and text to speech on its own. It answers sooner and hears the tone of the voice. With three separate providers, you choose each one and often pay less per minute. Micdrop lets you switch a call to a realtime model on the server and keep the same client code.

Transports

The OpenAI Realtime API and LiveKit connect the browser over WebRTC. Micdrop connects it over a WebSocket to your own backend by default, so you deploy only the server you already run. The same call can also run over WebRTC, which holds up better on weak mobile networks, or answer phone calls through a telephony transport, with the server detecting the turns itself. Transports compares them, and WebSocket or WebRTC weighs the two for group calls, video and phone lines.

Ready for production

Micdrop is MIT licensed and runs on your infrastructure with your own provider keys. You build yourself what a hosted platform includes: transcript storage, call history and a dashboard.