Voice request
200 OKReal MP3 returned and decoded by the browser.
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.
Real MP3 returned and decoded by the browser.
No estimate remained after the request completed.
No page or console errors during the live run.
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.
Click the speaker under a completed assistant answer.
The icon changes immediately while voice is prepared and played.
Pausing is local and free; it does not generate the voice again.
After completion, a new click generates a fresh voice request.
We matched Claude's current treatment of formatted answers. The goal is a useful narration, not a robotic recital of every Markdown symbol.
| Answer content | What is read | Why |
|---|---|---|
| Normal prose, headings, bold and italics | The words, without formatting markers | Keeps narration natural. |
| Emoji | Preserved; the voice verbalizes names such as “rocket” or “red heart” | Meaning is not silently lost. |
| Inline code | The code text without backticks | Short commands can still be heard. |
| Fenced code or Mermaid diagrams | “code block” | A full visual block is usually poor spoken content. |
| Links and images | The link label or image alt text | Avoids reading long Markdown syntax. |
| Tables | Cell words in row order; separator bars removed | Preserves the information as far as speech allows. |
| Artifact body | Not included; companion assistant prose is read | Only the visible assistant message action is in scope. |
| Bare URLs and raw maths | Preserved; pronunciation is best effort | This matches Claude's deterministic input handling. |
per 1,000 input characters ($15 per million).
Recorded once as exact voice-provider usage.
Two generations, two exact usage rows.
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.
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.
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.
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.
| Deployment | Worker version 6f6865aa…, container rollout ad4cad3e…, merged source 2f8afed |
|---|---|
| Provider response | audio/mpeg, model x-ai/grok-voice-tts-1.0, provider generation ID present |
| Observed timing | Pause state in 145 ms; response complete in 2.852 s; native audio source started in 3.792 s |
| Usage database | voice_provider_exact, OpenRouter, 21 characters, $0.000315, no estimated rows left |
| Replay check | Second click produced a new provider generation and raised cumulative cost to $0.000630 |
| Health | 0 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.
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.