1 |
- {"ast":null,"code":"\"use strict\";\n\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.TranslationRecognitionResult = void 0;\nconst Exports_js_1 = require(\"./Exports.js\");\n/**\n * Translation text result.\n * @class TranslationRecognitionResult\n */\nclass TranslationRecognitionResult extends Exports_js_1.SpeechRecognitionResult {\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 constructor(translations, resultId, reason, text, duration, offset, language, languageDetectionConfidence, errorDetails, json, properties) {\n super(resultId, reason, text, duration, offset, language, languageDetectionConfidence, undefined, errorDetails, json, properties);\n this.privTranslations = translations;\n }\n static fromSpeechRecognitionResult(result) {\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 * 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 get translations() {\n return this.privTranslations;\n }\n}\nexports.TranslationRecognitionResult = TranslationRecognitionResult;","map":{"version":3,"names":["Object","defineProperty","exports","value","TranslationRecognitionResult","Exports_js_1","require","SpeechRecognitionResult","constructor","translations","resultId","reason","text","duration","offset","language","languageDetectionConfidence","errorDetails","json","properties","undefined","privTranslations","fromSpeechRecognitionResult","result"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/microsoft-cognitiveservices-speech-sdk/distrib/lib/src/sdk/TranslationRecognitionResult.js"],"sourcesContent":["\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TranslationRecognitionResult = void 0;\nconst Exports_js_1 = require(\"./Exports.js\");\n/**\n * Translation text result.\n * @class TranslationRecognitionResult\n */\nclass TranslationRecognitionResult extends Exports_js_1.SpeechRecognitionResult {\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 constructor(translations, resultId, reason, text, duration, offset, language, languageDetectionConfidence, errorDetails, json, properties) {\n super(resultId, reason, text, duration, offset, language, languageDetectionConfidence, undefined, errorDetails, json, properties);\n this.privTranslations = translations;\n }\n static fromSpeechRecognitionResult(result) {\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 * 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 get translations() {\n return this.privTranslations;\n }\n}\nexports.TranslationRecognitionResult = TranslationRecognitionResult;\n\n"],"mappings":"AAAA,YAAY;;AACZ;AACA;AACA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