UNPKG

@euirim/microsoft-cognitiveservices-speech-sdk

Version:
1 lines 2.78 kB
{"version":3,"sources":["src/sdk/SpeechRecognitionCanceledEventArgs.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAE5F;;;GAGG;AACH,qBAAa,kCAAmC,SAAQ,oBAAoB;IACxE,OAAO,CAAC,UAAU,CAAqB;IACvC,OAAO,CAAC,gBAAgB,CAAS;IACjC,OAAO,CAAC,aAAa,CAAwB;IAE7C;;;;;;;OAOG;gBACgB,MAAM,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,EAChD,SAAS,EAAE,qBAAqB,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM;IAQxF;;;;;;OAMG;aACQ,MAAM,EAAI,kBAAkB;IAIvC;;;;OAIG;aACQ,SAAS,EAAI,qBAAqB;IAI7C;;;;;;OAMG;aACQ,YAAY,EAAI,MAAM;CAGpC","file":"SpeechRecognitionCanceledEventArgs.d.ts","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\n\nimport { CancellationErrorCode, CancellationReason, RecognitionEventArgs } from \"./Exports\";\n\n/**\n * Defines content of a RecognitionErrorEvent.\n * @class SpeechRecognitionCanceledEventArgs\n */\nexport class SpeechRecognitionCanceledEventArgs extends RecognitionEventArgs {\n private privReason: CancellationReason;\n private privErrorDetails: string;\n private privErrorCode: CancellationErrorCode;\n\n /**\n * Creates and initializes an instance of this class.\n * @constructor\n * @param {CancellationReason} reason - The cancellation reason.\n * @param {string} errorDetails - Error details, if provided.\n * @param {number} offset - The offset.\n * @param {string} sessionId - The session id.\n */\n public constructor(reason: CancellationReason, errorDetails: string,\n errorCode: CancellationErrorCode, offset?: number, sessionId?: string) {\n super(offset, sessionId);\n\n this.privReason = reason;\n this.privErrorDetails = errorDetails;\n this.privErrorCode = errorCode;\n }\n\n /**\n * The reason the recognition was canceled.\n * @member SpeechRecognitionCanceledEventArgs.prototype.reason\n * @function\n * @public\n * @returns {CancellationReason} Specifies the reason canceled.\n */\n public get reason(): CancellationReason {\n return this.privReason;\n }\n\n /**\n * The error code in case of an unsuccessful recognition.\n * Added in version 1.1.0.\n * @return An error code that represents the error reason.\n */\n public get errorCode(): CancellationErrorCode {\n return this.privErrorCode;\n }\n\n /**\n * In case of an unsuccessful recognition, provides details of the occurred error.\n * @member SpeechRecognitionCanceledEventArgs.prototype.errorDetails\n * @function\n * @public\n * @returns {string} A String that represents the error details.\n */\n public get errorDetails(): string {\n return this.privErrorDetails;\n }\n}\n"]}