UNPKG

@euirim/microsoft-cognitiveservices-speech-sdk

Version:
1 lines 5.18 kB
{"version":3,"sources":["src/sdk/RecognitionResult.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE7D;;;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,gBAAgB,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,cAAc,CAAqB;IAE3C;;;;;;;;;;;OAWG;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,YAAY,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,kBAAkB;IAWlG;;;;;;OAMG;aACQ,QAAQ,EAAI,MAAM;IAI7B;;;;;;OAMG;aACQ,MAAM,EAAI,YAAY;IAIjC;;;;;;OAMG;aACQ,IAAI,EAAI,MAAM;IAIzB;;;;;;OAMG;aACQ,QAAQ,EAAI,MAAM;IAI7B;;;;;;OAMG;aACQ,MAAM,EAAI,MAAM;IAI3B;;;;;;OAMG;aACQ,YAAY,EAAI,MAAM;IAIjC;;;;;;OAMG;aACQ,IAAI,EAAI,MAAM;IAIzB;;;;;;OAMG;aACQ,UAAU,EAAI,kBAAkB;CAG9C","file":"RecognitionResult.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 RecognitionResult\n */\nexport class RecognitionResult {\n private privResultId: string;\n private privReason: ResultReason;\n private privText: string;\n private privDuration: number;\n private privOffset: number;\n private privErrorDetails: string;\n private privJson: string;\n private privProperties: PropertyCollection;\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} errorDetails - Error details, if provided.\n * @param {string} json - Additional Json, if provided.\n * @param {PropertyCollection} properties - Additional properties, if provided.\n */\n constructor(resultId?: string, reason?: ResultReason, text?: string, duration?: number,\n offset?: number, errorDetails?: string, json?: string, properties?: PropertyCollection) {\n this.privResultId = resultId;\n this.privReason = reason;\n this.privText = text;\n this.privDuration = duration;\n this.privOffset = offset;\n this.privErrorDetails = errorDetails;\n this.privJson = json;\n this.privProperties = properties;\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 * 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"]}