@voice-ping/cognitive-services-speech
Version:
VoicePing Cognitive Services Speech SDK for JavaScript forked from Microsoft
1 lines • 7.12 kB
Source Map (JSON)
{"version":3,"sources":["src/sdk/RecognitionResultCustom.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE7D;;;GAGG;AACH,qBAAa,uBAAuB;IAChC,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;IAC3C,OAAO,CAAC,aAAa,CAAS;IAE9B;;;;;;;;;;;;;;OAcG;gBACS,QAAQ,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,YAAY,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAC1E,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,EAAE,SAAS,CAAC,EAAE,MAAM;IAc/K;;;;;;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;IAED;;;;;;OAMG;IACF,IAAW,SAAS,IAAI,MAAM,CAE9B;CACJ","file":"RecognitionResultCustom.d.ts","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\n\nimport { PropertyCollection, ResultReason } from \"./Exports\";\n\n/**\n * Defines result of speech recognition.\n * @class RecognitionResultCustom\n */\nexport class RecognitionResultCustom {\n private privResultId: string;\n private privReason: ResultReason;\n private privText: string;\n private privDuration: number;\n private privOffset: number;\n private privLanguage: string;\n private privLanguageDetectionConfidence: string;\n private privErrorDetails: string;\n private privJson: string;\n private privProperties: PropertyCollection;\n private privRequestId: string;\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 {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 * @param {string} requestId - requestId for DEBUG.\n */\n constructor(resultId?: string, reason?: ResultReason, text?: string, duration?: number,\n offset?: number, language?: string, languageDetectionConfidence?: string, errorDetails?: string, json?: string, properties?: PropertyCollection, requestId?: string) {\n this.privResultId = resultId;\n this.privReason = reason;\n this.privText = text;\n this.privDuration = duration;\n this.privOffset = offset;\n this.privLanguage = language;\n this.privLanguageDetectionConfidence = languageDetectionConfidence;\n this.privErrorDetails = errorDetails;\n this.privJson = json;\n this.privProperties = properties;\n this.privRequestId = requestId;\n }\n\n /**\n * Specifies the result identifier.\n * @member RecognitionResult.prototype.resultId\n * @function\n * @public\n * @returns {string} Specifies the result identifier.\n */\n public get resultId(): string {\n return this.privResultId;\n }\n\n /**\n * Specifies status of the result.\n * @member RecognitionResult.prototype.reason\n * @function\n * @public\n * @returns {ResultReason} Specifies status of the result.\n */\n public get reason(): ResultReason {\n return this.privReason;\n }\n\n /**\n * Presents the recognized text in the result.\n * @member RecognitionResult.prototype.text\n * @function\n * @public\n * @returns {string} Presents the recognized text in the result.\n */\n public get text(): string {\n return this.privText;\n }\n\n /**\n * Duration of recognized speech in 100 nano second incements.\n * @member RecognitionResult.prototype.duration\n * @function\n * @public\n * @returns {number} Duration of recognized speech in 100 nano second incements.\n */\n public get duration(): number {\n return this.privDuration;\n }\n\n /**\n * Offset of recognized speech in 100 nano second incements.\n * @member RecognitionResult.prototype.offset\n * @function\n * @public\n * @returns {number} Offset of recognized speech in 100 nano second incements.\n */\n public get offset(): number {\n return this.privOffset;\n }\n\n /**\n * Primary Language detected.\n * @member RecognitionResult.prototype.language\n * @function\n * @public\n * @returns {string} language detected.\n */\n public get language(): string {\n return this.privLanguage;\n }\n\n /**\n * Primary Language detection confidence (Unknown, Low, Medium, High).\n * @member RecognitionResult.prototype.languageDetectionConfidence\n * @function\n * @public\n * @returns {string} detection confidence strength.\n */\n public get languageDetectionConfidence(): string {\n return this.privLanguageDetectionConfidence;\n }\n\n /**\n * In case of an unsuccessful recognition, provides details of the occurred error.\n * @member RecognitionResult.prototype.errorDetails\n * @function\n * @public\n * @returns {string} a brief description of an error.\n */\n public get errorDetails(): string {\n return this.privErrorDetails;\n }\n\n /**\n * A string containing Json serialized recognition result as it was received from the service.\n * @member RecognitionResult.prototype.json\n * @function\n * @private\n * @returns {string} Json serialized representation of the result.\n */\n public get json(): string {\n return this.privJson;\n }\n\n /**\n * The set of properties exposed in the result.\n * @member RecognitionResult.prototype.properties\n * @function\n * @public\n * @returns {PropertyCollection} The set of properties exposed in the result.\n */\n public get properties(): PropertyCollection {\n return this.privProperties;\n }\n\n /**\n * requestId for DEBUG.\n * @member RecognitionResult.prototype.requestId\n * @function\n * @private\n * @returns {string} requestId\n */\n public get requestId(): string {\n return this.privRequestId;\n }\n}\n"]}