Edit

Share via


Prompt class

Prompt builder class that simplifies building prompts for playPrompt action.

Constructors

Prompt(CallSession)

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(CallSession, string)

Creates a file prompt that will be played to the user.

fileUri(string)

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.

sayAs(string)

The SayAs enum value indicates whether to customize pronunciation during tts. It's applicable only if value is text.

silence(CallSession, number)

Creates a prompt that plays silence to the user.

silenceLengthInMilliseconds(number)

Any silence played out before value is played. If value is null, this field must be a valid > 0 value.

text(CallSession, string | string[], any[])

Creates a text prompt that will be spoken to the user using TTS.

toPrompt()

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)

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.

function culture(locale: string)

Parameters

locale

string

Returns

emphasize(boolean)

Indicates whether to emphasize when tts'ing out. It's applicable only if value is text. The default value is false.

function emphasize(flag: boolean)

Parameters

flag

boolean

Returns

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)

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.

function fileUri(uri: string)

Parameters

uri

string

Returns

sayAs(string)

The SayAs enum value indicates whether to customize pronunciation during tts. It's applicable only if value is text.

function sayAs(type: string)

Parameters

type

string

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

silenceLengthInMilliseconds(number)

Any silence played out before value is played. If value is null, this field must be a valid > 0 value.

function silenceLengthInMilliseconds(time: number)

Parameters

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[]

Returns

toPrompt()

Returns the JSON object for the prompt.

function toPrompt()

Returns

value(string | string[], any[])

Text-To-Speech text to be played to Skype user. Either value or fileUri must be specified.

function value(text: string | string[], args: any[])

Parameters

text

string | string[]

args

any[]

Returns

voice(string)

VoiceGender enum value. The default value is “female”.

function voice(gender: string)

Parameters

gender

string

Returns