Speak¶
The Speak node is a TTS-only step: it voices whatever text its input selector
resolves to, segments it into sentences, dispatches each sentence to a dedicated
TTS strand, and emits PCM audio frames — without running any
language-model inference. Use it to voice
upstream-produced text, for example CannedResponse → Speak so a scripted line
is spoken without paying for a generation pass.
The text it speaks is selected by input, exactly like every other input-bearing
node: leave it empty to voice the user_message slot, or set it to the name of
any upstream node's output slot (e.g. a preceding Generate or
CannedResponse) to voice that instead. If the resolved slot
is missing or empty, the node synthesizes nothing and exits via default.
Speak only sees text that an upstream node has already finished producing, so it
cannot overlap synthesis with generation. Chained after Generate, audio begins
only once generation has fully completed (Speak then pipelines TTS across the
sentences of that completed text). When the goal is simply to speak a generated
answer with the lowest possible delay, use
Generate and Speak, which streams synthesis while the
LLM is still generating. Reach for a standalone Speak when the text it voices did
not come from a generation pass (e.g. CannedResponse → Speak), or when you need
to branch on / transform the text before voicing it.
The voice is chosen by tts_model_name. Leave it empty to use the first TTS
voice available in the server's model catalog, or set it to pick a specific
voice.
Audio format is announced once (via OnTtsAudioFormat) before the first audio
chunk; end-of-stream is signalled by turn completion. Unlike
Generate and Speak, Speak does not emit answer-text
deltas — the upstream node that produced the text already did.
NodeType: Speak.
Parameters¶
| Param | Type | Default | Range | Structural | Description |
|---|---|---|---|---|---|
tts_model_name |
Optional[str] | inherit model default | — | ✓ | TTS model catalog name. Optional — when empty the server uses the first available TTS voice in the model catalog. Set it to pick a specific voice. |
speaker_id |
int | 0 | ≥ 0.0 | — | TTS speaker / voice index (default 0). Valid range is 0 to the model's speaker count minus 1 — the shipped Supertonic 3 bundle has 10 voice styles (0–9); Pocket TTS is single-speaker, so it must stay 0 there (pick a Pocket voice with tts_voice instead). Agent creation fails with an out-of-range error for values the model cannot satisfy. |
speed |
float | 1.0 | 0.1 – 3.0 | — | TTS speech-rate multiplier. 1.0 = native speed. |
tts_lang |
Optional[str] | inherit model default | — | — | TTS language hint for multilingual models that select the language per call (e.g. Supertonic 3: "en", "de", "fr", …). Empty = the model's catalog default. Ignored by families whose language is fixed by the model itself (e.g. Pocket TTS per-language models). |
tts_voice |
Optional[str] | inherit model default | — | — | Reference-voice WAV for zero-shot voice-cloning families (Pocket TTS): a path relative to the session storage root pointing at a 10–20 s clean mono recording of the target voice. Empty = the model's default voice. Ignored by fixed-voice families (use speaker_id there). |
input |
Optional[str] | inherit model default | — | ✓ | Slot name this node voices. Empty = "user_message" (same default as every other input-bearing node). Structural: immutable after creation — rebinding would re-wire the slot dataflow that is validated once at agent creation. |
min_sentence_chars |
int | 12 | ≥ 1.0 | — | Minimum characters before a sentence boundary fires. Lower values reduce first-utterance latency at the cost of more, smaller TTS calls. |
Exits¶
Each exit is a structural string field on the node's params; its value names the target node (empty = END).
| Exit | Param field | Description |
|---|---|---|
default |
default_exit |
Default exit target — routes here after synthesis completes. Empty string = END. |
Exit routes¶
| Route | Fires when |
|---|---|
default |
Always, after synthesis completes (including when the resolved text was empty). |
Side effects¶
- Emits
OnTtsAudioFormatonce, thenOnTtsAudioPCM frames as sentences are synthesized. - Does not write a slot or emit
OnAnswerText(Speak only voices an existing slot; it produces no text of its own).
Related¶
- Generate and Speak — fused LLM generation + TTS.
- Canned Response — common upstream producer of the assistant text Speak voices.
- Concept: Slots and inter-node value passing — how
inputresolution works.