{"version":3,"sources":["src/sdk/TranslationRecognitionResult.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,uBAAuB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEvG;;;GAGG;AACH,qBAAa,4BAA6B,SAAQ,uBAAuB;IACrE,OAAO,CAAC,gBAAgB,CAAe;IAEvC;;;;;;;;;;;;;;OAcG;gBACgB,YAAY,EAAE,YAAY,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,YAAY,EACpE,IAAI,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EACpE,2BAA2B,CAAC,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,EAC3D,IAAI,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,kBAAkB;WAMnD,2BAA2B,CAAC,MAAM,EAAE,uBAAuB,GAAG,4BAA4B;IAIxG;;;;;;;;;OASG;IACH,IAAW,YAAY,IAAI,YAAY,CAEtC;CACJ","file":"TranslationRecognitionResult.d.ts","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\n\nimport { PropertyCollection, ResultReason, SpeechRecognitionResult, Translations } from \"./Exports.js\";\n\n/**\n * Translation text result.\n * @class TranslationRecognitionResult\n */\nexport class TranslationRecognitionResult extends SpeechRecognitionResult {\n    private privTranslations: Translations;\n\n    /**\n     * Creates and initializes an instance of this class.\n     * @constructor\n     * @param {Translations} translations - The translations.\n     * @param {string} resultId - The result id.\n     * @param {ResultReason} reason - The reason.\n     * @param {string} text - The recognized text.\n     * @param {number} duration - The duration.\n     * @param {number} offset - The offset into the stream.\n     * @param {string} language - Primary Language detected, if provided.\n     * @param {string} languageDetectionConfidence - Primary Language confidence (\"Unknown,\" \"Low,\" \"Medium,\" \"High\"...), if provided.\n     * @param {string} errorDetails - Error details, if provided.\n     * @param {string} json - Additional Json, if provided.\n     * @param {PropertyCollection} properties - Additional properties, if provided.\n     */\n    public constructor(translations: Translations, resultId?: string, reason?: ResultReason,\n                       text?: string, duration?: number, offset?: number, language?: string,\n                       languageDetectionConfidence?: string, errorDetails?: string,\n                       json?: string, properties?: PropertyCollection) {\n        super(resultId, reason, text, duration, offset, language, languageDetectionConfidence, undefined, errorDetails, json, properties);\n\n        this.privTranslations = translations;\n    }\n\n    public static fromSpeechRecognitionResult(result: SpeechRecognitionResult): TranslationRecognitionResult {\n        return new TranslationRecognitionResult(undefined, result.resultId, result.reason, result.text, result.duration, result.offset, result.language, result.languageDetectionConfidence, result.errorDetails, result.json, result.properties);\n    }\n\n    /**\n     * Presents the translation results. Each item in the dictionary represents\n     * a translation result in one of target languages, where the key is the name\n     * of the target language, in BCP-47 format, and the value is the translation\n     * text in the specified language.\n     * @member TranslationRecognitionResult.prototype.translations\n     * @function\n     * @public\n     * @returns {Translations} the current translation map that holds all translations requested.\n     */\n    public get translations(): Translations {\n        return this.privTranslations;\n    }\n}\n"]}