Skip to content
ProLifetime access for $199, paid once, every future release included
Truffle UI

Latency Breakdown

ProNew

Where the time in one voice turn goes: stages end to end on one bar that fills in order, a marker at the target, and the total stated against it.

Installation

pnpm dlx shadcn@latest add @viewport/latency-breakdown

First time? Add the @viewport registry to components.json. Setup takes one minute.

Usage

The code behind the preview above comes with Truffle Pro.

Props

PropTypeDefault
title*string

What is being timed, e.g. "Time to first audio".

—
stages*LatencyStage[]

The stages of one turn, in the order they happen, e.g. speech to text, the model, text to speech.

—
targetMsnumber

The total you are aiming for, in milliseconds. A marker is drawn there and the result is stated against it.

—
hintstring

A note at the end of the heading, e.g. "p50, last 24 hours".

—
classNamestring—

Accessibility

  • Every stage is listed with its milliseconds and share; the bar is not the only source.
  • Over or under target is written out, not only colored.
  • Stages can be focused to isolate them.
  • The bar is shown filled under reduced motion.