Skip to content

waygraph / commandVoice

Function: commandVoice() ​

commandVoice(command, opts?): Voice

Defined in: src/runtime/voice.ts:46

A voice from a local text-to-speech command. {out} is the file it writes; {text} is the line (without it, the line goes to the command's stdin). Run without a shell, so a line can't run anything.

Parameters ​

command ​

string

opts? ​

ext? ​

string

Returns ​

Voice

Examples ​

ts
commandVoice("piper --model en_US-amy-medium.onnx --output_file {out}")   // the line on stdin
ts
commandVoice("espeak-ng -v en-us -w {out} {text}")
ts
commandVoice("say -o {out} --data-format=LEI16@22050 {text}", { ext: "wav" }) // macOS

waygraph 0.18.3 (alpha) · Node 24+ · peer @playwright/test ^1.40.0 · syntax may change before 1.0: see what was removed