UNPKG

@euirim/microsoft-cognitiveservices-speech-sdk

Version:
42 lines (40 loc) 1.19 kB
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. /** * Defines translation synthesis result, i.e. the voice output of the translated * text in the target language. * @class TranslationSynthesisResult */ export class TranslationSynthesisResult { /** * Creates and initializes an instance of this class. * @constructor * @param {ResultReason} reason - The synthesis reason. * @param {ArrayBuffer} audio - The audio data. */ constructor(reason, audio) { this.privReason = reason; this.privAudio = audio; } /** * Translated text in the target language. * @member TranslationSynthesisResult.prototype.audio * @function * @public * @returns {ArrayBuffer} Translated audio in the target language. */ get audio() { return this.privAudio; } /** * The synthesis status. * @member TranslationSynthesisResult.prototype.reason * @function * @public * @returns {ResultReason} The synthesis status. */ get reason() { return this.privReason; } } //# sourceMappingURL=TranslationSynthesisResult.js.map