@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.
- package/dist/sime-x-vue.mjs +9 -4
- package/dist/sime-x-vue.mjs.map +1 -1
- package/dist/sime-x-vue.umd.js +9 -4
- package/dist/sime-x-vue.umd.js.map +1 -1
- package/dist/style.css +60 -60
- package/package.json +1 -1
- package/types/types.d.ts +9 -0
package/dist/sime-x-vue.mjs
CHANGED
|
@@ -47,6 +47,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
47
47
|
});
|
|
48
48
|
const stopListeningRef = shallowRef(async () => {
|
|
49
49
|
});
|
|
50
|
+
const stopBroadcastRef = shallowRef(async () => {
|
|
51
|
+
});
|
|
50
52
|
const toggleCollapseRef = shallowRef(async () => {
|
|
51
53
|
});
|
|
52
54
|
const openDialogRef = shallowRef(async () => {
|
|
@@ -60,12 +62,14 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
60
62
|
voiceConfig: () => props.voiceConfig || { appId: "", apiKey: "", websocketUrl: "" },
|
|
61
63
|
startListening: () => startListeningRef.value(),
|
|
62
64
|
stopListening: () => stopListeningRef.value(),
|
|
65
|
+
stopBroadcast: () => stopBroadcastRef.value(),
|
|
63
66
|
toggleCollapse: () => toggleCollapseRef.value(),
|
|
64
67
|
openDialog: () => openDialogRef.value(),
|
|
65
68
|
closeDialog: () => closeDialogRef.value(),
|
|
66
69
|
registerVoiceMethods: (methods) => {
|
|
67
70
|
startListeningRef.value = methods.start;
|
|
68
71
|
stopListeningRef.value = methods.stop;
|
|
72
|
+
if (methods.stopBroadcast) stopBroadcastRef.value = methods.stopBroadcast;
|
|
69
73
|
toggleCollapseRef.value = methods.toggleCollapse;
|
|
70
74
|
openDialogRef.value = methods.openDialog;
|
|
71
75
|
closeDialogRef.value = methods.closeDialog;
|
|
@@ -1033,9 +1037,9 @@ function useTTS(getVoiceConfig) {
|
|
|
1033
1037
|
apiSecret: vc.apiSecret,
|
|
1034
1038
|
websocketUrl: vc.ttsWebsocketUrl || "wss://tts-api.xfyun.cn/v2/tts",
|
|
1035
1039
|
vcn: vc.ttsVcn || "xiaoyan",
|
|
1036
|
-
speed:
|
|
1037
|
-
volume:
|
|
1038
|
-
pitch: 50,
|
|
1040
|
+
speed: vc.speed || 55,
|
|
1041
|
+
volume: vc.volume || 90,
|
|
1042
|
+
pitch: vc.pitch || 50,
|
|
1039
1043
|
aue: "raw",
|
|
1040
1044
|
auf: "audio/L16;rate=16000",
|
|
1041
1045
|
tte: "UTF8",
|
|
@@ -2089,6 +2093,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2089
2093
|
aiChatbotX?.registerVoiceMethods({
|
|
2090
2094
|
start: () => toggleVoiceMode(true),
|
|
2091
2095
|
stop: () => toggleVoiceMode(false),
|
|
2096
|
+
stopBroadcast: async () => interruptCurrentResponse(),
|
|
2092
2097
|
openDialog: async () => Promise.resolve(),
|
|
2093
2098
|
closeDialog: async () => Promise.resolve(),
|
|
2094
2099
|
toggleCollapse: async () => Promise.resolve()
|
|
@@ -2230,7 +2235,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2230
2235
|
}
|
|
2231
2236
|
});
|
|
2232
2237
|
|
|
2233
|
-
const voiceAssistant = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
2238
|
+
const voiceAssistant = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-77c6ae95"]]);
|
|
2234
2239
|
|
|
2235
2240
|
export { _sfc_main$4 as AiChatbotProvider, voiceAssistant as AiChatbotVoiceAssistant, simeX as AiChatbotX, AiChatbotXKey, clientCommandKey, injectStrict };
|
|
2236
2241
|
//# sourceMappingURL=sime-x-vue.mjs.map
|