UNPKG

@euirim/microsoft-cognitiveservices-speech-sdk

Version:
1 lines 3.8 kB
{"version":3,"sources":["src/sdk/TranslationRecognitionCanceledEventArgs.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,4BAA4B,EAAE,MAAM,WAAW,CAAC;AAEpG;;;GAGG;AACH,qBAAa,uCAAuC;IAChD,OAAO,CAAC,UAAU,CAA+B;IACjD,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,gBAAgB,CAAqB;IAC7C,OAAO,CAAC,gBAAgB,CAAS;IACjC,OAAO,CAAC,aAAa,CAAwB;IAE7C;;;;;;;OAOG;gBAEC,SAAS,EAAE,MAAM,EACjB,kBAAkB,EAAE,kBAAkB,EACtC,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,qBAAqB,EAChC,MAAM,EAAE,4BAA4B;IAQxC;;;;;;OAMG;aACQ,MAAM,EAAI,4BAA4B;IAIjD;;;;;;OAMG;aACQ,SAAS,EAAI,MAAM;IAI9B;;;;;;OAMG;aACQ,MAAM,EAAI,kBAAkB;IAIvC;;;;OAIG;aACQ,SAAS,EAAI,qBAAqB;IAI7C;;;;;;OAMG;aACQ,YAAY,EAAI,MAAM;CAGpC","file":"TranslationRecognitionCanceledEventArgs.d.ts","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\n\nimport { CancellationErrorCode, CancellationReason, TranslationRecognitionResult } from \"./Exports\";\n\n/**\n * Define payload of speech recognition canceled result events.\n * @class TranslationRecognitionCanceledEventArgs\n */\nexport class TranslationRecognitionCanceledEventArgs {\n private privResult: TranslationRecognitionResult;\n private privSessionId: string;\n private privCancelReason: CancellationReason;\n private privErrorDetails: string;\n private privErrorCode: CancellationErrorCode;\n\n /**\n * Creates and initializes an instance of this class.\n * @constructor\n * @param {string} sessionid - The session id.\n * @param {CancellationReason} cancellationReason - The cancellation reason.\n * @param {string} errorDetails - Error details, if provided.\n * @param {TranslationRecognitionResult} result - The result.\n */\n public constructor(\n sessionid: string,\n cancellationReason: CancellationReason,\n errorDetails: string,\n errorCode: CancellationErrorCode,\n result: TranslationRecognitionResult) {\n this.privCancelReason = cancellationReason;\n this.privErrorDetails = errorDetails;\n this.privResult = result;\n this.privSessionId = sessionid;\n this.privErrorCode = errorCode;\n }\n\n /**\n * Specifies the recognition result.\n * @member TranslationRecognitionCanceledEventArgs.prototype.result\n * @function\n * @public\n * @returns {TranslationRecognitionResult} the recognition result.\n */\n public get result(): TranslationRecognitionResult {\n return this.privResult;\n }\n\n /**\n * Specifies the session identifier.\n * @member TranslationRecognitionCanceledEventArgs.prototype.sessionId\n * @function\n * @public\n * @returns {string} the session identifier.\n */\n public get sessionId(): string {\n return this.privSessionId;\n }\n\n /**\n * The reason the recognition was canceled.\n * @member TranslationRecognitionCanceledEventArgs.prototype.reason\n * @function\n * @public\n * @returns {CancellationReason} Specifies the reason canceled.\n */\n public get reason(): CancellationReason {\n return this.privCancelReason;\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 TranslationRecognitionCanceledEventArgs.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"]}