PlayPromptAction class
Action builder class designed to simplify building playPrompt actions.
Constructors
| Play |
Creates a new instance of the action builder. |
Methods
| file(Call |
Creates a file prompt that will be played to the user. |
| prompts(IPrompt[] | IIs |
List of prompts to play out with each single prompt object. |
| silence(Call |
Creates a prompt that plays silence to the user. |
| text(Call |
Creates a text prompt that will be spoken to the user using TTS. |
| to |
Returns the JSON object for the action. |
Constructor Details
PlayPromptAction(CallSession)
Creates a new instance of the action builder.
new PlayPromptAction(session?: CallSession)
Parameters
- session
- CallSession
Method Details
file(CallSession, string)
Creates a file prompt that will be played to the user.
static function file(session: CallSession, uri: string)
Parameters
- session
- CallSession
- uri
-
string
Returns
prompts(IPrompt[] | IIsPrompt[])
List of prompts to play out with each single prompt object.
function prompts(list: IPrompt[] | IIsPrompt[])
Parameters
Returns
silence(CallSession, number)
Creates a prompt that plays silence to the user.
static function silence(session: CallSession, time: number)
Parameters
- session
- CallSession
- time
-
number
Returns
text(CallSession, string | string[], any[])
Creates a text prompt that will be spoken to the user using TTS.
static function text(session: CallSession, text: string | string[], args: any[])
Parameters
- session
- CallSession
- text
-
string | string[]
- args
-
any[]