g-ai-robot3 0.1.42 → 0.1.44
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/common/WsConnecter.d.ts +25 -0
- package/dist/g-ai-robot3.es.js +27409 -0
- package/dist/g-ai-robot3.umd.js +8 -0
- package/dist/hook/useOrderPlayAudio.d.ts +4 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.vue.d.ts +131 -0
- package/dist/type.d.ts +35 -0
- package/dist/utils/index.d.ts +10 -0
- package/dist/utils/log.data.d.ts +4 -0
- package/package.json +1 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright FunASR (https://github.com/alibaba-damo-academy/FunASR). All Rights
|
|
3
|
+
* Reserved. MIT License (https://opensource.org/licenses/MIT)
|
|
4
|
+
*/
|
|
5
|
+
type Mode = '2pass' | 'offline';
|
|
6
|
+
export default class WebSocketConnectMethod {
|
|
7
|
+
private speechSokt;
|
|
8
|
+
private msgHandle;
|
|
9
|
+
private stateHandle;
|
|
10
|
+
private url;
|
|
11
|
+
private mode;
|
|
12
|
+
constructor(config: {
|
|
13
|
+
msgHandle: (jsonMsg: any) => void;
|
|
14
|
+
stateHandle: (connState: (0 | 1 | 2)) => void;
|
|
15
|
+
url?: string;
|
|
16
|
+
});
|
|
17
|
+
wsStart(modeStr?: Mode): 0 | 1;
|
|
18
|
+
wsStop(): void;
|
|
19
|
+
wsSend(data: any): void;
|
|
20
|
+
onOpen(): void;
|
|
21
|
+
onClose(e: any): void;
|
|
22
|
+
onMessage(e: any): void;
|
|
23
|
+
onError(e: any): void;
|
|
24
|
+
}
|
|
25
|
+
export {};
|