Say
Speak text to the caller with text-to-speech.
Speak text to the caller with text-to-speech.
say speaks text to the caller with text-to-speech.
| Parameter | Type | Required | Description |
|---|---|---|---|
text | string | Yes | The words to speak. |
voice | string | No | The voice, for example alice, man or woman. Leave it out for the default voice. |
language | string | No | Language tag, for example en-US. |
loop | integer | No | How many times to repeat. 0 or omitted means once. |
import { sauti } from "@sautikit/node";
res.json(sauti.say("Hello, your KES 500 top-up is confirmed.", {
voice: "alice",
language: "en-US",
}));{
"actions": [
{
"say": {
"text": "Hello, your KES 500 top-up is confirmed.",
"voice": "alice",
"language": "en-US"
}
}
]
}<Say voice="alice" language="en-US">Hello, your KES 500 top-up is confirmed.</Say>