6010771c3e1ff5744ba4a3eba98c9e24fc6a91fb4f9a66267e4f2ae381cc0909.json 9.6 KB

1
  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.type = exports.connectivity = exports.Device = exports.OS = exports.System = exports.Context = exports.SpeechServiceConfig = void 0;\n/* eslint-disable max-classes-per-file */\n// The config is serialized and sent as the Speech.Config\nclass SpeechServiceConfig {\n constructor(context) {\n this.context = context;\n }\n serialize() {\n return JSON.stringify(this, (key, value) => {\n if (value && typeof value === \"object\" && !Array.isArray(value)) {\n const replacement = {};\n for (const k in value) {\n if (Object.hasOwnProperty.call(value, k)) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n replacement[k && k.charAt(0).toLowerCase() + k.substring(1)] = value[k];\n }\n }\n return replacement;\n }\n return value;\n });\n }\n get Context() {\n return this.context;\n }\n get Recognition() {\n return this.recognition;\n }\n set Recognition(value) {\n this.recognition = value.toLowerCase();\n }\n}\nexports.SpeechServiceConfig = SpeechServiceConfig;\nclass Context {\n constructor(os) {\n this.system = new System();\n this.os = os;\n }\n}\nexports.Context = Context;\nclass System {\n constructor() {\n // Note: below will be patched for official builds.\n const SPEECHSDK_CLIENTSDK_VERSION = \"1.41.0\";\n this.name = \"SpeechSDK\";\n this.version = SPEECHSDK_CLIENTSDK_VERSION;\n this.build = \"JavaScript\";\n this.lang = \"JavaScript\";\n }\n}\nexports.System = System;\nclass OS {\n constructor(platform, name, version) {\n this.platform = platform;\n this.name = name;\n this.version = version;\n }\n}\nexports.OS = OS;\nclass Device {\n constructor(manufacturer, model, version) {\n this.manufacturer = manufacturer;\n this.model = model;\n this.version = version;\n }\n}\nexports.Device = Device;\nvar connectivity;\n(function (connectivity) {\n connectivity[\"Bluetooth\"] = \"Bluetooth\";\n connectivity[\"Wired\"] = \"Wired\";\n connectivity[\"WiFi\"] = \"WiFi\";\n connectivity[\"Cellular\"] = \"Cellular\";\n connectivity[\"InBuilt\"] = \"InBuilt\";\n connectivity[\"Unknown\"] = \"Unknown\";\n})(connectivity = exports.connectivity || (exports.connectivity = {}));\nvar type;\n(function (type) {\n type[\"Phone\"] = \"Phone\";\n type[\"Speaker\"] = \"Speaker\";\n type[\"Car\"] = \"Car\";\n type[\"Headset\"] = \"Headset\";\n type[\"Thermostat\"] = \"Thermostat\";\n type[\"Microphones\"] = \"Microphones\";\n type[\"Deskphone\"] = \"Deskphone\";\n type[\"RemoteControl\"] = \"RemoteControl\";\n type[\"Unknown\"] = \"Unknown\";\n type[\"File\"] = \"File\";\n type[\"Stream\"] = \"Stream\";\n})(type = exports.type || (exports.type = {}));","map":{"version":3,"names":["Object","defineProperty","exports","value","type","connectivity","Device","OS","System","Context","SpeechServiceConfig","constructor","context","serialize","JSON","stringify","key","Array","isArray","replacement","k","hasOwnProperty","call","charAt","toLowerCase","substring","Recognition","recognition","os","system","SPEECHSDK_CLIENTSDK_VERSION","name","version","build","lang","platform","manufacturer","model"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/microsoft-cognitiveservices-speech-sdk/distrib/lib/src/common.speech/SpeechServiceConfig.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.type = exports.connectivity = exports.Device = exports.OS = exports.System = exports.Context = exports.SpeechServiceConfig = void 0;\n/* eslint-disable max-classes-per-file */\n// The config is serialized and sent as the Speech.Config\nclass SpeechServiceConfig {\n constructor(context) {\n this.context = context;\n }\n serialize() {\n return JSON.stringify(this, (key, value) => {\n if (value && typeof value === \"object\" && !Array.isArray(value)) {\n const replacement = {};\n for (const k in value) {\n if (Object.hasOwnProperty.call(value, k)) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n replacement[k && k.charAt(0).toLowerCase() + k.substring(1)] = value[k];\n }\n }\n return replacement;\n }\n return value;\n });\n }\n get Context() {\n return this.context;\n }\n get Recognition() {\n return this.recognition;\n }\n set Recognition(value) {\n this.recognition = value.toLowerCase();\n }\n}\nexports.SpeechServiceConfig = SpeechServiceConfig;\nclass Context {\n constructor(os) {\n this.system = new System();\n this.os = os;\n }\n}\nexports.Context = Context;\nclass System {\n constructor() {\n // Note: below will be patched for official builds.\n const SPEECHSDK_CLIENTSDK_VERSION = \"1.41.0\";\n this.name = \"SpeechSDK\";\n this.version = SPEECHSDK_CLIENTSDK_VERSION;\n this.build = \"JavaScript\";\n this.lang = \"JavaScript\";\n }\n}\nexports.System = System;\nclass OS {\n constructor(platform, name, version) {\n this.platform = platform;\n this.name = name;\n this.version = version;\n }\n}\nexports.OS = OS;\nclass Device {\n constructor(manufacturer, model, version) {\n this.manufacturer = manufacturer;\n this.model = model;\n this.version = version;\n }\n}\nexports.Device = Device;\nvar connectivity;\n(function (connectivity) {\n connectivity[\"Bluetooth\"] = \"Bluetooth\";\n connectivity[\"Wired\"] = \"Wired\";\n connectivity[\"WiFi\"] = \"WiFi\";\n connectivity[\"Cellular\"] = \"Cellular\";\n connectivity[\"InBuilt\"] = \"InBuilt\";\n connectivity[\"Unknown\"] = \"Unknown\";\n})(connectivity = exports.connectivity || (exports.connectivity = {}));\nvar type;\n(function (type) {\n type[\"Phone\"] = \"Phone\";\n type[\"Speaker\"] = \"Speaker\";\n type[\"Car\"] = \"Car\";\n type[\"Headset\"] = \"Headset\";\n type[\"Thermostat\"] = \"Thermostat\";\n type[\"Microphones\"] = \"Microphones\";\n type[\"Deskphone\"] = \"Deskphone\";\n type[\"RemoteControl\"] = \"RemoteControl\";\n type[\"Unknown\"] = \"Unknown\";\n type[\"File\"] = \"File\";\n type[\"Stream\"] = \"Stream\";\n})(type = exports.type || (exports.type = {}));\n\n"],"mappings":"AAAA,YAAY;;AACZ;AACA;AACAA,MAAM,CAACC,cAAc,CAACC,OAAO,EAAE,YAAY,EAAE;EAAEC,KAAK,EAAE;AAAK,CAAC,CAAC;A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