microsoft-cognitiveservices-speech-sdk
Version:
Microsoft Cognitive Services Speech SDK for JavaScript
1 lines • 2.69 kB
Source Map (JSON)
{"version":3,"sources":["src/sdk/KeywordRecognitionModel.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,qBAAa,uBAAuB;IAChC,OAAO,CAAC,YAAY,CAAkB;IAEtC;;;OAGG;IACH,OAAO;IAIP;;;;;;;;;OASG;WACW,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,uBAAuB;IAMjE;;;;;;;;OAQG;WACW,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,uBAAuB;IAM7D;;;;;OAKG;IACI,KAAK,IAAI,IAAI;CAOvB","file":"KeywordRecognitionModel.d.ts","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT license.\r\n\r\nimport { Contracts } from \"./Contracts.js\";\r\n\r\n/**\r\n * Represents a keyword recognition model for recognizing when\r\n * the user says a keyword to initiate further speech recognition.\r\n * @class KeywordRecognitionModel\r\n */\r\nexport class KeywordRecognitionModel {\r\n private privDisposed: boolean = false;\r\n\r\n /**\r\n * Create and initializes a new instance.\r\n * @constructor\r\n */\r\n private constructor() {\r\n return;\r\n }\r\n\r\n /**\r\n * Creates a keyword recognition model using the specified filename.\r\n * @member KeywordRecognitionModel.fromFile\r\n * @function\r\n * @public\r\n * @param {string} fileName - A string that represents file name for the keyword recognition model.\r\n * Note, the file can point to a zip file in which case the model\r\n * will be extracted from the zip.\r\n * @returns {KeywordRecognitionModel} The keyword recognition model being created.\r\n */\r\n public static fromFile(fileName: string): KeywordRecognitionModel {\r\n Contracts.throwIfFileDoesNotExist(fileName, \"fileName\");\r\n\r\n throw new Error(\"Not yet implemented.\");\r\n }\r\n\r\n /**\r\n * Creates a keyword recognition model using the specified filename.\r\n * @member KeywordRecognitionModel.fromStream\r\n * @function\r\n * @public\r\n * @param {string} file - A File that represents file for the keyword recognition model.\r\n * Note, the file can point to a zip file in which case the model will be extracted from the zip.\r\n * @returns {KeywordRecognitionModel} The keyword recognition model being created.\r\n */\r\n public static fromStream(file: File): KeywordRecognitionModel {\r\n Contracts.throwIfNull(file, \"file\");\r\n\r\n throw new Error(\"Not yet implemented.\");\r\n }\r\n\r\n /**\r\n * Dispose of associated resources.\r\n * @member KeywordRecognitionModel.prototype.close\r\n * @function\r\n * @public\r\n */\r\n public close(): void {\r\n if (this.privDisposed) {\r\n return;\r\n }\r\n\r\n this.privDisposed = true;\r\n }\r\n}\r\n"]}