UNPKG

@euirim/microsoft-cognitiveservices-speech-sdk

Version:
1 lines 1.79 kB
{"version":3,"sources":["src/sdk/TranslationSynthesisResult.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;;;GAIG;AACH,qBAAa,0BAA0B;IACnC,OAAO,CAAC,UAAU,CAAe;IACjC,OAAO,CAAC,SAAS,CAAc;IAE/B;;;;;OAKG;gBACS,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,WAAW;IAKpD;;;;;;OAMG;aACQ,KAAK,EAAI,WAAW;IAI/B;;;;;;OAMG;aACQ,MAAM,EAAI,YAAY;CAGpC","file":"TranslationSynthesisResult.d.ts","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\n\nimport { ResultReason } from \"./ResultReason\";\n\n/**\n * Defines translation synthesis result, i.e. the voice output of the translated\n * text in the target language.\n * @class TranslationSynthesisResult\n */\nexport class TranslationSynthesisResult {\n private privReason: ResultReason;\n private privAudio: ArrayBuffer;\n\n /**\n * Creates and initializes an instance of this class.\n * @constructor\n * @param {ResultReason} reason - The synthesis reason.\n * @param {ArrayBuffer} audio - The audio data.\n */\n constructor(reason: ResultReason, audio: ArrayBuffer) {\n this.privReason = reason;\n this.privAudio = audio;\n }\n\n /**\n * Translated text in the target language.\n * @member TranslationSynthesisResult.prototype.audio\n * @function\n * @public\n * @returns {ArrayBuffer} Translated audio in the target language.\n */\n public get audio(): ArrayBuffer {\n return this.privAudio;\n }\n\n /**\n * The synthesis status.\n * @member TranslationSynthesisResult.prototype.reason\n * @function\n * @public\n * @returns {ResultReason} The synthesis status.\n */\n public get reason(): ResultReason {\n return this.privReason;\n }\n}\n"]}