UNPKG

1.06 kBTypeScriptView Raw
1import { Middleware, TurnContext } from 'botbuilder-core';
2/**
3 * Support the DirectLine speech and telephony channels to ensure the appropriate SSML tags are set on the
4 * Activity Speak property.
5 */
6export declare class SetSpeakMiddleware implements Middleware {
7 private readonly voiceName;
8 private readonly fallbackToTextForSpeak;
9 /**
10 * Initializes a new instance of the SetSpeakMiddleware class.
11 *
12 * @param voiceName The SSML voice name attribute value.
13 * @param fallbackToTextForSpeak true if an empty Activity.Speak is populated with Activity.Text.
14 */
15 constructor(voiceName: string | null, fallbackToTextForSpeak: boolean);
16 /**
17 * Processes an incoming activity.
18 *
19 * @param turnContext The context object for this turn.
20 * @param next The delegate to call to continue the bot middleware pipeline.
21 * @returns A promise representing the async operation.
22 */
23 onTurn(turnContext: TurnContext, next: () => Promise<void>): Promise<void>;
24}
25//# sourceMappingURL=setSpeakMiddleware.d.ts.map
\No newline at end of file