Reliability of a Micdrop Voice Call
A voice call depends on several providers and on the code of your tools, and any of them can fail, hang or be cut short by the user. Micdrop keeps two promises whatever happens: the call never goes silent for good, and a call that ends leaves nothing behind in the process. Each case below is a scenario test of the repository, run on every change with scripted fakes in place of the providers, so you can read exactly what is checked.
What the scenarios cover
The scenarios live in packages/server/tests/scenarios, plus one file for the client in packages/client/tests/scenarios.test.ts. Most of them end the same way: one more turn of the user gets a spoken answer, which proves the call is still alive.
To run the same kind of scenarios on your own agent, see Testing a voice agent.
The user interrupts the assistant
| Scenario | What happens |
|---|---|
| The user talks over the assistant mid-sentence | The voice stops at once, the far end is told to drop the audio it still holds, and the new turn is answered |
| The user speaks while a tool runs | The answer stops without waiting for the tool. The call gets an error as its result right away, then the real result in its place once the tool returns |
| The user speaks while a tool never returns | The call is free again and answers the new turn |
| The user speaks while the model is still thinking | The first answer is dropped before a word of it is heard, and only the second one completes |
| The user takes several turns in a row, quickly | A single answer follows the last turn |
| The transcript of a turn lands after the next turn ended | The server waits for the transcript of the last turn, and answers both at once |
| The user mutes during an answer | The voice stops, the turn is forgotten, and the call answers once the user speaks again |
A tool or the model fails
| Scenario | What happens |
|---|---|
| A tool throws | The model gets { error } as the result of the call and answers |
A tool outlasts its timeout | The model gets an error as the result and answers. A result that comes later replaces the error, for the next turn |
| The model writes tool parameters that are not JSON | The call gets an error as its result |
| The model request fails | The client gets the turn back, and the next turn is answered |
| The model never answers | The user speaking again frees the call |
The model writes nothing within answerTimeout | The agent emits Failed and the client gets the turn back |
The first model of a FallbackAgent hangs | The next model answers the same turn |
| The model fails halfway through its answer | What was said is kept, and the call goes on |
In every case, each tool call of the conversation has its result right after it. Most model APIs refuse a request otherwise, which would leave every later turn unanswered.
A speech provider fails
| Scenario | What happens |
|---|---|
| The speech to text fails | The client gets the turn back |
| The transcript never comes | After 10 seconds the client gets the turn back, and the next turn does not wait for it |
| The transcript comes after those 10 seconds | It is still answered |
| The text to speech fails | The answer reaches the client as text, and the client gets the turn back |
| A synthesis never returns | The user speaking again frees the voice, and the next answer is spoken |
The call ends
| Scenario | What happens |
|---|---|
| The user hangs up while the assistant speaks | The speech to text, the agent and the voice are released, and nothing more is sent |
| The user hangs up during a tool call, or while a tool never returns | Same, and the late result of the tool goes nowhere |
| The user hangs up while speaking | The audio stream of the turn ends, and a transcript arriving afterwards changes nothing |
| The user hangs up on a model that hangs | Same release |
| The line closes several times | End is emitted once |
| The agent ends the call during its answer | The client hears EndCall and finishes the answer |
| The agent ends a phone call | The line hangs up once every word of the goodbye has been played |
| The connection drops mid-answer, or while the user speaks | The client reconnects to a new server, the old one ends its call, and the next turn is answered |
Turns
| Scenario | What happens |
|---|---|
| A one word turn, “OK”, in a single chunk of audio | It is answered |
| A turn without audio, or in which the speech to text heard nothing | The client gets the turn back |
| The transcript lands before the end of the turn | One answer, once the turn ends |
The end of a turn is sent twice, or answer() is called during an answer | One answer |
| Twenty turns in a row | Every message is kept, in order |
With a speech to speech model
The same scenarios run with a realtime model in place of the speech to text, the agent and the text to speech. The model stops speaking when the user talks over it or mutes, and what the user heard of the interrupted answer is kept. A tool that throws or outlasts its timeout gives the model an error as its result, and a hang up in the middle of an answer releases the model.
Timeouts
Micdrop gives up on what it waits for, so a provider that never answers cannot hold a call forever. Two limits are built in, and two are yours to set, since only you know how long your model and your tools may take.
| Limit | Default | What happens past it |
|---|---|---|
| Transcript of a finished turn | 10 s | The client gets the turn back |
| Goodbye before a phone line hangs up | 30 s | The line hangs up |
answerTimeout, an option of every agent | No limit | The agent gives up and emits Failed, see FallbackAgent |
timeout, an option of every tool | No limit | The model gets an error as the result |
The user can always take the call back: speaking over the assistant cancels whatever it was waiting for.
Many calls in one process
A Micdrop server runs every call of the process side by side, each in its own MicdropServer. The scenario tests run 50 calls at once and check that each keeps its own conversation. After 50 calls hang up in the middle of an answer, every timer they started is cleared and every object they held is collected by the garbage collector. The same check runs on 20 calls carried by real WebSockets.
Load test
The load test runs the server in its own process, one MicdropServer per WebSocket, on providers that answer at once, so the numbers show what Micdrop adds and nothing else. Each call speaks five turns of one second of audio at real time pace, and waits for an answer of one second of voice.
pnpm build:vad && pnpm build:serverpnpm bench:load --calls 1000 --turns 5Measured on an Apple M2 with Node 24, a laptop shared with other work:
| Measure | 100 calls | 1000 calls |
|---|---|---|
| Heap of the server for each open call | 8 KB | 7 KB |
| Peak RSS of the server under load | 106 MB | 140 MB |
| CPU of the server while the calls speak | 7 % of one core | 30 % of one core |
| Event loop lag, median and 99th percentile | 0.66 ms and 4.8 ms | 0.22 ms and 2.1 ms |
| End of a turn to the first byte of the answer, median and 99th percentile | 0.48 ms and 10.9 ms | 0.43 ms and 7.2 ms |
| Calls still open after every client left | 0 | 0 |
| Heap left over after every client left | 275 KB | none |
The latency is measured by the load generator, which runs every client in one process over loopback: it adds its own delays to those of the server. The tail grows when the machine is busy with other work. With 2000 calls on the same laptop under heavy load from other processes, a load average around 20 on 8 cores, the median ranged from 6 to 160 ms between runs, and the 99th percentile reached 640 ms. Memory per call and the clean state after the calls end did not change between runs. Your providers add their own latency on top, which these numbers leave out.