yxspeechrecognition 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/YxSpeechRecognition.common.js +114 -113
- package/YxSpeechRecognition.common.js.map +1 -1
- package/YxSpeechRecognition.umd.js +117 -116
- package/YxSpeechRecognition.umd.js.map +1 -1
- package/YxSpeechRecognition.umd.min.js +2 -2
- package/YxSpeechRecognition.umd.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -11,19 +11,29 @@
|
|
|
11
11
|
return /******/ (function() { // webpackBootstrap
|
|
12
12
|
/******/ var __webpack_modules__ = ({
|
|
13
13
|
|
|
14
|
-
/***/
|
|
15
|
-
/***/ (function(module,
|
|
14
|
+
/***/ 256:
|
|
15
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
"use strict";
|
|
18
|
+
__webpack_require__.r(__webpack_exports__);
|
|
19
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(601);
|
|
20
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
21
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(314);
|
|
22
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
23
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(417);
|
|
24
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
25
|
+
// Imports
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
var ___CSS_LOADER_URL_IMPORT_0___ = new URL(/* asset import */ __webpack_require__(671), __webpack_require__.b);
|
|
30
|
+
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
|
|
31
|
+
var ___CSS_LOADER_URL_REPLACEMENT_0___ = _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_0___);
|
|
32
|
+
// Module
|
|
33
|
+
___CSS_LOADER_EXPORT___.push([module.id, ".yx-speech-recognition .icon[data-v-643faf61]{position:absolute;right:calc(var(--578fe822)*81.43);top:calc(var(--578fe822)*6.67);pointer-events:all;cursor:pointer;z-index:20}.yx-speech-recognition .box[data-v-643faf61]{display:grid;grid-template-rows:max-content 1fr;position:absolute;left:calc(var(--578fe822)*81.38);top:calc(var(--578fe822)*17.43);pointer-events:all;width:calc(var(--578fe822)*17.86);height:calc(var(--578fe822)*16.1);background:rgba(2,11,72,.6);border-radius:calc(var(--578fe822)*.57);z-index:20}.yx-speech-recognition .box .title[data-v-643faf61]{display:flex;align-items:center;justify-content:space-between;width:100%;height:calc(var(--578fe822)*2.29);padding:0 calc(var(--578fe822)*.76);box-sizing:border-box;background:linear-gradient(270deg,rgba(0,126,245,.94),rgba(54,141,253,.75) 70%,rgba(60,125,255,.51));border-radius:calc(var(--578fe822)*.57) calc(var(--578fe822)*.57) 0 0}.yx-speech-recognition .box .title-icon[data-v-643faf61]{display:flex;align-items:center;gap:calc(var(--578fe822)*.38)}.yx-speech-recognition .box .title-icon img[data-v-643faf61]{width:calc(var(--578fe822)*1);height:calc(var(--578fe822)*1)}.yx-speech-recognition .box .title-icon span[data-v-643faf61]{font-size:calc(var(--578fe822)*1.14);font-weight:800;color:#fff}.yx-speech-recognition .box .title .close[data-v-643faf61]{cursor:pointer}.yx-speech-recognition .box .title .close img[data-v-643faf61]{width:calc(var(--578fe822)*1.1)}.yx-speech-recognition .box .content[data-v-643faf61]{display:flex;align-items:center;justify-content:center;width:100%;height:100%;background:url(" + ___CSS_LOADER_URL_REPLACEMENT_0___ + ") no-repeat center 35%}.yx-speech-recognition .box .content span[data-v-643faf61]{margin-top:calc(var(--578fe822)*6);font-size:calc(var(--578fe822)*1)}.yx-speech-recognition .box .message-list[data-v-643faf61]{overflow:hidden;padding:calc(var(--578fe822)*.58);box-sizing:border-box;padding-right:calc(var(--578fe822)*.29)}.yx-speech-recognition .box .message-list-inner[data-v-643faf61]{height:100%;display:flex;flex-direction:column;gap:calc(var(--578fe822)*.53);overflow-y:overlay}.yx-speech-recognition .displayAssistant[data-v-643faf61]{position:absolute;right:calc(var(--578fe822)*74.17);top:calc(var(--578fe822)*3.19);pointer-events:all;cursor:pointer;z-index:20}.yx-speech-recognition .displayAssistant .icon1[data-v-643faf61]{width:calc(var(--578fe822)*3.76);height:calc(var(--578fe822)*3.88)}.yx-speech-recognition .displayAssistant .icon1 img[data-v-643faf61]{width:100%;height:100%}.yx-speech-recognition .displayAssistant .bubbleBox[data-v-643faf61]{position:absolute;top:0;left:calc(var(--578fe822)*3.76)}.yx-speech-recognition .displayAssistant .bubbleBox span[data-v-643faf61]{display:block;max-width:calc(var(--578fe822)*19.21);font-size:calc(var(--578fe822)*1);color:#fff;padding:calc(var(--578fe822)*.38);box-sizing:border-box}.yx-speech-recognition .displayAssistant .bubbleBox-title[data-v-643faf61]{position:fixed;background-color:rgba(70,61,255,.85);box-shadow:inset 0 0 calc(var(--578fe822)*.57) 0 #d4d9ff;border-radius:calc(var(--578fe822)*.27);margin-left:calc(var(--578fe822)*.49)}.yx-speech-recognition .displayAssistant .bubbleBox-title[data-v-643faf61]:after,.yx-speech-recognition .displayAssistant .bubbleBox-title[data-v-643faf61]:before{content:\"\";display:block;position:absolute}.yx-speech-recognition .displayAssistant .bubbleBox-title[data-v-643faf61]:before{border-top:calc(var(--578fe822)*.25) solid transparent;border-bottom:calc(var(--578fe822)*.25) solid transparent;border-right:calc(var(--578fe822)*.5) solid rgba(70,61,255,.85);transform:translateX(calc(var(--578fe822)*-.46));left:0;top:calc(var(--578fe822)*.48)}.yx-speech-recognition .displayAssistant .bubbleBox-to[data-v-643faf61]{background-color:rgba(98,183,0,.85);box-shadow:inset 0 0 calc(var(--578fe822)*.57) 0 #fff3b4}.yx-speech-recognition .displayAssistant .bubbleBox-to[data-v-643faf61]:before{border-right:calc(var(--578fe822)*.5) solid transparent}.yx-speech-recognition .displayAssistant .bubbleBox-to[data-v-643faf61]:after{border-top:calc(var(--578fe822)*.25) solid transparent;border-bottom:calc(var(--578fe822)*.25) solid transparent;border-right:calc(var(--578fe822)*.5) solid rgba(98,183,0,.85);transform:translateX(calc(var(--578fe822)*-.46));left:0;top:calc(var(--578fe822)*.48)}", ""]);
|
|
34
|
+
// Exports
|
|
35
|
+
/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
|
|
18
36
|
|
|
19
|
-
// load the styles
|
|
20
|
-
var content = __webpack_require__(814);
|
|
21
|
-
if(content.__esModule) content = content.default;
|
|
22
|
-
if(typeof content === 'string') content = [[module.id, content, '']];
|
|
23
|
-
if(content.locals) module.exports = content.locals;
|
|
24
|
-
// add the styles to the DOM
|
|
25
|
-
var add = (__webpack_require__(258)/* ["default"] */ .A)
|
|
26
|
-
var update = add("45c40d67", content, true, {"sourceMap":false,"shadowMode":false});
|
|
27
37
|
|
|
28
38
|
/***/ }),
|
|
29
39
|
|
|
@@ -833,29 +843,19 @@ module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFgAAABYCAMAAABG
|
|
|
833
843
|
|
|
834
844
|
/***/ }),
|
|
835
845
|
|
|
836
|
-
/***/
|
|
837
|
-
/***/ (function(module,
|
|
838
|
-
|
|
839
|
-
"use strict";
|
|
840
|
-
__webpack_require__.r(__webpack_exports__);
|
|
841
|
-
/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(601);
|
|
842
|
-
/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
843
|
-
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(314);
|
|
844
|
-
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
845
|
-
/* harmony import */ var _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(417);
|
|
846
|
-
/* harmony import */ var _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
847
|
-
// Imports
|
|
848
|
-
|
|
849
|
-
|
|
846
|
+
/***/ 876:
|
|
847
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
850
848
|
|
|
851
|
-
|
|
852
|
-
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
|
|
853
|
-
var ___CSS_LOADER_URL_REPLACEMENT_0___ = _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_0___);
|
|
854
|
-
// Module
|
|
855
|
-
___CSS_LOADER_EXPORT___.push([module.id, ".yx-speech-recognition .icon[data-v-0c23a6db]{position:absolute;right:calc(var(--396e4518)*81.43);top:calc(var(--396e4518)*6.67);pointer-events:all;cursor:pointer;z-index:20}.yx-speech-recognition .box[data-v-0c23a6db]{display:grid;grid-template-rows:max-content 1fr;position:absolute;left:calc(var(--396e4518)*81.38);top:calc(var(--396e4518)*17.43);pointer-events:all;width:calc(var(--396e4518)*17.86);height:calc(var(--396e4518)*16.1);background:rgba(2,11,72,.6);border-radius:calc(var(--396e4518)*.57);z-index:20}.yx-speech-recognition .box .title[data-v-0c23a6db]{display:flex;align-items:center;justify-content:space-between;width:100%;height:calc(var(--396e4518)*2.29);padding:0 calc(var(--396e4518)*.76);box-sizing:border-box;background:linear-gradient(270deg,rgba(0,126,245,.94),rgba(54,141,253,.75) 70%,rgba(60,125,255,.51));border-radius:calc(var(--396e4518)*.57) calc(var(--396e4518)*.57) 0 0}.yx-speech-recognition .box .title-icon[data-v-0c23a6db]{display:flex;align-items:center;gap:calc(var(--396e4518)*.38)}.yx-speech-recognition .box .title-icon img[data-v-0c23a6db]{width:calc(var(--396e4518)*1);height:calc(var(--396e4518)*1)}.yx-speech-recognition .box .title-icon span[data-v-0c23a6db]{font-size:calc(var(--396e4518)*1.14);font-weight:800;color:#fff}.yx-speech-recognition .box .title .close[data-v-0c23a6db]{cursor:pointer}.yx-speech-recognition .box .title .close img[data-v-0c23a6db]{width:calc(var(--396e4518)*1.1)}.yx-speech-recognition .box .content[data-v-0c23a6db]{display:flex;align-items:center;justify-content:center;width:100%;height:100%;background:url(" + ___CSS_LOADER_URL_REPLACEMENT_0___ + ") no-repeat center 35%}.yx-speech-recognition .box .content span[data-v-0c23a6db]{margin-top:calc(var(--396e4518)*6);font-size:calc(var(--396e4518)*1)}.yx-speech-recognition .box .message-list[data-v-0c23a6db]{overflow:hidden;padding:calc(var(--396e4518)*.58);box-sizing:border-box;padding-right:calc(var(--396e4518)*.29)}.yx-speech-recognition .box .message-list-inner[data-v-0c23a6db]{height:100%;display:flex;flex-direction:column;gap:calc(var(--396e4518)*.53);overflow-y:overlay}.yx-speech-recognition .displayAssistant[data-v-0c23a6db]{position:absolute;right:calc(var(--396e4518)*74.17);top:calc(var(--396e4518)*3.19);pointer-events:all;cursor:pointer;z-index:20}.yx-speech-recognition .displayAssistant .icon1[data-v-0c23a6db]{width:calc(var(--396e4518)*3.76);height:calc(var(--396e4518)*3.88)}.yx-speech-recognition .displayAssistant .icon1 img[data-v-0c23a6db]{width:100%;height:100%}.yx-speech-recognition .displayAssistant .bubbleBox[data-v-0c23a6db]{position:absolute;top:0;left:calc(var(--396e4518)*3.76)}.yx-speech-recognition .displayAssistant .bubbleBox span[data-v-0c23a6db]{display:block;max-width:calc(var(--396e4518)*19.21);font-size:calc(var(--396e4518)*1);color:#fff;padding:calc(var(--396e4518)*.38);box-sizing:border-box}.yx-speech-recognition .displayAssistant .bubbleBox-title[data-v-0c23a6db]{position:fixed;background-color:rgba(70,61,255,.85);box-shadow:inset 0 0 calc(var(--396e4518)*.57) 0 #d4d9ff;border-radius:calc(var(--396e4518)*.27);margin-left:calc(var(--396e4518)*.49)}.yx-speech-recognition .displayAssistant .bubbleBox-title[data-v-0c23a6db]:after,.yx-speech-recognition .displayAssistant .bubbleBox-title[data-v-0c23a6db]:before{content:\"\";display:block;position:absolute}.yx-speech-recognition .displayAssistant .bubbleBox-title[data-v-0c23a6db]:before{border-top:calc(var(--396e4518)*.25) solid transparent;border-bottom:calc(var(--396e4518)*.25) solid transparent;border-right:calc(var(--396e4518)*.5) solid rgba(70,61,255,.85);transform:translateX(calc(var(--396e4518)*-.46));left:0;top:calc(var(--396e4518)*.48)}.yx-speech-recognition .displayAssistant .bubbleBox-to[data-v-0c23a6db]{background-color:rgba(98,183,0,.85);box-shadow:inset 0 0 calc(var(--396e4518)*.57) 0 #fff3b4}.yx-speech-recognition .displayAssistant .bubbleBox-to[data-v-0c23a6db]:before{border-right:calc(var(--396e4518)*.5) solid transparent}.yx-speech-recognition .displayAssistant .bubbleBox-to[data-v-0c23a6db]:after{border-top:calc(var(--396e4518)*.25) solid transparent;border-bottom:calc(var(--396e4518)*.25) solid transparent;border-right:calc(var(--396e4518)*.5) solid rgba(98,183,0,.85);transform:translateX(calc(var(--396e4518)*-.46));left:0;top:calc(var(--396e4518)*.48)}", ""]);
|
|
856
|
-
// Exports
|
|
857
|
-
/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
|
|
849
|
+
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
858
850
|
|
|
851
|
+
// load the styles
|
|
852
|
+
var content = __webpack_require__(256);
|
|
853
|
+
if(content.__esModule) content = content.default;
|
|
854
|
+
if(typeof content === 'string') content = [[module.id, content, '']];
|
|
855
|
+
if(content.locals) module.exports = content.locals;
|
|
856
|
+
// add the styles to the DOM
|
|
857
|
+
var add = (__webpack_require__(258)/* ["default"] */ .A)
|
|
858
|
+
var update = add("59beb19d", content, true, {"sourceMap":false,"shadowMode":false});
|
|
859
859
|
|
|
860
860
|
/***/ }),
|
|
861
861
|
|
|
@@ -1279,7 +1279,7 @@ if (typeof window !== 'undefined') {
|
|
|
1279
1279
|
// Indicate to webpack that this file can be concatenated
|
|
1280
1280
|
/* harmony default export */ var setPublicPath = (null);
|
|
1281
1281
|
|
|
1282
|
-
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/SpeechRecognition/index.vue?vue&type=template&id=
|
|
1282
|
+
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/SpeechRecognition/index.vue?vue&type=template&id=643faf61&scoped=true
|
|
1283
1283
|
var render = function render() {
|
|
1284
1284
|
var _vm = this,
|
|
1285
1285
|
_c = _vm._self._c;
|
|
@@ -1350,7 +1350,7 @@ var staticRenderFns = [function () {
|
|
|
1350
1350
|
}), _c('span', [_vm._v("小宝助手")])]);
|
|
1351
1351
|
}];
|
|
1352
1352
|
|
|
1353
|
-
;// ./package/SpeechRecognition/index.vue?vue&type=template&id=
|
|
1353
|
+
;// ./package/SpeechRecognition/index.vue?vue&type=template&id=643faf61&scoped=true
|
|
1354
1354
|
|
|
1355
1355
|
;// ./node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
1356
1356
|
function typeof_typeof(o) {
|
|
@@ -17004,86 +17004,90 @@ function wakeUpState_createForOfIteratorHelper(r, e) { var t = "undefined" != ty
|
|
|
17004
17004
|
function wakeUpState_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return wakeUpState_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? wakeUpState_arrayLikeToArray(r, a) : void 0; } }
|
|
17005
17005
|
function wakeUpState_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
17006
17006
|
|
|
17007
|
-
|
|
17008
|
-
|
|
17009
|
-
|
|
17010
|
-
|
|
17011
|
-
|
|
17012
|
-
|
|
17013
|
-
|
|
17014
|
-
|
|
17015
|
-
|
|
17016
|
-
|
|
17017
|
-
|
|
17018
|
-
|
|
17007
|
+
|
|
17008
|
+
// const wakeUpState = () => {
|
|
17009
|
+
|
|
17010
|
+
// 智能体的唤醒词 “你好小宝” “小宝小宝”
|
|
17011
|
+
var wakeUp_word = ['你好小宝', '小宝小宝'];
|
|
17012
|
+
|
|
17013
|
+
// 智能体的退出词 “关闭小宝” “退出” “结束对话”
|
|
17014
|
+
var quit_word = ['关闭小宝', '退出', '结束对话'];
|
|
17015
|
+
var wakeUp_List = [];
|
|
17016
|
+
var quit_List = [];
|
|
17017
|
+
wakeUp_word.map(function (item) {
|
|
17018
|
+
wakeUp_List.push(pinyin(item, {
|
|
17019
|
+
toneType: 'none'
|
|
17020
|
+
}));
|
|
17021
|
+
});
|
|
17022
|
+
quit_word.map(function (item) {
|
|
17023
|
+
quit_List.push(pinyin(item, {
|
|
17024
|
+
toneType: 'none'
|
|
17025
|
+
}));
|
|
17026
|
+
});
|
|
17027
|
+
var compare_by_pinyin = function compare_by_pinyin(phrase, type) {
|
|
17028
|
+
var bool = false;
|
|
17029
|
+
var _phrase = pinyin(phrase, {
|
|
17030
|
+
toneType: 'none'
|
|
17019
17031
|
});
|
|
17020
|
-
|
|
17021
|
-
|
|
17022
|
-
|
|
17023
|
-
|
|
17032
|
+
var _List = type === 'wakeUp' ? wakeUp_List : quit_List;
|
|
17033
|
+
// if (_List.includes(_phrase)) return true
|
|
17034
|
+
_List.map(function (item) {
|
|
17035
|
+
if (_phrase.indexOf(item) >= 0) bool = true;
|
|
17024
17036
|
});
|
|
17025
|
-
|
|
17026
|
-
|
|
17027
|
-
|
|
17028
|
-
|
|
17029
|
-
|
|
17030
|
-
|
|
17031
|
-
|
|
17032
|
-
|
|
17033
|
-
|
|
17034
|
-
|
|
17035
|
-
|
|
17036
|
-
|
|
17037
|
-
var
|
|
17038
|
-
|
|
17039
|
-
|
|
17040
|
-
|
|
17041
|
-
|
|
17042
|
-
|
|
17043
|
-
|
|
17044
|
-
|
|
17045
|
-
var wakeUp = function wakeUp(opt) {
|
|
17046
|
-
var flag = false;
|
|
17047
|
-
var match = getMatch(opt);
|
|
17048
|
-
var _iterator = wakeUpState_createForOfIteratorHelper(match),
|
|
17049
|
-
_step;
|
|
17050
|
-
try {
|
|
17051
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
17052
|
-
var item = _step.value;
|
|
17053
|
-
if (compare_by_pinyin(item, 'wakeUp')) flag = true;
|
|
17054
|
-
break;
|
|
17055
|
-
}
|
|
17056
|
-
} catch (err) {
|
|
17057
|
-
_iterator.e(err);
|
|
17058
|
-
} finally {
|
|
17059
|
-
_iterator.f();
|
|
17037
|
+
return bool;
|
|
17038
|
+
};
|
|
17039
|
+
var getMatch = function getMatch(opt) {
|
|
17040
|
+
var _opt$result, _sentence$match;
|
|
17041
|
+
// const { voice_text_str } = opt?.result ?? { voice_text_str: '' }
|
|
17042
|
+
var voice_text_str = opt === null || opt === void 0 || (_opt$result = opt.result) === null || _opt$result === void 0 ? void 0 : _opt$result.voice_text_str;
|
|
17043
|
+
var sentence = voice_text_str.replace(/[\s+.!/_,$%^*()/[\]:/"/'?【】+——!,。?、~@#¥%……&*():;《){}《》“”()»〔〕-]+/g, '');
|
|
17044
|
+
var match = (_sentence$match = sentence.match(/[\u4e00-\u9fff]+/g)) !== null && _sentence$match !== void 0 ? _sentence$match : [];
|
|
17045
|
+
return match;
|
|
17046
|
+
};
|
|
17047
|
+
var wakeUp = function wakeUp(opt) {
|
|
17048
|
+
var flag = false;
|
|
17049
|
+
var match = getMatch(opt);
|
|
17050
|
+
var _iterator = wakeUpState_createForOfIteratorHelper(match),
|
|
17051
|
+
_step;
|
|
17052
|
+
try {
|
|
17053
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
17054
|
+
var item = _step.value;
|
|
17055
|
+
if (compare_by_pinyin(item, 'wakeUp')) flag = true;
|
|
17056
|
+
break;
|
|
17060
17057
|
}
|
|
17061
|
-
|
|
17062
|
-
|
|
17063
|
-
|
|
17064
|
-
|
|
17065
|
-
|
|
17066
|
-
|
|
17067
|
-
|
|
17068
|
-
|
|
17069
|
-
|
|
17070
|
-
|
|
17071
|
-
|
|
17072
|
-
|
|
17073
|
-
|
|
17074
|
-
|
|
17075
|
-
|
|
17076
|
-
|
|
17077
|
-
|
|
17058
|
+
} catch (err) {
|
|
17059
|
+
_iterator.e(err);
|
|
17060
|
+
} finally {
|
|
17061
|
+
_iterator.f();
|
|
17062
|
+
}
|
|
17063
|
+
return flag;
|
|
17064
|
+
};
|
|
17065
|
+
var onQuit = function onQuit(opt) {
|
|
17066
|
+
var flag = false;
|
|
17067
|
+
var match = getMatch(opt);
|
|
17068
|
+
var _iterator2 = wakeUpState_createForOfIteratorHelper(match),
|
|
17069
|
+
_step2;
|
|
17070
|
+
try {
|
|
17071
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
17072
|
+
var item = _step2.value;
|
|
17073
|
+
if (compare_by_pinyin(item, 'Quit')) flag = true;
|
|
17074
|
+
break;
|
|
17078
17075
|
}
|
|
17079
|
-
|
|
17080
|
-
|
|
17081
|
-
|
|
17082
|
-
|
|
17083
|
-
|
|
17084
|
-
|
|
17076
|
+
} catch (err) {
|
|
17077
|
+
_iterator2.e(err);
|
|
17078
|
+
} finally {
|
|
17079
|
+
_iterator2.f();
|
|
17080
|
+
}
|
|
17081
|
+
return flag;
|
|
17085
17082
|
};
|
|
17086
17083
|
|
|
17084
|
+
// return {
|
|
17085
|
+
// wakeUp,
|
|
17086
|
+
// onQuit
|
|
17087
|
+
// }
|
|
17088
|
+
// }
|
|
17089
|
+
|
|
17090
|
+
// export { wakeUpState, wakeUpState as default }
|
|
17087
17091
|
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/SpeechRecognition/index.vue?vue&type=script&lang=js
|
|
17088
17092
|
|
|
17089
17093
|
|
|
@@ -17096,9 +17100,6 @@ function SpeechRecognitionvue_type_script_lang_js_objectSpread(e) { for (var r =
|
|
|
17096
17100
|
|
|
17097
17101
|
|
|
17098
17102
|
|
|
17099
|
-
var _wakeUpState = wakeUpState(),
|
|
17100
|
-
wakeUp = _wakeUpState.wakeUp,
|
|
17101
|
-
onQuit = _wakeUpState.onQuit;
|
|
17102
17103
|
var __default__ = {
|
|
17103
17104
|
name: "yx-speech-recognition",
|
|
17104
17105
|
components: {
|
|
@@ -17525,7 +17526,7 @@ var __default__ = {
|
|
|
17525
17526
|
var __injectCSSVars__ = function __injectCSSVars__() {
|
|
17526
17527
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.useCssVars)(function (_vm, _setup) {
|
|
17527
17528
|
return {
|
|
17528
|
-
"
|
|
17529
|
+
"578fe822": _vm.htmlFontSize
|
|
17529
17530
|
};
|
|
17530
17531
|
});
|
|
17531
17532
|
};
|
|
@@ -17537,9 +17538,9 @@ __default__.setup = __setup__ ? function (props, ctx) {
|
|
|
17537
17538
|
/* harmony default export */ var SpeechRecognitionvue_type_script_lang_js = (__default__);
|
|
17538
17539
|
;// ./package/SpeechRecognition/index.vue?vue&type=script&lang=js
|
|
17539
17540
|
/* harmony default export */ var package_SpeechRecognitionvue_type_script_lang_js = (SpeechRecognitionvue_type_script_lang_js);
|
|
17540
|
-
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-64.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-64.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-64.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-64.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-64.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/SpeechRecognition/index.vue?vue&type=style&index=0&id=
|
|
17541
|
-
var
|
|
17542
|
-
;// ./package/SpeechRecognition/index.vue?vue&type=style&index=0&id=
|
|
17541
|
+
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-64.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-64.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-64.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-64.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-64.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/SpeechRecognition/index.vue?vue&type=style&index=0&id=643faf61&prod&lang=scss&scoped=true
|
|
17542
|
+
var SpeechRecognitionvue_type_style_index_0_id_643faf61_prod_lang_scss_scoped_true = __webpack_require__(876);
|
|
17543
|
+
;// ./package/SpeechRecognition/index.vue?vue&type=style&index=0&id=643faf61&prod&lang=scss&scoped=true
|
|
17543
17544
|
|
|
17544
17545
|
;// ./package/SpeechRecognition/index.vue
|
|
17545
17546
|
|
|
@@ -17556,7 +17557,7 @@ var SpeechRecognition_component = normalizeComponent(
|
|
|
17556
17557
|
staticRenderFns,
|
|
17557
17558
|
false,
|
|
17558
17559
|
null,
|
|
17559
|
-
"
|
|
17560
|
+
"643faf61",
|
|
17560
17561
|
null
|
|
17561
17562
|
|
|
17562
17563
|
)
|