@siact/sime-x-vue 0.0.9 → 0.0.10

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.
@@ -49,6 +49,8 @@
49
49
  });
50
50
  const stopListeningRef = vue.shallowRef(async () => {
51
51
  });
52
+ const stopBroadcastRef = vue.shallowRef(async () => {
53
+ });
52
54
  const toggleCollapseRef = vue.shallowRef(async () => {
53
55
  });
54
56
  const openDialogRef = vue.shallowRef(async () => {
@@ -62,12 +64,14 @@
62
64
  voiceConfig: () => props.voiceConfig || { appId: "", apiKey: "", websocketUrl: "" },
63
65
  startListening: () => startListeningRef.value(),
64
66
  stopListening: () => stopListeningRef.value(),
67
+ stopBroadcast: () => stopBroadcastRef.value(),
65
68
  toggleCollapse: () => toggleCollapseRef.value(),
66
69
  openDialog: () => openDialogRef.value(),
67
70
  closeDialog: () => closeDialogRef.value(),
68
71
  registerVoiceMethods: (methods) => {
69
72
  startListeningRef.value = methods.start;
70
73
  stopListeningRef.value = methods.stop;
74
+ if (methods.stopBroadcast) stopBroadcastRef.value = methods.stopBroadcast;
71
75
  toggleCollapseRef.value = methods.toggleCollapse;
72
76
  openDialogRef.value = methods.openDialog;
73
77
  closeDialogRef.value = methods.closeDialog;
@@ -1035,9 +1039,9 @@
1035
1039
  apiSecret: vc.apiSecret,
1036
1040
  websocketUrl: vc.ttsWebsocketUrl || "wss://tts-api.xfyun.cn/v2/tts",
1037
1041
  vcn: vc.ttsVcn || "xiaoyan",
1038
- speed: 60,
1039
- volume: 50,
1040
- pitch: 50,
1042
+ speed: vc.speed || 55,
1043
+ volume: vc.volume || 90,
1044
+ pitch: vc.pitch || 50,
1041
1045
  aue: "raw",
1042
1046
  auf: "audio/L16;rate=16000",
1043
1047
  tte: "UTF8",
@@ -2091,6 +2095,7 @@
2091
2095
  aiChatbotX?.registerVoiceMethods({
2092
2096
  start: () => toggleVoiceMode(true),
2093
2097
  stop: () => toggleVoiceMode(false),
2098
+ stopBroadcast: async () => interruptCurrentResponse(),
2094
2099
  openDialog: async () => Promise.resolve(),
2095
2100
  closeDialog: async () => Promise.resolve(),
2096
2101
  toggleCollapse: async () => Promise.resolve()
@@ -2232,7 +2237,7 @@
2232
2237
  }
2233
2238
  });
2234
2239
 
2235
- const voiceAssistant = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d81f42d8"]]);
2240
+ const voiceAssistant = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-77c6ae95"]]);
2236
2241
 
2237
2242
  exports.AiChatbotProvider = _sfc_main$4;
2238
2243
  exports.AiChatbotVoiceAssistant = voiceAssistant;