g-ai-robot3 0.1.28 → 0.1.29

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.
@@ -31217,7 +31217,7 @@ function segment(word, options) {
31217
31217
 
31218
31218
 
31219
31219
 
31220
- const _withScopeId = n => (_pushScopeId("data-v-4a2c5a81"), n = n(), _popScopeId(), n);
31220
+ const _withScopeId = n => (_pushScopeId("data-v-207339b4"), n = n(), _popScopeId(), n);
31221
31221
  const _hoisted_1 = ["src"];
31222
31222
  const _hoisted_2 = {
31223
31223
  key: 0,
@@ -31441,7 +31441,7 @@ const _hoisted_19 = ["src"];
31441
31441
  iAmHere();
31442
31442
  window.setTimeout(() => {
31443
31443
  setRecording();
31444
- }, 3000);
31444
+ }, 2000);
31445
31445
  }
31446
31446
  };
31447
31447
  const throttle = (func, wait) => {
@@ -31493,79 +31493,80 @@ const _hoisted_19 = ["src"];
31493
31493
 
31494
31494
  // 唤醒后的录音
31495
31495
  const setRecording = () => {
31496
- state.recorder.stop();
31497
- state.recorder.start();
31498
- window.setTimeout(() => {
31499
- let wavBlob = state.recorder.getWAVBlob();
31500
- let newbolb = new Blob([wavBlob], {
31501
- type: "audio/wav"
31502
- });
31503
- //获取当时时间戳作为文件名
31504
- let fileOfBlob = new File([newbolb], new Date().getTime() + ".wav");
31505
-
31506
- // 本地播放录音文件流
31507
- let sound = new Audio();
31508
- let src = URL.createObjectURL(fileOfBlob);
31509
- sound.src = src;
31510
- sound.play();
31511
- state.recorder.stop();
31512
- state.recorderCode = 0;
31513
- let formData = new FormData();
31514
- formData.append("modelName", "medium");
31515
- formData.append("audio", fileOfBlob);
31516
- uploadWavFile(formData).then(result => {
31517
- let res = result.data;
31518
- if (res.code == 200) {
31519
- let {
31520
- answer: audioToText
31521
- } = res.detail.content;
31522
- let text = audioToText;
31523
-
31524
- // let text = "回到2023年7月22日时刻";
31525
-
31526
- // 拿到的语音进行问答
31527
- let option = {
31528
- searchText: text,
31529
- use_tts: "True",
31530
- coze_info: props.cozeInfo || {}
31531
- };
31532
- searchText(option).then(q => {
31533
- let data = q.data;
31534
- if (data && data.code == 200) {
31535
- // 检索场景
31536
- // matching(text, data.detail[0]);
31537
-
31538
- // 讲回答后的内容返回给业务系统
31539
- if (props.searchTextCallback) {
31540
- props.searchTextCallback(data.detail[0]);
31541
- }
31542
- let {
31543
- ttsMaleAddress
31544
- } = data.detail[0];
31545
- // 播放回答内容和进行小G动作
31546
- if (ttsMaleAddress) {
31547
- playAudio(ttsMaleAddress, "sys");
31496
+ // state.recorder.stop();
31497
+ state.recorder.start().then(() => {
31498
+ window.setTimeout(() => {
31499
+ let wavBlob = state.recorder.getWAVBlob();
31500
+ let newbolb = new Blob([wavBlob], {
31501
+ type: "audio/wav"
31502
+ });
31503
+ //获取当时时间戳作为文件名
31504
+ let fileOfBlob = new File([newbolb], new Date().getTime() + ".wav");
31505
+
31506
+ // 本地播放录音文件流
31507
+ let sound = new Audio();
31508
+ let src = URL.createObjectURL(fileOfBlob);
31509
+ sound.src = src;
31510
+ sound.play();
31511
+ state.recorder.stop();
31512
+ state.recorderCode = 0;
31513
+ let formData = new FormData();
31514
+ formData.append("modelName", "medium");
31515
+ formData.append("audio", fileOfBlob);
31516
+ uploadWavFile(formData).then(result => {
31517
+ let res = result.data;
31518
+ if (res.code == 200) {
31519
+ let {
31520
+ answer: audioToText
31521
+ } = res.detail.content;
31522
+ let text = audioToText;
31523
+
31524
+ // let text = "回到2023年7月22日时刻";
31525
+
31526
+ // 拿到的语音进行问答
31527
+ let option = {
31528
+ searchText: text,
31529
+ use_tts: "True",
31530
+ coze_info: props.cozeInfo || {}
31531
+ };
31532
+ searchText(option).then(q => {
31533
+ let data = q.data;
31534
+ if (data && data.code == 200) {
31535
+ // 检索场景
31536
+ // matching(text, data.detail[0]);
31537
+
31538
+ // 讲回答后的内容返回给业务系统
31539
+ if (props.searchTextCallback) {
31540
+ props.searchTextCallback(data.detail[0]);
31541
+ }
31542
+ let {
31543
+ ttsMaleAddress
31544
+ } = data.detail[0];
31545
+ // 播放回答内容和进行小G动作
31546
+ if (ttsMaleAddress) {
31547
+ playAudio(ttsMaleAddress, "sys");
31548
+ }
31549
+ // if (state.findMatch && state.findMatch.fun) {
31550
+ // if (state.findMatch.trigger == "together") {
31551
+ // state.findMatch.fun({
31552
+ // ...data.detail[0],
31553
+ // });
31554
+ // }
31555
+ // }
31548
31556
  }
31549
- // if (state.findMatch && state.findMatch.fun) {
31550
- // if (state.findMatch.trigger == "together") {
31551
- // state.findMatch.fun({
31552
- // ...data.detail[0],
31553
- // });
31554
- // }
31555
- // }
31556
- }
31557
- }).catch(err => {
31558
- console.error("问答错误");
31559
- console.error(err);
31560
- });
31561
- }
31562
- }).catch(err => {
31563
- console.error("语音识别错误");
31564
- console.error(err);
31565
- });
31557
+ }).catch(err => {
31558
+ console.error("问答错误");
31559
+ console.error(err);
31560
+ });
31561
+ }
31562
+ }).catch(err => {
31563
+ console.error("语音识别错误");
31564
+ console.error(err);
31565
+ });
31566
31566
 
31567
- // recognition.start();
31568
- }, 5 * 1000);
31567
+ // recognition.start();
31568
+ }, 5 * 1000);
31569
+ });
31569
31570
  };
31570
31571
  const sendRecorder = () => {
31571
31572
  let wavBlob = state.recorder.getWAVBlob();
@@ -32020,15 +32021,15 @@ const _hoisted_19 = ["src"];
32020
32021
  });
32021
32022
  ;// CONCATENATED MODULE: ./src/package/src/main.vue?vue&type=script&setup=true&lang=js
32022
32023
 
32023
- ;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-12.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-12.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/package/src/main.vue?vue&type=style&index=0&id=4a2c5a81&lang=css
32024
+ ;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-12.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-12.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/package/src/main.vue?vue&type=style&index=0&id=207339b4&lang=css
32024
32025
  // extracted by mini-css-extract-plugin
32025
32026
 
32026
- ;// CONCATENATED MODULE: ./src/package/src/main.vue?vue&type=style&index=0&id=4a2c5a81&lang=css
32027
+ ;// CONCATENATED MODULE: ./src/package/src/main.vue?vue&type=style&index=0&id=207339b4&lang=css
32027
32028
 
32028
- ;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-32.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-32.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-32.use[2]!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-32.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/package/src/main.vue?vue&type=style&index=1&id=4a2c5a81&lang=less&scoped=true
32029
+ ;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-32.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-32.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-32.use[2]!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-32.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/package/src/main.vue?vue&type=style&index=1&id=207339b4&lang=less&scoped=true
32029
32030
  // extracted by mini-css-extract-plugin
32030
32031
 
32031
- ;// CONCATENATED MODULE: ./src/package/src/main.vue?vue&type=style&index=1&id=4a2c5a81&lang=less&scoped=true
32032
+ ;// CONCATENATED MODULE: ./src/package/src/main.vue?vue&type=style&index=1&id=207339b4&lang=less&scoped=true
32032
32033
 
32033
32034
  // EXTERNAL MODULE: ./node_modules/vue-loader/dist/exportHelper.js
32034
32035
  var exportHelper = __webpack_require__(6262);
@@ -32040,7 +32041,7 @@ var exportHelper = __webpack_require__(6262);
32040
32041
 
32041
32042
 
32042
32043
 
32043
- const __exports__ = /*#__PURE__*/(0,exportHelper/* default */.A)(mainvue_type_script_setup_true_lang_js, [['__scopeId',"data-v-4a2c5a81"]])
32044
+ const __exports__ = /*#__PURE__*/(0,exportHelper/* default */.A)(mainvue_type_script_setup_true_lang_js, [['__scopeId',"data-v-207339b4"]])
32044
32045
 
32045
32046
  /* harmony default export */ var main = (__exports__);
32046
32047
  ;// CONCATENATED MODULE: ./src/package/index.js
@@ -1 +1 @@
1
- .ellipsisText{display:inline-block;width:20px;height:24px;position:relative}.ellipsisText:after{position:absolute;left:0;top:4px;content:"···";animation:loading-animation 1s linear infinite}@keyframes loading-animation{0%{content:"·"}50%{content:"··"}to{content:"···"}}#g-ai-robat[data-v-4a2c5a81]{position:fixed}#g-ai-robat .robot[data-v-4a2c5a81]{cursor:pointer}#g-ai-robat .robot.disabled[data-v-4a2c5a81]{cursor:not-allowed}#g-ai-robat .robot img[data-v-4a2c5a81]{height:100px;width:100px}#g-ai-robat .talk_main[data-v-4a2c5a81]{position:absolute;width:400px;height:600px;background:#f5f6f7}#g-ai-robat .talk_main.top[data-v-4a2c5a81]{left:50%;bottom:100px;transform:translateX(-50%)}#g-ai-robat .talk_main.bottom[data-v-4a2c5a81]{left:50%;top:100px;transform:translateX(-50%)}#g-ai-robat .talk_main.right[data-v-4a2c5a81]{left:100px;bottom:50%;transform:translateY(50%)}#g-ai-robat .talk_main.left[data-v-4a2c5a81]{right:100px;bottom:50%;transform:translateY(50%)}#g-ai-robat .talk_main.top-end[data-v-4a2c5a81]{left:100px;bottom:100px}#g-ai-robat .talk_main.top-start[data-v-4a2c5a81]{right:100px;bottom:100px}#g-ai-robat .talk_main.bottom-start[data-v-4a2c5a81]{right:100px;top:100px}#g-ai-robat .talk_main.bottom-end[data-v-4a2c5a81]{left:100px;top:100px}#g-ai-robat .talk_main header[data-v-4a2c5a81]{height:44px;background:linear-gradient(90deg,#ebf1ff,#e5faf8,#f2ebfe);display:flex;padding:0 16px;align-items:center;justify-content:space-between;cursor:move}#g-ai-robat .talk_main header span[data-v-4a2c5a81]{font-size:16px;font-weight:700}#g-ai-robat .talk_main header span.close[data-v-4a2c5a81]{color:#999}#g-ai-robat .talk_main header i[data-v-4a2c5a81]{cursor:pointer}#g-ai-robat .talk_main header i.disabled[data-v-4a2c5a81]{cursor:not-allowed}#g-ai-robat .talk_main .qa_body[data-v-4a2c5a81]{list-style:none;padding:16px;box-sizing:border-box;margin:0;height:calc(100% - 116px);overflow-y:auto}#g-ai-robat .talk_main .qa_body[data-v-4a2c5a81]::-webkit-scrollbar{width:8px;background-color:#f9f9f9}#g-ai-robat .talk_main .qa_body[data-v-4a2c5a81]::-webkit-scrollbar-track{background:#e1e1e1;border-radius:10px}#g-ai-robat .talk_main .qa_body[data-v-4a2c5a81]::-webkit-scrollbar-thumb{background-color:#c1c1c1;border-radius:10px}#g-ai-robat .talk_main .qa_body li[data-v-4a2c5a81]{display:flex;margin-bottom:24px;justify-content:flex-end}#g-ai-robat .talk_main .qa_body li .is_icon[data-v-4a2c5a81]{width:30px;height:30px;border-radius:50%;color:#fff;display:flex}#g-ai-robat .talk_main .qa_body li .is_icon i[data-v-4a2c5a81]{margin:auto}#g-ai-robat .talk_main .qa_body li.is_ai[data-v-4a2c5a81]{justify-content:flex-start}#g-ai-robat .talk_main .qa_body li.is_ai .text_main[data-v-4a2c5a81]{box-shadow:0 4px 20px 0 #0476ed29;border:1px solid;border-image-source:linear-gradient(180deg,#fff,hsla(0,0%,100%,.5) 104.31%);background:linear-gradient(92.03deg,rgba(119,241,255,.222) -2.18%,rgba(237,250,255,.6) 48.06%,rgba(91,168,255,.174) 107.05%)}#g-ai-robat .talk_main .qa_body li.is_ai .text_main>.value[data-v-4a2c5a81]{white-space:pre-wrap}#g-ai-robat .talk_main .qa_body li .text_main[data-v-4a2c5a81]{padding:10px;max-width:calc(100% - 100px);border:1px solid;margin:0 8px;border-image-source:linear-gradient(90deg,#fff,hsla(0,0%,100%,.5));box-shadow:0 4px 20px 0 #0476ed29;background:linear-gradient(90.81deg,rgba(244,252,255,.6) 1.75%,hsla(0,0%,100%,.6) 32.33%,rgba(238,246,255,.6) 102.86%);border-radius:6px}#g-ai-robat .talk_main .qa_body li .text_main>.value[data-v-4a2c5a81]{display:flex;align-items:center;overflow-wrap:break-word;word-wrap:break-word;font-size:14px;font-weight:400}#g-ai-robat .talk_main .qa_body li .text_main .btn i[data-v-4a2c5a81]{font-size:14px;font-weight:400;color:#037aff;margin-right:10px;cursor:pointer;text-decoration:underline}#g-ai-robat .talk_main .qa_body li .text_main .btn i.open[data-v-4a2c5a81]{filter:hue-rotate(180deg);animation:opacityCss 2s linear infinite}#g-ai-robat .talk_main .qa_input[data-v-4a2c5a81]{padding:10px 16px;display:flex;align-items:center;justify-content:space-between;position:absolute;bottom:0;left:0;right:0;box-sizing:border-box}#g-ai-robat .talk_main .qa_input textarea[data-v-4a2c5a81]{width:100%;height:68px;resize:none;background-color:#fff;border:1px solid #dcdfe6;color:#606266;padding:6px}#g-ai-robat .talk_main .qa_input textarea[data-v-4a2c5a81]:focus{outline:none;border-color:#409eff}#g-ai-robat .talk_main .qa_input .is_icon[data-v-4a2c5a81]{width:30px}#g-ai-robat .talk_main .qa_input .is_icon p[data-v-4a2c5a81]{display:flex;align-items:center;justify-content:flex-end;margin:6px 0}#g-ai-robat .talk_main .qa_input .is_icon p[data-v-4a2c5a81]:first-of-type{position:relative}#g-ai-robat .talk_main .qa_input .is_icon p:first-of-type #playChart[data-v-4a2c5a81]{bottom:30px;position:absolute;visibility:hidden}#g-ai-robat .talk_main .qa_input .is_icon p:first-of-type #playChart.show[data-v-4a2c5a81]{visibility:visible}#g-ai-robat .talk_main .qa_input .is_icon p:first-of-type #playChart.hiddle[data-v-4a2c5a81]{visibility:hidden}#g-ai-robat .talk_main .qa_input .is_icon p i[data-v-4a2c5a81]{animation:rotateCss-4a2c5a81 2s linear infinite;font-size:20px;color:#606266}#g-ai-robat .talk_main .qa_input .is_icon p img[data-v-4a2c5a81]{width:20px;height:20px;cursor:pointer}#g-ai-robat .talk_main .qa_input .is_icon p img.close[data-v-4a2c5a81]{filter:hue-rotate(180deg);animation:opacityCss 2s linear infinite}#g-ai-robat .talk_main .qa_input .is_icon p.send img.disabled[data-v-4a2c5a81]{cursor:not-allowed}#g-ai-robat .talk_main .qa_input .is_icon p i[data-v-4a2c5a81]{cursor:pointer}@keyframes rotateCss-4a2c5a81{0%{transform:rotate(0deg)}25%{transform:rotate(90deg)}50%{transform:rotate(180deg)}70%{transform:rotate(270deg)}to{transform:rotate(1turn)}}@font-face{font-family:iconfont;src:url(//at.alicdn.com/t/c/font_4633255_xm549qw7rxj.woff2?t=1721900327001) format("woff2"),url(//at.alicdn.com/t/c/font_4633255_xm549qw7rxj.woff?t=1721900327001) format("woff"),url(//at.alicdn.com/t/c/font_4633255_xm549qw7rxj.ttf?t=1721900327001) format("truetype")}.iconfont[data-v-4a2c5a81]{font-family:iconfont!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-guanbi[data-v-4a2c5a81]:before{content:"\e609"}.icon-nvsheng[data-v-4a2c5a81]:before{content:"\e603"}.icon-nansheng[data-v-4a2c5a81]:before{content:"\e604"}.icon-fuzhi[data-v-4a2c5a81]:before{content:"\e626"}.icon-zhongxinhuida[data-v-4a2c5a81]:before{content:"\e63b"}
1
+ .ellipsisText{display:inline-block;width:20px;height:24px;position:relative}.ellipsisText:after{position:absolute;left:0;top:4px;content:"···";animation:loading-animation 1s linear infinite}@keyframes loading-animation{0%{content:"·"}50%{content:"··"}to{content:"···"}}#g-ai-robat[data-v-207339b4]{position:fixed}#g-ai-robat .robot[data-v-207339b4]{cursor:pointer}#g-ai-robat .robot.disabled[data-v-207339b4]{cursor:not-allowed}#g-ai-robat .robot img[data-v-207339b4]{height:100px;width:100px}#g-ai-robat .talk_main[data-v-207339b4]{position:absolute;width:400px;height:600px;background:#f5f6f7}#g-ai-robat .talk_main.top[data-v-207339b4]{left:50%;bottom:100px;transform:translateX(-50%)}#g-ai-robat .talk_main.bottom[data-v-207339b4]{left:50%;top:100px;transform:translateX(-50%)}#g-ai-robat .talk_main.right[data-v-207339b4]{left:100px;bottom:50%;transform:translateY(50%)}#g-ai-robat .talk_main.left[data-v-207339b4]{right:100px;bottom:50%;transform:translateY(50%)}#g-ai-robat .talk_main.top-end[data-v-207339b4]{left:100px;bottom:100px}#g-ai-robat .talk_main.top-start[data-v-207339b4]{right:100px;bottom:100px}#g-ai-robat .talk_main.bottom-start[data-v-207339b4]{right:100px;top:100px}#g-ai-robat .talk_main.bottom-end[data-v-207339b4]{left:100px;top:100px}#g-ai-robat .talk_main header[data-v-207339b4]{height:44px;background:linear-gradient(90deg,#ebf1ff,#e5faf8,#f2ebfe);display:flex;padding:0 16px;align-items:center;justify-content:space-between;cursor:move}#g-ai-robat .talk_main header span[data-v-207339b4]{font-size:16px;font-weight:700}#g-ai-robat .talk_main header span.close[data-v-207339b4]{color:#999}#g-ai-robat .talk_main header i[data-v-207339b4]{cursor:pointer}#g-ai-robat .talk_main header i.disabled[data-v-207339b4]{cursor:not-allowed}#g-ai-robat .talk_main .qa_body[data-v-207339b4]{list-style:none;padding:16px;box-sizing:border-box;margin:0;height:calc(100% - 116px);overflow-y:auto}#g-ai-robat .talk_main .qa_body[data-v-207339b4]::-webkit-scrollbar{width:8px;background-color:#f9f9f9}#g-ai-robat .talk_main .qa_body[data-v-207339b4]::-webkit-scrollbar-track{background:#e1e1e1;border-radius:10px}#g-ai-robat .talk_main .qa_body[data-v-207339b4]::-webkit-scrollbar-thumb{background-color:#c1c1c1;border-radius:10px}#g-ai-robat .talk_main .qa_body li[data-v-207339b4]{display:flex;margin-bottom:24px;justify-content:flex-end}#g-ai-robat .talk_main .qa_body li .is_icon[data-v-207339b4]{width:30px;height:30px;border-radius:50%;color:#fff;display:flex}#g-ai-robat .talk_main .qa_body li .is_icon i[data-v-207339b4]{margin:auto}#g-ai-robat .talk_main .qa_body li.is_ai[data-v-207339b4]{justify-content:flex-start}#g-ai-robat .talk_main .qa_body li.is_ai .text_main[data-v-207339b4]{box-shadow:0 4px 20px 0 #0476ed29;border:1px solid;border-image-source:linear-gradient(180deg,#fff,hsla(0,0%,100%,.5) 104.31%);background:linear-gradient(92.03deg,rgba(119,241,255,.222) -2.18%,rgba(237,250,255,.6) 48.06%,rgba(91,168,255,.174) 107.05%)}#g-ai-robat .talk_main .qa_body li.is_ai .text_main>.value[data-v-207339b4]{white-space:pre-wrap}#g-ai-robat .talk_main .qa_body li .text_main[data-v-207339b4]{padding:10px;max-width:calc(100% - 100px);border:1px solid;margin:0 8px;border-image-source:linear-gradient(90deg,#fff,hsla(0,0%,100%,.5));box-shadow:0 4px 20px 0 #0476ed29;background:linear-gradient(90.81deg,rgba(244,252,255,.6) 1.75%,hsla(0,0%,100%,.6) 32.33%,rgba(238,246,255,.6) 102.86%);border-radius:6px}#g-ai-robat .talk_main .qa_body li .text_main>.value[data-v-207339b4]{display:flex;align-items:center;overflow-wrap:break-word;word-wrap:break-word;font-size:14px;font-weight:400}#g-ai-robat .talk_main .qa_body li .text_main .btn i[data-v-207339b4]{font-size:14px;font-weight:400;color:#037aff;margin-right:10px;cursor:pointer;text-decoration:underline}#g-ai-robat .talk_main .qa_body li .text_main .btn i.open[data-v-207339b4]{filter:hue-rotate(180deg);animation:opacityCss 2s linear infinite}#g-ai-robat .talk_main .qa_input[data-v-207339b4]{padding:10px 16px;display:flex;align-items:center;justify-content:space-between;position:absolute;bottom:0;left:0;right:0;box-sizing:border-box}#g-ai-robat .talk_main .qa_input textarea[data-v-207339b4]{width:100%;height:68px;resize:none;background-color:#fff;border:1px solid #dcdfe6;color:#606266;padding:6px}#g-ai-robat .talk_main .qa_input textarea[data-v-207339b4]:focus{outline:none;border-color:#409eff}#g-ai-robat .talk_main .qa_input .is_icon[data-v-207339b4]{width:30px}#g-ai-robat .talk_main .qa_input .is_icon p[data-v-207339b4]{display:flex;align-items:center;justify-content:flex-end;margin:6px 0}#g-ai-robat .talk_main .qa_input .is_icon p[data-v-207339b4]:first-of-type{position:relative}#g-ai-robat .talk_main .qa_input .is_icon p:first-of-type #playChart[data-v-207339b4]{bottom:30px;position:absolute;visibility:hidden}#g-ai-robat .talk_main .qa_input .is_icon p:first-of-type #playChart.show[data-v-207339b4]{visibility:visible}#g-ai-robat .talk_main .qa_input .is_icon p:first-of-type #playChart.hiddle[data-v-207339b4]{visibility:hidden}#g-ai-robat .talk_main .qa_input .is_icon p i[data-v-207339b4]{animation:rotateCss-207339b4 2s linear infinite;font-size:20px;color:#606266}#g-ai-robat .talk_main .qa_input .is_icon p img[data-v-207339b4]{width:20px;height:20px;cursor:pointer}#g-ai-robat .talk_main .qa_input .is_icon p img.close[data-v-207339b4]{filter:hue-rotate(180deg);animation:opacityCss 2s linear infinite}#g-ai-robat .talk_main .qa_input .is_icon p.send img.disabled[data-v-207339b4]{cursor:not-allowed}#g-ai-robat .talk_main .qa_input .is_icon p i[data-v-207339b4]{cursor:pointer}@keyframes rotateCss-207339b4{0%{transform:rotate(0deg)}25%{transform:rotate(90deg)}50%{transform:rotate(180deg)}70%{transform:rotate(270deg)}to{transform:rotate(1turn)}}@font-face{font-family:iconfont;src:url(//at.alicdn.com/t/c/font_4633255_xm549qw7rxj.woff2?t=1721900327001) format("woff2"),url(//at.alicdn.com/t/c/font_4633255_xm549qw7rxj.woff?t=1721900327001) format("woff"),url(//at.alicdn.com/t/c/font_4633255_xm549qw7rxj.ttf?t=1721900327001) format("truetype")}.iconfont[data-v-207339b4]{font-family:iconfont!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-guanbi[data-v-207339b4]:before{content:"\e609"}.icon-nvsheng[data-v-207339b4]:before{content:"\e603"}.icon-nansheng[data-v-207339b4]:before{content:"\e604"}.icon-fuzhi[data-v-207339b4]:before{content:"\e626"}.icon-zhongxinhuida[data-v-207339b4]:before{content:"\e63b"}
@@ -31235,7 +31235,7 @@ function segment(word, options) {
31235
31235
 
31236
31236
 
31237
31237
 
31238
- const _withScopeId = n => (_pushScopeId("data-v-4a2c5a81"), n = n(), _popScopeId(), n);
31238
+ const _withScopeId = n => (_pushScopeId("data-v-207339b4"), n = n(), _popScopeId(), n);
31239
31239
  const _hoisted_1 = ["src"];
31240
31240
  const _hoisted_2 = {
31241
31241
  key: 0,
@@ -31459,7 +31459,7 @@ const _hoisted_19 = ["src"];
31459
31459
  iAmHere();
31460
31460
  window.setTimeout(() => {
31461
31461
  setRecording();
31462
- }, 3000);
31462
+ }, 2000);
31463
31463
  }
31464
31464
  };
31465
31465
  const throttle = (func, wait) => {
@@ -31511,79 +31511,80 @@ const _hoisted_19 = ["src"];
31511
31511
 
31512
31512
  // 唤醒后的录音
31513
31513
  const setRecording = () => {
31514
- state.recorder.stop();
31515
- state.recorder.start();
31516
- window.setTimeout(() => {
31517
- let wavBlob = state.recorder.getWAVBlob();
31518
- let newbolb = new Blob([wavBlob], {
31519
- type: "audio/wav"
31520
- });
31521
- //获取当时时间戳作为文件名
31522
- let fileOfBlob = new File([newbolb], new Date().getTime() + ".wav");
31523
-
31524
- // 本地播放录音文件流
31525
- let sound = new Audio();
31526
- let src = URL.createObjectURL(fileOfBlob);
31527
- sound.src = src;
31528
- sound.play();
31529
- state.recorder.stop();
31530
- state.recorderCode = 0;
31531
- let formData = new FormData();
31532
- formData.append("modelName", "medium");
31533
- formData.append("audio", fileOfBlob);
31534
- uploadWavFile(formData).then(result => {
31535
- let res = result.data;
31536
- if (res.code == 200) {
31537
- let {
31538
- answer: audioToText
31539
- } = res.detail.content;
31540
- let text = audioToText;
31541
-
31542
- // let text = "回到2023年7月22日时刻";
31543
-
31544
- // 拿到的语音进行问答
31545
- let option = {
31546
- searchText: text,
31547
- use_tts: "True",
31548
- coze_info: props.cozeInfo || {}
31549
- };
31550
- searchText(option).then(q => {
31551
- let data = q.data;
31552
- if (data && data.code == 200) {
31553
- // 检索场景
31554
- // matching(text, data.detail[0]);
31555
-
31556
- // 讲回答后的内容返回给业务系统
31557
- if (props.searchTextCallback) {
31558
- props.searchTextCallback(data.detail[0]);
31559
- }
31560
- let {
31561
- ttsMaleAddress
31562
- } = data.detail[0];
31563
- // 播放回答内容和进行小G动作
31564
- if (ttsMaleAddress) {
31565
- playAudio(ttsMaleAddress, "sys");
31514
+ // state.recorder.stop();
31515
+ state.recorder.start().then(() => {
31516
+ window.setTimeout(() => {
31517
+ let wavBlob = state.recorder.getWAVBlob();
31518
+ let newbolb = new Blob([wavBlob], {
31519
+ type: "audio/wav"
31520
+ });
31521
+ //获取当时时间戳作为文件名
31522
+ let fileOfBlob = new File([newbolb], new Date().getTime() + ".wav");
31523
+
31524
+ // 本地播放录音文件流
31525
+ let sound = new Audio();
31526
+ let src = URL.createObjectURL(fileOfBlob);
31527
+ sound.src = src;
31528
+ sound.play();
31529
+ state.recorder.stop();
31530
+ state.recorderCode = 0;
31531
+ let formData = new FormData();
31532
+ formData.append("modelName", "medium");
31533
+ formData.append("audio", fileOfBlob);
31534
+ uploadWavFile(formData).then(result => {
31535
+ let res = result.data;
31536
+ if (res.code == 200) {
31537
+ let {
31538
+ answer: audioToText
31539
+ } = res.detail.content;
31540
+ let text = audioToText;
31541
+
31542
+ // let text = "回到2023年7月22日时刻";
31543
+
31544
+ // 拿到的语音进行问答
31545
+ let option = {
31546
+ searchText: text,
31547
+ use_tts: "True",
31548
+ coze_info: props.cozeInfo || {}
31549
+ };
31550
+ searchText(option).then(q => {
31551
+ let data = q.data;
31552
+ if (data && data.code == 200) {
31553
+ // 检索场景
31554
+ // matching(text, data.detail[0]);
31555
+
31556
+ // 讲回答后的内容返回给业务系统
31557
+ if (props.searchTextCallback) {
31558
+ props.searchTextCallback(data.detail[0]);
31559
+ }
31560
+ let {
31561
+ ttsMaleAddress
31562
+ } = data.detail[0];
31563
+ // 播放回答内容和进行小G动作
31564
+ if (ttsMaleAddress) {
31565
+ playAudio(ttsMaleAddress, "sys");
31566
+ }
31567
+ // if (state.findMatch && state.findMatch.fun) {
31568
+ // if (state.findMatch.trigger == "together") {
31569
+ // state.findMatch.fun({
31570
+ // ...data.detail[0],
31571
+ // });
31572
+ // }
31573
+ // }
31566
31574
  }
31567
- // if (state.findMatch && state.findMatch.fun) {
31568
- // if (state.findMatch.trigger == "together") {
31569
- // state.findMatch.fun({
31570
- // ...data.detail[0],
31571
- // });
31572
- // }
31573
- // }
31574
- }
31575
- }).catch(err => {
31576
- console.error("问答错误");
31577
- console.error(err);
31578
- });
31579
- }
31580
- }).catch(err => {
31581
- console.error("语音识别错误");
31582
- console.error(err);
31583
- });
31575
+ }).catch(err => {
31576
+ console.error("问答错误");
31577
+ console.error(err);
31578
+ });
31579
+ }
31580
+ }).catch(err => {
31581
+ console.error("语音识别错误");
31582
+ console.error(err);
31583
+ });
31584
31584
 
31585
- // recognition.start();
31586
- }, 5 * 1000);
31585
+ // recognition.start();
31586
+ }, 5 * 1000);
31587
+ });
31587
31588
  };
31588
31589
  const sendRecorder = () => {
31589
31590
  let wavBlob = state.recorder.getWAVBlob();
@@ -32038,15 +32039,15 @@ const _hoisted_19 = ["src"];
32038
32039
  });
32039
32040
  ;// CONCATENATED MODULE: ./src/package/src/main.vue?vue&type=script&setup=true&lang=js
32040
32041
 
32041
- ;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-54.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-54.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-54.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/package/src/main.vue?vue&type=style&index=0&id=4a2c5a81&lang=css
32042
+ ;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-54.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-54.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-54.use[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/package/src/main.vue?vue&type=style&index=0&id=207339b4&lang=css
32042
32043
  // extracted by mini-css-extract-plugin
32043
32044
 
32044
- ;// CONCATENATED MODULE: ./src/package/src/main.vue?vue&type=style&index=0&id=4a2c5a81&lang=css
32045
+ ;// CONCATENATED MODULE: ./src/package/src/main.vue?vue&type=style&index=0&id=207339b4&lang=css
32045
32046
 
32046
- ;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-74.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-74.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-74.use[2]!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-74.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/package/src/main.vue?vue&type=style&index=1&id=4a2c5a81&lang=less&scoped=true
32047
+ ;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-74.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-74.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-74.use[2]!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-74.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/package/src/main.vue?vue&type=style&index=1&id=207339b4&lang=less&scoped=true
32047
32048
  // extracted by mini-css-extract-plugin
32048
32049
 
32049
- ;// CONCATENATED MODULE: ./src/package/src/main.vue?vue&type=style&index=1&id=4a2c5a81&lang=less&scoped=true
32050
+ ;// CONCATENATED MODULE: ./src/package/src/main.vue?vue&type=style&index=1&id=207339b4&lang=less&scoped=true
32050
32051
 
32051
32052
  // EXTERNAL MODULE: ./node_modules/vue-loader/dist/exportHelper.js
32052
32053
  var exportHelper = __webpack_require__(6262);
@@ -32058,7 +32059,7 @@ var exportHelper = __webpack_require__(6262);
32058
32059
 
32059
32060
 
32060
32061
 
32061
- const __exports__ = /*#__PURE__*/(0,exportHelper/* default */.A)(mainvue_type_script_setup_true_lang_js, [['__scopeId',"data-v-4a2c5a81"]])
32062
+ const __exports__ = /*#__PURE__*/(0,exportHelper/* default */.A)(mainvue_type_script_setup_true_lang_js, [['__scopeId',"data-v-207339b4"]])
32062
32063
 
32063
32064
  /* harmony default export */ var main = (__exports__);
32064
32065
  ;// CONCATENATED MODULE: ./src/package/index.js