UNPKG

@voice-ping/cognitive-services-speech

Version:

VoicePing Cognitive Services Speech SDK for JavaScript forked from Microsoft

51 lines (49 loc) 1.78 kB
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. // Multi-device Conversation is a Preview feature. import { RecognitionEventArgs } from "../Exports"; export class ConversationTranslationCanceledEventArgs extends RecognitionEventArgs { /** * Creates and initializes an instance of this class. * @constructor * @param {CancellationReason} reason - The cancellation reason. * @param {string} errorDetails - Error details, if provided. * @param {number} offset - The offset. * @param {string} sessionId - The session id. */ constructor(reason, errorDetails, errorCode, offset, sessionId) { super(offset, sessionId); this.privReason = reason; this.privErrorDetails = errorDetails; this.privErrorCode = errorCode; } /** * The reason the recognition was canceled. * @member SpeechRecognitionCanceledEventArgs.prototype.reason * @function * @public * @returns {CancellationReason} Specifies the reason canceled. */ get reason() { return this.privReason; } /** * The error code in case of an unsuccessful recognition. * Added in version 1.1.0. * @return An error code that represents the error reason. */ get errorCode() { return this.privErrorCode; } /** * In case of an unsuccessful recognition, provides details of the occurred error. * @member SpeechRecognitionCanceledEventArgs.prototype.errorDetails * @function * @public * @returns {string} A String that represents the error details. */ get errorDetails() { return this.privErrorDetails; } } //# sourceMappingURL=ConversationTranslationCanceledEventArgs.js.map