SetSpeakMiddleware class

Support the DirectLine speech and telephony channels to ensure the appropriate SSML tags are set on the Activity Speak property.

Constructors

SetSpeakMiddleware(string | null, boolean)

Initializes a new instance of the SetSpeakMiddleware class.

Methods

onTurn(TurnContext, () => Promise<void>)

Processes an incoming activity.

Constructor Details

SetSpeakMiddleware(string | null, boolean)

Initializes a new instance of the SetSpeakMiddleware class.

new SetSpeakMiddleware(voiceName: string | null, fallbackToTextForSpeak: boolean)

Parameters

voiceName

string | null

The SSML voice name attribute value.

fallbackToTextForSpeak

boolean

true if an empty Activity.Speak is populated with Activity.Text.

Method Details

onTurn(TurnContext, () => Promise<void>)

Processes an incoming activity.

function onTurn(turnContext: TurnContext, next: () => Promise<void>): Promise<void>

Parameters

turnContext

TurnContext

The context object for this turn.

next

() => Promise<void>

The delegate to call to continue the bot middleware pipeline.

Returns

Promise<void>

A promise representing the async operation.