microsoft-cognitiveservices-speech-sdk
Version:
Microsoft Cognitive Services Speech SDK for JavaScript
1 lines • 6.92 kB
Source Map (JSON)
{"version":3,"sources":["src/sdk/RecognitionResult.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEhE;;;GAGG;AACH,qBAAa,iBAAiB;IAC1B,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,UAAU,CAAe;IACjC,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,+BAA+B,CAAS;IAChD,OAAO,CAAC,gBAAgB,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,cAAc,CAAqB;IAE3C;;;;;;;;;;;;;OAaG;gBACgB,QAAQ,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,YAAY,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EACjF,MAAM,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,2BAA2B,CAAC,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,kBAAkB;IAa3J;;;;;;OAMG;IACH,IAAW,QAAQ,IAAI,MAAM,CAE5B;IAED;;;;;;OAMG;IACH,IAAW,MAAM,IAAI,YAAY,CAEhC;IAED;;;;;;OAMG;IACH,IAAW,IAAI,IAAI,MAAM,CAExB;IAED;;;;;;OAMG;IACH,IAAW,QAAQ,IAAI,MAAM,CAE5B;IAED;;;;;;OAMG;IACH,IAAW,MAAM,IAAI,MAAM,CAE1B;IAED;;;;;;OAMG;IACH,IAAW,QAAQ,IAAI,MAAM,CAE5B;IAED;;;;;;OAMG;IACH,IAAW,2BAA2B,IAAI,MAAM,CAE/C;IAED;;;;;;OAMG;IACH,IAAW,YAAY,IAAI,MAAM,CAEhC;IAED;;;;;;OAMG;IACH,IAAW,IAAI,IAAI,MAAM,CAExB;IAED;;;;;;OAMG;IACH,IAAW,UAAU,IAAI,kBAAkB,CAE1C;CACJ","file":"RecognitionResult.d.ts","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT license.\r\n\r\nimport { PropertyCollection, ResultReason } from \"./Exports.js\";\r\n\r\n/**\r\n * Defines result of speech recognition.\r\n * @class RecognitionResult\r\n */\r\nexport class RecognitionResult {\r\n private privResultId: string;\r\n private privReason: ResultReason;\r\n private privText: string;\r\n private privDuration: number;\r\n private privOffset: number;\r\n private privLanguage: string;\r\n private privLanguageDetectionConfidence: string;\r\n private privErrorDetails: string;\r\n private privJson: string;\r\n private privProperties: PropertyCollection;\r\n\r\n /**\r\n * Creates and initializes an instance of this class.\r\n * @constructor\r\n * @param {string} resultId - The result id.\r\n * @param {ResultReason} reason - The reason.\r\n * @param {string} text - The recognized text.\r\n * @param {number} duration - The duration.\r\n * @param {number} offset - The offset into the stream.\r\n * @param {string} language - Primary Language detected, if provided.\r\n * @param {string} languageDetectionConfidence - Primary Language confidence (\"Unknown,\" \"Low,\" \"Medium,\" \"High\"...), if provided.\r\n * @param {string} errorDetails - Error details, if provided.\r\n * @param {string} json - Additional Json, if provided.\r\n * @param {PropertyCollection} properties - Additional properties, if provided.\r\n */\r\n public constructor(resultId?: string, reason?: ResultReason, text?: string, duration?: number,\r\n offset?: number, language?: string, languageDetectionConfidence?: string, errorDetails?: string, json?: string, properties?: PropertyCollection) {\r\n this.privResultId = resultId;\r\n this.privReason = reason;\r\n this.privText = text;\r\n this.privDuration = duration;\r\n this.privOffset = offset;\r\n this.privLanguage = language;\r\n this.privLanguageDetectionConfidence = languageDetectionConfidence;\r\n this.privErrorDetails = errorDetails;\r\n this.privJson = json;\r\n this.privProperties = properties;\r\n }\r\n\r\n /**\r\n * Specifies the result identifier.\r\n * @member RecognitionResult.prototype.resultId\r\n * @function\r\n * @public\r\n * @returns {string} Specifies the result identifier.\r\n */\r\n public get resultId(): string {\r\n return this.privResultId;\r\n }\r\n\r\n /**\r\n * Specifies status of the result.\r\n * @member RecognitionResult.prototype.reason\r\n * @function\r\n * @public\r\n * @returns {ResultReason} Specifies status of the result.\r\n */\r\n public get reason(): ResultReason {\r\n return this.privReason;\r\n }\r\n\r\n /**\r\n * Presents the recognized text in the result.\r\n * @member RecognitionResult.prototype.text\r\n * @function\r\n * @public\r\n * @returns {string} Presents the recognized text in the result.\r\n */\r\n public get text(): string {\r\n return this.privText;\r\n }\r\n\r\n /**\r\n * Duration of recognized speech in 100 nano second increments.\r\n * @member RecognitionResult.prototype.duration\r\n * @function\r\n * @public\r\n * @returns {number} Duration of recognized speech in 100 nano second increments.\r\n */\r\n public get duration(): number {\r\n return this.privDuration;\r\n }\r\n\r\n /**\r\n * Offset of recognized speech in 100 nano second increments.\r\n * @member RecognitionResult.prototype.offset\r\n * @function\r\n * @public\r\n * @returns {number} Offset of recognized speech in 100 nano second increments.\r\n */\r\n public get offset(): number {\r\n return this.privOffset;\r\n }\r\n\r\n /**\r\n * Primary Language detected.\r\n * @member RecognitionResult.prototype.language\r\n * @function\r\n * @public\r\n * @returns {string} language detected.\r\n */\r\n public get language(): string {\r\n return this.privLanguage;\r\n }\r\n\r\n /**\r\n * Primary Language detection confidence (Unknown, Low, Medium, High).\r\n * @member RecognitionResult.prototype.languageDetectionConfidence\r\n * @function\r\n * @public\r\n * @returns {string} detection confidence strength.\r\n */\r\n public get languageDetectionConfidence(): string {\r\n return this.privLanguageDetectionConfidence;\r\n }\r\n\r\n /**\r\n * In case of an unsuccessful recognition, provides details of the occurred error.\r\n * @member RecognitionResult.prototype.errorDetails\r\n * @function\r\n * @public\r\n * @returns {string} a brief description of an error.\r\n */\r\n public get errorDetails(): string {\r\n return this.privErrorDetails;\r\n }\r\n\r\n /**\r\n * A string containing Json serialized recognition result as it was received from the service.\r\n * @member RecognitionResult.prototype.json\r\n * @function\r\n * @private\r\n * @returns {string} Json serialized representation of the result.\r\n */\r\n public get json(): string {\r\n return this.privJson;\r\n }\r\n\r\n /**\r\n * The set of properties exposed in the result.\r\n * @member RecognitionResult.prototype.properties\r\n * @function\r\n * @public\r\n * @returns {PropertyCollection} The set of properties exposed in the result.\r\n */\r\n public get properties(): PropertyCollection {\r\n return this.privProperties;\r\n }\r\n}\r\n"]}