UNPKG

microsoft-cognitiveservices-speech-sdk

Version:
35 lines (34 loc) 1.93 kB
import { IAudioSource } from "../common/Exports.js"; import { CancellationErrorCode, CancellationReason, DialogServiceConnector, SpeechRecognitionResult } from "../sdk/Exports.js"; import { ServiceRecognizerBase } from "./Exports.js"; import { IAuthentication } from "./IAuthentication.js"; import { IConnectionFactory } from "./IConnectionFactory.js"; import { RecognitionMode, RecognizerConfig } from "./RecognizerConfig.js"; import { SpeechConnectionMessage } from "./SpeechConnectionMessage.Internal.js"; export declare class DialogServiceAdapter extends ServiceRecognizerBase { private privDialogServiceConnector; private privDialogAudioSource; private privConnectionLoop; private terminateMessageLoop; private agentConfigSent; private privLastResult; private privEvents; private privTurnStateManager; constructor(authentication: IAuthentication, connectionFactory: IConnectionFactory, audioSource: IAudioSource, recognizerConfig: RecognizerConfig, dialogServiceConnector: DialogServiceConnector); sendMessage(message: string): Promise<void>; protected privDisconnect(): Promise<void>; protected processTypeSpecificMessages(connectionMessage: SpeechConnectionMessage): Promise<boolean>; protected cancelRecognition(sessionId: string, requestId: string, cancellationReason: CancellationReason, errorCode: CancellationErrorCode, error: string): Promise<void>; protected listenOnce(recoMode: RecognitionMode, successCallback: (e: SpeechRecognitionResult) => void, errorCallback: (e: string) => void): Promise<void>; private dialogConnectImpl; private receiveDialogMessageOverride; private startMessageLoop; private configConnection; private sendPreAudioMessages; private sendAgentConfig; private sendAgentContext; private fireEventForResult; private handleResponseMessage; private onEvent; private addKeywordContextData; }