promptTTS
Speak a text-to-speech prompt, then collect DTMF or speech input. A typed
convenience over playAndCollect().
Parameters
text
The prompt to speak.
collect
Input collection configuration: digits, speech, initial_timeout, and
the other fields accepted by playAndCollect(). Field
names are the snake_case wire names; the object is sent as-is.
options
Voice and playback options.
options.language
Language code for the voice, such as "en-US".
options.gender
"male" or "female".
options.voice
Voice identifier for the TTS engine.
options.volume
Volume adjustment in dB, from -40 to 40.
options.onCompleted
Callback invoked when the operation reaches a terminal state.
Returns
Promise<CollectAction> — An action handle with stop(), pause(), resume(), volume(), startInputTimers(), and wait() methods.