UNPKG

@hahnpro/ms-speech-sdk

Version:
1 lines 2.54 kB
{"version":3,"sources":["src/sdk/SpeechSynthesisResult.ts"],"names":[],"mappings":"AAGA,OAAO,EACH,kBAAkB,EAClB,YAAY,EACZ,eAAe,EAClB,MAAM,cAAc,CAAC;AAEtB;;;;GAIG;AACH,qBAAa,qBAAsB,SAAQ,eAAe;IACtD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAc;IAC5C,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAS;IAE3C;;;;;;;;;OASG;gBACgB,QAAQ,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,YAAY,EAAE,SAAS,CAAC,EAAE,WAAW,EACxE,YAAY,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,kBAAkB,EAAE,aAAa,CAAC,EAAE,MAAM;IAM1F;;;;;;OAMG;IACH,IAAW,SAAS,IAAI,WAAW,CAElC;IAED;;;;;;OAMG;IACH,IAAW,aAAa,IAAI,MAAM,CAEjC;CACJ","file":"SpeechSynthesisResult.d.ts","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\n\nimport {\n PropertyCollection,\n ResultReason,\n SynthesisResult\n} from \"./Exports.js\";\n\n/**\n * Defines result of speech synthesis.\n * @class SpeechSynthesisResult\n * Added in version 1.11.0\n */\nexport class SpeechSynthesisResult extends SynthesisResult {\n private readonly privAudioData: ArrayBuffer;\n private readonly privAudioDuration: number;\n\n /**\n * Creates and initializes an instance of this class.\n * @constructor\n * @param {string} resultId - The result id.\n * @param {ResultReason} reason - The reason.\n * @param {ArrayBuffer} audioData - The synthesized audio binary.\n * @param {string} errorDetails - Error details, if provided.\n * @param {PropertyCollection} properties - Additional properties, if provided.\n * @param {number} audioDuration - The audio duration.\n */\n public constructor(resultId?: string, reason?: ResultReason, audioData?: ArrayBuffer,\n errorDetails?: string, properties?: PropertyCollection, audioDuration?: number) {\n super(resultId, reason, errorDetails, properties);\n this.privAudioData = audioData;\n this.privAudioDuration = audioDuration;\n }\n\n /**\n * The synthesized audio data\n * @member SpeechSynthesisResult.prototype.audioData\n * @function\n * @public\n * @returns {ArrayBuffer} The synthesized audio data.\n */\n public get audioData(): ArrayBuffer {\n return this.privAudioData;\n }\n\n /**\n * The time duration of synthesized audio, in ticks (100 nanoseconds).\n * @member SpeechSynthesisResult.prototype.audioDuration\n * @function\n * @public\n * @returns {number} The time duration of synthesized audio.\n */\n public get audioDuration(): number {\n return this.privAudioDuration;\n }\n}\n"]}