Measuring the real-time speech stack, layer by layer.
From browser-level instrumentation to a measured progressive speech control — and the architectural questions it exposed.
Real-time speech systems are often described with one number: latency.
That number hides most of the system.
Between a person finishing a thought and hearing a response, audio must be captured, represented, transported, interpreted, reasoned over, converted back into speech and scheduled for playback. Some of those stages are computational. Some are network-bound. Some exist only because of the architecture we chose.
We built the stack layer by layer so that we could measure those boundaries before trying to optimize them.
The result was not a single record latency number. The more important finding was that several of our largest improvements came from removing computation and removing waits, rather than making existing stages incrementally faster.
That eventually changed the question we were asking.
We started with:
How do we make the speech pipeline faster?
We ended this phase asking:
What computation actually needs to run continuously for realtime intelligence?
B3 / FROZEN ENGINEERING CONTROL
| Measurement | Median |
|---|---|
| Input end → browser playback | 1637.8 ms |
| Streaming speech TTFA | 611.8 ms |
| First client audio → playback | 4.7 ms |
| Speech generation completion | 895.2 ms |
| Observed playback underruns | 0 / 3 |
Three frozen smoke sessions. These numbers describe the experimental control, not universal production latency. B3 is currently preserved as the engineering control against which later realtime architectures can be compared. The control still contains turn-oriented barriers and is deliberately not presented as full duplex.
Start with the measurement boundary
Before speech recognition, language models or synthesis, we needed to know what the surrounding system itself was doing.
The first apparatus captured browser audio, preserved per-session evidence and measured events independently on the client and backend.
This immediately exposed a basic but important measurement problem:
The browser and backend operate in independent monotonic clock domains. Therefore a timestamp produced by one system cannot simply be subtracted from a timestamp produced by another and called one-way latency.
Instead, we measured intervals locally:
For one representative transport observation:
The important result was not that 98.0 ms was unusually fast. It was that the measurement told us where not to spend engineering time.
Only 18.7 ms of that observed application round trip was inside the instrumented server section. Eliminating the server work entirely would still leave most of the observed path untouched.
What this changed
The first lesson was methodological:
Before optimizing a stage, establish that the number attributed to that stage is actually measuring it.
This principle remained important throughout the rest of the experiments.
Latency is not the same as understanding
The next experiments introduced speech recognition.
Whole-utterance recognition gave us a useful semantic control because the recognizer had access to the complete spoken sequence before finalizing its interpretation.
Then we compared that behavior against streaming recognition using the same frozen audio.
A simple correction exposed the problem:
USER SPEECH
meeting at 4 PM
↓
no
↓
actually 5 PMAt one point in the stream, this state is perfectly reasonable:
A few hundred milliseconds later, it is wrong:
Streaming recognition could appear faster by finalizing before the later correction arrived. That produced one of the most important findings of the first phase:
The paired experiment demonstrated that ordinary latency measurements can reward a system for committing too early.
This suggested that a realtime system should not represent intermediate interpretation using only:
FINAL / NOT FINAL
It needs a richer lifecycle:
PROVISIONAL → UPDATE → REVISE → SUPERSEDE → COMMIT
│
└────→ CANCELThat is not merely a speech-recognition problem. Any continuous system acting before all future information is available has to reason about revision and commitment.
Build the conventional system first
We deliberately built a conventional end-to-end control before proposing a new architecture.
The implementation was intentionally ordinary. Its purpose was measurement.
Without a measurable control system, an architectural improvement is difficult to distinguish from a different workload, provider state or measurement boundary.
Repeated frozen-input runs exposed significant end-to-end variance. Successful executions sometimes completed in roughly 4–7 s, while slow successful runs could extend toward 18–22 s; failures were also observed.
The strongest observed concentration of variance was inside the measured language-model stage, but that observation alone did not establish the root cause. So rather than redesigning the entire pipeline, we isolated that stage.
The biggest speedup came from deleting computation
The isolated model experiment produced an unexpected trace. The model connection had started successfully, but visible response content did not immediately appear. Instrumentation then exposed a large amount of hidden reasoning activity preceding the simple conversational answer.
For the simple conversational test used in this experiment:
| Metric | Default behavior | Reduced reasoning |
|---|---|---|
| Median first visible output | ~1971.5 ms | ~307.8 ms |
| Median total | ~2228.8 ms | ~458.8 ms |
| Median reasoning chunks | ~142 | 0 |
The integrated comparison later showed the measured language-model total falling from approximately:
while campaign median end-to-end time moved from approximately:
Only the model-stage change should be causally attributed to the reasoning intervention because other stage distributions also changed between the integrated campaigns.
The important conclusion was not:
reasoning is bad.
The supported conclusion was narrower:
Deep reasoning was unnecessary for this simple reflex conversational path, and performing it anyway imposed a large latency cost.
We can express the problem as:
Traditional optimization tends to focus on:
But in this experiment, the larger gain came from:
Engineering principle
The cheapest computation is computation that never needs to run.
Completion time was the wrong speech metric
Once the conversational model path was reduced, speech generation became a more visible barrier. Originally we were measuring the time required to generate an entire waveform.
But a realtime listener does not care when the final byte of a response exists. They care when they can begin hearing it.
So the metric changed from:
to:
or TTFA.
Five paired comparisons produced:
with median paired improvement of approximately:
All five streaming runs in that paired experiment succeeded. This did not prove continuous browser playback by itself. It proved that waiting for complete speech generation was an avoidable latency barrier worth removing.
Then remove the decoding layer
The first integrated progressive-audio design contained another potential serial step:
GENERATED AUDIO
↓
COMPRESSED AUDIO
↓
GENERAL DECODER
↓
PCM
↓
BROWSERBefore optimizing that decoder path, we checked whether the intermediate representation was necessary. It was not. The resulting control instead used a direct uncompressed audio path conceptually equivalent to:
The significant architectural change was not a faster decoder. It was:
Again the same pattern appeared:
Before making a stage faster, ask whether the stage needs to exist.
B3: the frozen progressive control
After integrating progressive speech delivery and explicit browser playback scheduling, three frozen smoke sessions produced the following observations.
EXPERIMENT B3
| Run | Input → playback | Speech TTFA | Client audio → playback | Generation complete | Underruns |
|---|---|---|---|---|---|
| 01 | 1637.8 ms | 584.1 ms | 5.4 ms | 895.2 ms | 0 |
| 02 | 1769.0 ms | 611.8 ms | 3.0 ms | 1425.1 ms | 0 |
| 03 | 1618.9 ms | 626.5 ms | 4.7 ms | 849.4 ms | 0 |
| Median | 1637.8 ms | 611.8 ms | 4.7 ms | 895.2 ms | 0 / 3 |
The browser playback layer contributed very little observed delay compared with the upstream stages during these smoke runs.
What the experiment supports:
Progressive audio delivery and explicit browser scheduling worked in the measured B3 control.
What it does not support:
full duplex proven NO human naturalness proven NO production latency = 1.64 s NO gapless playback universally NO native realtime architecture NO
B3 was intentionally frozen rather than endlessly optimized.
The pattern across the experiments
The progression looks simple when reduced to its important decisions.
Or as an optimization table:
| Barrier | Initial response | Better question |
|---|---|---|
| Slow model response | Make inference faster | Does this request require deep reasoning? |
| Slow speech completion | Make synthesis finish faster | Does playback need to wait for completion? |
| Audio conversion | Optimize decoding | Can the representation bypass decoding? |
| High total latency | Optimize every stage | Which waits are architectural rather than computational? |
The recurring result was:
when the removed work was unnecessary. This was the main engineering lesson of the cascade phase.
Why stop at 1.64 seconds?
Because B3 was becoming a better version of the wrong abstraction to optimize indefinitely. The control still looks approximately like:
Speech output is progressive. The full system is not. Major semantic stages still wait for explicit boundaries.
Further optimization could reduce another few hundred milliseconds while leaving the deeper architecture intact. So B3 became the control.
The research question moved from:
How do we accelerate this cascade?
to:
Why should realtime intelligence be organized as a cascade at all?
Information does not change at one clock
Conversational systems process information with radically different temporal characteristics.
- A waveform may change tens of thousands of times per second.
- Interaction state changes at a much slower rate.
- Meaning changes around words or semantic events.
- Speaker identity may remain stable for an entire session.
- Deep reasoning may only be needed occasionally.
Conceptually:
| Information | Relative update rate |
|---|---|
| waveform | very high |
| acoustic / interaction state | high |
| prosody | high |
| semantic state | event / word scale |
| stable identity/context | low |
| deep reasoning | sparse |
| external action commitment | event-driven |
There is no obvious requirement that the same expensive global computation execute at every one of these clocks. That produced the current multi-clock research hypothesis.
A monolithic continuously expensive system can be represented conceptually as:
Our current research hypothesis separates continuous state maintenance from occasional expensive cognition:
with the desired regime:
where:
- represents ongoing conversational updates
- represents relatively cheap state maintenance
- represents global-context invocations
- represents deeper reasoning invocations
The point is not the equation itself. The research question is whether can become small without destroying semantic correctness.
From serial stages to concurrent state
The conceptual direction is therefore different from simply running every stage faster.
This figure should intentionally remain conceptual. The public report does not need to reveal:
- exact internal state representation;
- routing thresholds;
- model architecture choices;
- confidence functions;
- training strategy;
- commit-policy implementation;
- benchmark generation internals.
The useful idea is enough:
Cheap state should be able to evolve continuously while expensive global computation is invoked according to informational need rather than acoustic clock rate.
Thinking and committing are different operations
The self-correction experiment also implies another architectural separation. A realtime system may begin reasoning before it has enough evidence to safely expose an irreversible result. Therefore:
THINK
May be speculative, provisional and revisable.
COMMIT
Produces user-visible speech or an external side effect.
A future realtime system should be allowed to prepare possibilities without treating every intermediate interpretation as permission to act. Conceptually:
OBSERVE │ ▼ PROVISIONAL STATE │ ├────────▶ THINK │ │ │ ▼ │ possible plan │ ├────────▶ REVISE │ ├────────▶ CANCEL │ └────────▶ COMMIT ─────▶ SPEECH / ACTION
This is especially important once realtime interaction is connected to tools rather than only conversation.
How we test the next architecture
The current research branch compares different policies for maintaining state across an incremental conversational stream. The public version does not need to reveal the complete benchmark corpus. A representative conceptual sequence is enough:
Rahul ↓ meeting ↓ tomorrow ↓ 4 PM ↓ no ↓ actually 5 PM
The system must support more than token accumulation. It must preserve operations such as:
WAIT UPDATE REVISE RECALL COMMIT CANCEL
The current experimental framing compares three general approaches:
GLOBAL
Recompute against broad context frequently.
STATEFUL
Maintain compact state continuously.
HYBRID
Maintain cheap state normally and invoke broader computation when information demands it.
The active R0 plan evaluates accumulation, correction, late constraints, cancellation, exact historical recall and cheap conversational events, while recording latency, correctness, memory behavior and expensive-compute frequency.
One particularly useful metric is:
where is the Global Invocation Ratio.
Lower is not automatically better. A system that never invokes expensive cognition but continually loses meaning is useless. So compute has to be measured jointly with quality:
The exact objective function and thresholds remain part of the experimental program rather than a public claim.
What we learned
01
Measure the boundary before optimizing it.
Several apparently obvious latency numbers changed meaning once the exact start and end events were examined.
02
Lower latency can produce lower correctness.
Streaming systems operate before future information exists. A fast commitment to stale meaning is not a successful realtime result.
is only useful while:
remains acceptable.
03
Deleting unnecessary computation can dominate optimization.
The largest change in the simple conversational model path came from not performing expensive cognition that the task did not require.
04
First useful output matters more than final completion.
That changed the speech-generation objective from complete-waveform latency to first-playable-audio latency.
05
Serial waiting is an architectural cost.
Once enough individual stages were improved, the remaining problem became less about the speed of individual APIs and more about the boundaries between them.
Current position
B3 is the frozen engineering control.
It gives us a measurable reference system with progressive speech delivery.
Native realtime is the active research direction.
The next question is not whether another API can save another hundred milliseconds. It is:
What computation needs to exist continuously?
If rapidly changing interaction state can be maintained cheaply while global cognition runs only when the information requires it, realtime intelligence may be able to improve latency, compute efficiency and state continuity together.
If that hypothesis fails, the experiments should show us that too. That is the purpose of the next phase.
CURRENT RESEARCH
R0 / NATIVE REALTIME
Can continuously changing conversational state be maintained cheaply while expensive global cognition is invoked only when it is actually needed?
Scope of this report
This report intentionally documents results and engineering reasoning, not the complete implementation.
- experiment progression
- validated measurements
- important failures
- measurement methodology
- mathematical framing
- architectural principles
- high-level system diagrams
- what changed and why
- what remains unproven
- provider credentials and infrastructure
- internal prompts
- complete runtime code
- exact routing and confidence thresholds
- complete benchmark corpus
- full failure traces
- private model-selection experiments
- internal cost structure
- unreleased implementation details
- speculative architecture details that have not yet earned evidence
The goal is to expose enough information for the work to be technically inspectable without turning the research log into an implementation manual.