DreamLake

Read agent replies aloud

Read aloud is available for built-in agent replies. The matching agent speech endpoint and chat UI must both be deployed to enable playback.

Choose Read aloud beneath an assistant reply to listen. This opens inline playback options for speaker voice, speech model, speed and volume. Options stay open after stopping; closing them also stops playback. Voice/model choices share Memo preferences and take effect on the next playback, stopping any current reply. Speed (0.75×–2×) and volume apply immediately and to following chunks. Speed uses Memo's pitch-preserving player and returns to 1× if unavailable. The browser-local speed preference is shared with Memo playback. A voice catalog arriving after playback starts does not change the active selection. If loading options fails, playback remains available with the default selection and the panel offers a retry. Playback starts only when you choose it. Stop cancels playback and the pending synthesis request. Starting another reply stops the previous one, including in another agent panel.

You can start while a reply is being generated. Complete Markdown paragraphs are read in order; the final incomplete paragraph is read when generation ends. A long paragraph without a blank line waits until it finishes. Lists and blockquotes, including the remainder of that reply, wait until generation ends so nested paragraphs retain their Markdown context. This is streaming playback by paragraph, not speech for each arriving token. After a paragraph's audio is played, its buffer is released before the next chunk is synthesized.

The reader converts Markdown to spoken text, keeps link labels, and skips fenced code and media. User messages, reasoning, tool receipts and system notices have no read-aloud action. Switching conversations, closing the panel, opening the session chooser or changing the signed-in identity stops playback. Returning to the conversation does not restart it.

Preparing and waiting states appear beside the control. If synthesis fails, the text remains available and the same action can retry from the beginning. An AudioContext-capable browser and configured speech service are required.

API boundary

POST /agent/sessions/:id/speech accepts text of 1–1500 characters. GET /agent/sessions/:id/speech/options returns the shared Memo voice/model catalog with the same private-session authorization. Speech POST responses return streaming NDJSON containing 24 kHz signed 16-bit mono PCM, matching Memo speech. The UI uses Memo's default or remembered voice/model selection. Choosing Server default omits that override; without a configured server voice, agent playback uses Memo's default Chris voice. Provider credentials remain on the server. The existing optional voiceId, modelId, documentText and start fields use the same validation as Memo speech.

Every request, including a cache hit, requires an active signed-in user with built-in-agent team access, ownership of the private built-in agent session, and its active personal namespace. Another user's conversation is unavailable. The cache is scoped separately from Memo recordings. Both surfaces share the same process-local per-user limits: two active requests and 60,000 requested characters per hour; provider-side quotas remain the global ceiling. Responses are no-store; closing the client connection aborts the provider stream.

Playback errors do not trigger another agent turn or repeat an agent action.