Skip to content

Build1 publisher2 min readPublished

Optimizing for first audio cut nine seconds of caller silence to about 1.5

A client's request for an expressive voice pushed a team off VAPI and onto Twilio, Deepgram and Cartesia. The metric they chased was time-to-first-audio: how fast the first syllable arrives. Owning the pipeline means owning barge-in.

The Engineer · Build desk

Illustration accompanying Optimizing for first audio cut nine seconds of caller silence to about 1.5

What happened

  • A VAPI integration built to automate phone onboarding was replaced with an in-house stack on Twilio for telephony, Deepgram for speech-to-text and Cartesia for text-to-speech and voice generation.
  • The first assembled pipeline left callers with about nine seconds of silence after a question such as "What's the TB test process?", which the post says is long enough that most people would hang up.
  • The team reports about 1.5 seconds now, after retargeting the pipeline at time-to-first-audio instead of total response time.

Compiled by The EngineerSomething wrong?How this is made

Why it matters

  • decision Teams weighing a managed voice platform get a documented crossover point: the workaround stacked on a workaround around a fixed vendor default, at which the platform stops being cheaper than the pipeline.
  • cost The recurring bill for the rebuild is on-call time on interruption and turn-taking edge cases, and it is paid by the engineers who take the pages.
  • constraint Every later addition, guardrail checks included, now has to fit inside the same time-to-first-audio budget the team spent seven and a half seconds buying back.

Nine seconds of dead air sounds like a dropped call, and the dev.to write-up says that gap is long enough that most people would hang up [1]. A dashboard shows total response time. A caller hears only the silence before the first syllable, and once audio is playing the rest of the generation runs underneath it.

Three of the four changes in the post attack that gap at the front. Sentence-level streaming hands the first finished sentence to Cartesia while the model is still writing the second [9][6]. Warm connections keep the vendor sockets open so the first turn does not pay setup [9]. On-device embeddings take a network hop out of the retrieval that remains [9]. Conditional RAG removes the retrieval stage entirely for turns that do not need it [9].

Nine seconds to about 1.5 is 7.5 seconds removed, a factor of six [13]. Each of the four changes carries a condition. Conditional RAG pays in proportion to the share of turns that can skip retrieval, so on a line where every question hits the knowledge base it pays nothing. If volume is low, the first call of the morning still pays connection setup, warm pool or not. On-device embeddings assume the embedding model fits wherever the orchestrator runs. The post reports the two latency figures and the four changes. There is no cost comparison, and no word on whether 1.5 seconds is a median or a tail value [14].

"Owning the orchestration layer yourself means you now own barge-in, turn detection, guardrails, and every edge case a managed platform used to absorb for you," the author wrote [10]. The post's own list of what a voice system has to handle runs to turn detection, interruptions, conversation flow management, speech recognition and speech generation [7]. Deepgram covers recognition and Cartesia covers generation [6]. Turn detection, barge-in and flow management are code the team maintains.

The rebuild started from one requirement. The client wanted a more natural, expressive voice able to convey emotion, and at the time that was not straightforward through VAPI [4]. The first workaround pulled the available Cartesia voices, stored their IDs in a JSON configuration, and called Cartesia directly during voice selection [5]. More requests followed, and the post argues that customization gets harder as requirements get more specific [18]. The client then chose what the post calls the "best of the best" combination from the cost estimation document [11]. The stated goal was to use each platform for what it does best and keep full control of the orchestration layer [12].

What to watch

  • Whether the team publishes the per-minute cost of the three-vendor stack against the VAPI bill it replaced.
  • Whether in-house barge-in and turn detection hold up on noisy mobile calls, and what the false-interruption rate is.
  • Whether the 1.5 second figure survives on a call type where every turn needs retrieval.
Loading claim ledger
Loading source directory links
Loading share composer
Loading topic controls
Loading related stories