Production report · 17 July 2026

Tegy can now read its answers aloud.

The Claude-style Read aloud control is live on app.tegy.io, powered by Grok Voice through OpenRouter. It pauses and resumes locally, charges voice generation to the same Tegy usage allowance, and shows failures in the chat instead of failing silently.

Shipped and verified in production

Voice request

200 OK

Real MP3 returned and decoded by the browser.

Usage record

Exact

No estimate remained after the request completed.

Smoke errors

0

No page or console errors during the live run.

What the team sees

Use the speaker action under any completed Tegy answer. The same control changes to Pause during playback, then to Resume while paused. Starting another answer stops the first one, matching Claude's interaction model.

Honest production capture from Chromium Profile 3: idle → Pause → Resume → playing → idle. The video is intentionally silent; the verification harness separately observed a real native Web Audio source start after decoding the returned MP3.
1

Read aloud

Click the speaker under a completed assistant answer.

2

Pause

The icon changes immediately while voice is prepared and played.

3

Resume

Pausing is local and free; it does not generate the voice again.

4

Replay

After completion, a new click generates a fresh voice request.

How answers are spoken

We matched Claude's current treatment of formatted answers. The goal is a useful narration, not a robotic recital of every Markdown symbol.

Answer contentWhat is readWhy
Normal prose, headings, bold and italicsThe words, without formatting markersKeeps narration natural.
EmojiPreserved; the voice verbalizes names such as “rocket” or “red heart”Meaning is not silently lost.
Inline codeThe code text without backticksShort commands can still be heard.
Fenced code or Mermaid diagrams“code block”A full visual block is usually poor spoken content.
Links and imagesThe link label or image alt textAvoids reading long Markdown syntax.
TablesCell words in row order; separator bars removedPreserves the information as far as speech allows.
Artifact bodyNot included; companion assistant prose is readOnly the visible assistant message action is in scope.
Bare URLs and raw mathsPreserved; pronunciation is best effortThis matches Claude's deterministic input handling.

Cost and Tegy usage

Provider rate

$0.015

per 1,000 input characters ($15 per million).

Live 21-character probe

$0.000315

Recorded once as exact voice-provider usage.

Replay total

$0.000630

Two generations, two exact usage rows.

Billing behavior in plain English

Generating speech counts toward the workspace's Tegy usage limit. Pause and Resume do not. Replaying after completion makes a new provider request and therefore counts again. Audio is not placed in a shared cache; the production probe returned MISS.

What happens behind the button

Stored answerServer loads the selected completed Tegy message.
Clean narrationFormatting is normalized and long text is segmented.
Usage gateThe normal Tegy allowance is checked before spend.
Voice providerCloudflare AI Gateway routes to OpenRouter Grok Voice.
Native playbackThe browser decodes and schedules MP3 with Web Audio.

The browser sends only the chat and message identifiers. It never receives OpenRouter or Cloudflare credentials, and it cannot substitute arbitrary text for the stored answer.

Failure behavior

Request, provider, audio decode and playback failures all return the control to idle and use Tegy's existing user-facing chat error surface. There is no hidden browser speech fallback and no fake assistant response.

Regression coverage

Automated coverage exercises real MP3 decoding and native AudioContext playback, ordered multi-segment requests, Pause/Resume labels and icons, usage estimate-to-exact reconciliation without double counting, and a visible provider-error path.

Production proof

DeploymentWorker version 6f6865aa…, container rollout ad4cad3e…, merged source 2f8afed
Provider responseaudio/mpeg, model x-ai/grok-voice-tts-1.0, provider generation ID present
Observed timingPause state in 145 ms; response complete in 2.852 s; native audio source started in 3.792 s
Usage databasevoice_provider_exact, OpenRouter, 21 characters, $0.000315, no estimated rows left
Replay checkSecond click produced a new provider generation and raised cumulative cost to $0.000630
Health0 page errors and 0 console errors in the production run

Machine-readable, secret-free evidence is included in evidence.json. The implementation shipped in PR #1154.

Technical API contract

The authenticated client requests one deterministic segment at a time. The Worker verifies chat ownership and loads the completed assistant event before synthesis.

POST /api/chats/{chatId}/messages/{messageId}/read-aloud
Content-Type: application/json

{"segmentIndex":0}

200 OK
Content-Type: audio/mpeg
Cache-Control: private, no-store
X-Tegy-Read-Aloud-Segment: 0
X-Tegy-Read-Aloud-Segment-Count: 1
X-Tegy-Read-Aloud-Model: x-ai/grok-voice-tts-1.0

Segments target 800 characters and are requested sequentially, with only the next segment prefetched. Grok Voice uses the Eve voice, MP3 output and speed 1.

References