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