ibi-ai-talk 1.0.0
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/README.md +24 -0
- package/dist/demo.html +5 -0
- package/dist/index.common.js +2653 -0
- package/dist/index.common.js.map +1 -0
- package/dist/index.umd.js +2665 -0
- package/dist/index.umd.js.map +1 -0
- package/dist/index.umd.min.js +2 -0
- package/dist/index.umd.min.js.map +1 -0
- package/index.js +8 -0
- package/package.json +18 -0
- package/src/index.vue +57 -0
- package/src/utils/blocking-queue.js +98 -0
- package/src/utils/controller.js +34 -0
- package/src/utils/manager.js +39 -0
- package/src/utils/opus-codec.js +169 -0
- package/src/utils/ota-connector.js +115 -0
- package/src/utils/player.js +262 -0
- package/src/utils/recorder.js +420 -0
- package/src/utils/stream-context.js +184 -0
- package/src/utils/tools.js +517 -0
- package/src/utils/websocket.js +565 -0
package/README.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
语音交互参数
|
|
2
|
+
listenMode: 监听模式,可选值为"manual"(本地监听)和"realtime"(远程监听),默认值为"wakeup(唤醒词对话)"。
|
|
3
|
+
otaUrl: 语音服务器URL"。
|
|
4
|
+
macAddress: 设备MAC地址,默认值为"00:00:00:00:00:00"。
|
|
5
|
+
default-mcp-tools.json: 设备默认参数配置文件"。
|
|
6
|
+
<script src="/libopus.js"></script> 在html页面中引入opus编码器库
|
|
7
|
+
<!-- 组件中使用 -->
|
|
8
|
+
<template>
|
|
9
|
+
<ibiAiTalk :listenMode="listenMode" :otaUrl="otaUrl" :macAddress="macAddress" />
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script>
|
|
13
|
+
import ibiAiTalk from 'ibi-ai-talk'
|
|
14
|
+
export default {
|
|
15
|
+
components: { ibiAiTalk },
|
|
16
|
+
data() {
|
|
17
|
+
return {
|
|
18
|
+
listenMode: "wakeup", // 对话模式
|
|
19
|
+
otaUrl: "", // 语音服务器URL
|
|
20
|
+
macAddress: "", // 设备MAC地址
|
|
21
|
+
};
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
</script>
|
package/dist/demo.html
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<!doctype html><meta charset="utf-8"><title>index demo</title><script src="//unpkg.com/vue@2"></script><script src="./index.umd.js"></script><link rel="stylesheet" href="./index.css"><div id="app"><demo></demo></div><script>new Vue({
|
|
2
|
+
components: {
|
|
3
|
+
demo: index
|
|
4
|
+
}
|
|
5
|
+
}).$mount('#app')</script>
|