speak
Convert text to a WAV speech file offline on the CPU, optionally adding radio, robotic, or glitch game voice effects without waiting on GPU jobs.
Instructions
Speak a line of text (English) to a WAV file, with an optional game voice effect. Runs on the CPU.
Model: Kokoro-82M (Apache 2.0) in its own venv, offline; ComfyUI and the GPU are not used, so it never waits on image or video jobs. About 10 s to load plus about 1 s per sentence. voice: an installed voice name (see list_voices; default "af_heart"), or a comma separated blend of up to 4 voices with the same accent, averaged ("am_michael,bm_george" is invalid: two accents; "am_michael,am_fenrir" is fine). Prefix a = American, b = British; f = female, m = male. speed: 0.5 to 2.0 (1.0 normal). effect: "none"; "radio" (band limited, compressed, light hiss, like a comms channel); "robotic" (flat buzzing monotone with a metallic echo); "glitch" (a voice struggling on low power: stutters on word onsets, dropouts, bursts of bit crushing). intensity 0 to 1 (default 0.5) scales the effect. seed makes the glitch pattern and noise reproducible (returned in the result either way). name: file name stem for the line (for example "pathfinder_hull_40_lowpower"); an existing file with that name is overwritten. Default: . keep_dry: with an effect, also keep the unprocessed take as _dry.wav. Output: 24 kHz mono 16 bit WAV, plus an OGG Vorbis copy when ffmpeg is installed, in output_dir (default /ai/output/localgen/audio//). Returns the paths, duration, sample rate, RMS and peak level, word timings and the seed. Text up to 2000 characters; one call per line of dialogue.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"text": "<text>"
},
"name": "speak"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| seed | No | ||
| text | Yes | ||
| speed | No | ||
| voice | No | ||
| effect | No | none | |
| keep_dry | No | ||
| intensity | No | ||
| output_dir | No |