Prompt class
Prompt builder class that simplifies building prompts for playPrompt action.
Constructors
| Prompt(Call |
Creates a new instance of the prompt builder. |
Methods
| culture(string) | The Language enum value to use for Text-To-Speech. Only applicable if value is text. The default value is “en-US”. Note, currently en-US is the only supported language. |
| emphasize(boolean) | Indicates whether to emphasize when tts'ing out. It's applicable only if value is text. The default value is false. |
| file(Call |
Creates a file prompt that will be played to the user. |
| file |
HTTP of played media file. Supported formats are WMA or WAV. The file is limited to 512kb in size and cached by Skype Bot Platform for Calling. Either value or fileUri must be specified. |
| say |
The SayAs enum value indicates whether to customize pronunciation during tts. It's applicable only if value is text. |
| silence(Call |
Creates a prompt that plays silence to the user. |
| silence |
Any silence played out before value is played. If value is null, this field must be a valid > 0 value. |
| text(Call |
Creates a text prompt that will be spoken to the user using TTS. |
| to |
Returns the JSON object for the prompt. |
| value(string | string[], any[]) | Text-To-Speech text to be played to Skype user. Either value or fileUri must be specified. |
| voice(string) | VoiceGender enum value. The default value is “female”. |
Constructor Details
Prompt(CallSession)
Creates a new instance of the prompt builder.
new Prompt(session?: CallSession)
Parameters
- session
- CallSession
Method Details
culture(string)
emphasize(boolean)
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
fileUri(string)
sayAs(string)
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
silenceLengthInMilliseconds(number)
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[]
Returns
toPrompt()
value(string | string[], any[])
voice(string)
VoiceGender enum value. The default value is “female”.
function voice(gender: string)
Parameters
- gender
-
string