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.PhraseListGrammar = void 0;\n/**\n * Allows additions of new phrases to improve speech recognition.\n *\n * Phrases added to the recognizer are effective at the start of the next recognition, or the next time the SpeechSDK must reconnect\n * to the speech service.\n */\nclass PhraseListGrammar {\n constructor(recogBase) {\n this.privGrammerBuilder = recogBase.dynamicGrammar;\n }\n /**\n * Creates a PhraseListGrammar from a given speech recognizer. Will accept any recognizer that derives from @class Recognizer.\n * @param recognizer The recognizer to add phrase lists to.\n */\n static fromRecognizer(recognizer) {\n const recoBase = recognizer.internalData;\n return new PhraseListGrammar(recoBase);\n }\n /**\n * Adds a single phrase to the current recognizer.\n * @param phrase Phrase to add.\n */\n addPhrase(phrase) {\n this.privGrammerBuilder.addPhrase(phrase);\n }\n /**\n * Adds multiple phrases to the current recognizer.\n * @param phrases Array of phrases to add.\n */\n addPhrases(phrases) {\n this.privGrammerBuilder.addPhrase(phrases);\n }\n /**\n * Clears all phrases added to the current recognizer.\n */\n clear() {\n this.privGrammerBuilder.clearPhrases();\n }\n}\nexports.PhraseListGrammar = PhraseListGrammar;","map":{"version":3,"names":["Object","defineProperty","exports","value","PhraseListGrammar","constructor","recogBase","privGrammerBuilder","dynamicGrammar","fromRecognizer","recognizer","recoBase","internalData","addPhrase","phrase","addPhrases","phrases","clear","clearPhrases"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/microsoft-cognitiveservices-speech-sdk/distrib/lib/src/sdk/PhraseListGrammar.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.PhraseListGrammar = void 0;\n/**\n * Allows additions of new phrases to improve speech recognition.\n *\n * Phrases added to the recognizer are effective at the start of the next recognition, or the next time the SpeechSDK must reconnect\n * to the speech service.\n */\nclass PhraseListGrammar {\n constructor(recogBase) {\n this.privGrammerBuilder = recogBase.dynamicGrammar;\n }\n /**\n * Creates a PhraseListGrammar from a given speech recognizer. Will accept any recognizer that derives from @class Recognizer.\n * @param recognizer The recognizer to add phrase lists to.\n */\n static fromRecognizer(recognizer) {\n const recoBase = recognizer.internalData;\n return new PhraseListGrammar(recoBase);\n }\n /**\n * Adds a single phrase to the current recognizer.\n * @param phrase Phrase to add.\n */\n addPhrase(phrase) {\n this.privGrammerBuilder.addPhrase(phrase);\n }\n /**\n * Adds multiple phrases to the current recognizer.\n * @param phrases Array of phrases to add.\n */\n addPhrases(phrases) {\n this.privGrammerBuilder.addPhrase(phrases);\n }\n /**\n * Clears all phrases added to the current recognizer.\n */\n clear() {\n this.privGrammerBuilder.clearPhrases();\n }\n}\nexports.PhraseListGrammar = PhraseListGrammar;\n\n"],"mappings":"AAAA,YAAY;;AACZ;AACA;AACAA,MAAM,CAACC,cAAc,CAACC,OAAO,EAAE,YAAY,EAAE;EAAEC,KAAK,EAAE;AAAK,CAAC,CAAC;AAC7DD,OAAO,CAACE,iBAAiB,GAAG,KAAK,CAAC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,iBAAiB,CAAC;EACpBC,WAAWA,CAACC,SAAS,EAAE;IACnB,IAAI,CAACC,kBAAkB,GAAGD,SAAS,CAACE,cAAc;EACtD;EACA;AACJ;AACA;AACA;EACI,OAAOC,cAAcA,CAACC,UAAU,EAAE;IAC9B,MAAMC,QAAQ,GAAGD,UAAU,CAACE,YAAY;IACxC,OAAO,IAAIR,iBAAiB,CAACO,QAAQ,CAAC;EAC1C;EACA;AACJ;AACA;AACA;EACIE,SAASA,CAACC,MAAM,EAAE;IACd,IAAI,CAACP,kBAAkB,CAACM,SAAS,CAACC,MAAM,CAAC;EAC7C;EACA;AACJ;AACA;AACA;EACIC,UAAUA,CAACC,OAAO,EAAE;IAChB,IAAI,CAACT,kBAAkB,CAACM,SAAS,CAACG,OAAO,CAAC;EAC9C;EACA;AACJ;AACA;EACIC,KAAKA,CAAA,EAAG;IACJ,IAAI,CAACV,kBAAkB,CAACW,YAAY,CAAC,CAAC;EAC1C;AACJ;AACAhB,OAAO,CAACE,iBAAiB,GAAGA,iBAAiB","ignoreList":[]},"metadata":{},"sourceType":"script","externalDependencies":[]}
|