@ccos/ccsdk-lite 1.0.23 → 1.0.25
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/lib/bundle.js +27 -0
- package/lib/index.d.ts +5 -0
- package/lib/system/index.d.ts +2 -0
- package/lib/voice/index.d.ts +8 -0
- package/package.json +1 -1
package/lib/bundle.js
CHANGED
|
@@ -492,6 +492,10 @@ function getDisplayInfo() {
|
|
|
492
492
|
function getProperty(key) {
|
|
493
493
|
return callNative(getFuncName$7('getProperty'), { propName: key });
|
|
494
494
|
}
|
|
495
|
+
// 设置 android property 的值
|
|
496
|
+
function setProperty(key, value) {
|
|
497
|
+
return callNative(getFuncName$7('setProperty'), { propName: key, propValue: value });
|
|
498
|
+
}
|
|
495
499
|
// 检查 JS-API 是否已经实现
|
|
496
500
|
function checkApi(apiName) {
|
|
497
501
|
return callNative(getFuncName$7('checkApi'), { apiName: apiName });
|
|
@@ -538,6 +542,7 @@ var system = {
|
|
|
538
542
|
getDeviceInfo: getDeviceInfo,
|
|
539
543
|
getDisplayInfo: getDisplayInfo,
|
|
540
544
|
getProperty: getProperty,
|
|
545
|
+
setProperty: setProperty,
|
|
541
546
|
checkApi: checkApi,
|
|
542
547
|
getFontPath: getFontPath,
|
|
543
548
|
setKeepScreenOn: setKeepScreenOn,
|
|
@@ -1136,6 +1141,19 @@ function enableDirective(enable) {
|
|
|
1136
1141
|
if (enable === void 0) { enable = true; }
|
|
1137
1142
|
return callNative(getFuncName$1('enableDirective'), { enable: enable });
|
|
1138
1143
|
}
|
|
1144
|
+
// 开启意图识别指令返回
|
|
1145
|
+
function setDirective(enable) {
|
|
1146
|
+
if (enable === void 0) { enable = true; }
|
|
1147
|
+
return callNative(getFuncName$1('setDirective'), { enable: enable });
|
|
1148
|
+
}
|
|
1149
|
+
// 开启录音功能
|
|
1150
|
+
function enableRecording() {
|
|
1151
|
+
return callNative(getFuncName$1('enableRecording'), {});
|
|
1152
|
+
}
|
|
1153
|
+
// 关闭录音功能
|
|
1154
|
+
function disableRecording() {
|
|
1155
|
+
return callNative(getFuncName$1('disableRecording'), {});
|
|
1156
|
+
}
|
|
1139
1157
|
// 停止TTS播报
|
|
1140
1158
|
//
|
|
1141
1159
|
function stopTts$1() {
|
|
@@ -1157,15 +1175,24 @@ function setTtsSpeaker(speaker) {
|
|
|
1157
1175
|
function sendVoiceTextToAI(text) {
|
|
1158
1176
|
return callNative(getFuncName$1('sendVoiceTextToAI'), { text: text });
|
|
1159
1177
|
}
|
|
1178
|
+
// 开启意图识别指令返回
|
|
1179
|
+
function setA2UI(enable) {
|
|
1180
|
+
if (enable === void 0) { enable = true; }
|
|
1181
|
+
return callNative(getFuncName$1('setA2UI'), { enable: enable });
|
|
1182
|
+
}
|
|
1160
1183
|
var voice = {
|
|
1161
1184
|
enableVoiceInput: enableVoiceInput,
|
|
1162
1185
|
disableVoiceInput: disableVoiceInput,
|
|
1163
1186
|
enableDirective: enableDirective,
|
|
1187
|
+
setDirective: setDirective,
|
|
1188
|
+
enableRecording: enableRecording,
|
|
1189
|
+
disableRecording: disableRecording,
|
|
1164
1190
|
stopTts: stopTts$1,
|
|
1165
1191
|
sendTts: sendTts$1,
|
|
1166
1192
|
sendStreamTts: sendStreamTts$1,
|
|
1167
1193
|
setTtsSpeaker: setTtsSpeaker,
|
|
1168
1194
|
sendVoiceTextToAI: sendVoiceTextToAI,
|
|
1195
|
+
setA2UI: setA2UI,
|
|
1169
1196
|
};
|
|
1170
1197
|
|
|
1171
1198
|
// 添加事件监听
|
package/lib/index.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ declare const _default: {
|
|
|
32
32
|
getDeviceInfo: typeof import("./system").getDeviceInfo;
|
|
33
33
|
getDisplayInfo: typeof import("./system").getDisplayInfo;
|
|
34
34
|
getProperty: typeof import("./system").getProperty;
|
|
35
|
+
setProperty: typeof import("./system").setProperty;
|
|
35
36
|
checkApi: typeof import("./system").checkApi;
|
|
36
37
|
getFontPath: typeof import("./system").getFontPath;
|
|
37
38
|
setKeepScreenOn: typeof import("./system").setKeepScreenOn;
|
|
@@ -101,11 +102,15 @@ declare const _default: {
|
|
|
101
102
|
enableVoiceInput: typeof import("./voice").enableVoiceInput;
|
|
102
103
|
disableVoiceInput: typeof import("./voice").disableVoiceInput;
|
|
103
104
|
enableDirective: typeof import("./voice").enableDirective;
|
|
105
|
+
setDirective: typeof import("./voice").setDirective;
|
|
106
|
+
enableRecording: typeof import("./voice").enableRecording;
|
|
107
|
+
disableRecording: typeof import("./voice").disableRecording;
|
|
104
108
|
stopTts: typeof import("./voice").stopTts;
|
|
105
109
|
sendTts: typeof import("./voice").sendTts;
|
|
106
110
|
sendStreamTts: typeof import("./voice").sendStreamTts;
|
|
107
111
|
setTtsSpeaker: typeof import("./voice").setTtsSpeaker;
|
|
108
112
|
sendVoiceTextToAI: typeof import("./voice").sendVoiceTextToAI;
|
|
113
|
+
setA2UI: typeof import("./voice").setA2UI;
|
|
109
114
|
};
|
|
110
115
|
event: {
|
|
111
116
|
addEventListener: typeof import("./event").addEventListener;
|
package/lib/system/index.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export declare function getStartupParams(): Promise<any>;
|
|
|
19
19
|
export declare function getDeviceInfo(): Promise<any>;
|
|
20
20
|
export declare function getDisplayInfo(): Promise<any>;
|
|
21
21
|
export declare function getProperty(key: string): Promise<any>;
|
|
22
|
+
export declare function setProperty(key: string, value: string): Promise<any>;
|
|
22
23
|
export declare function checkApi(apiName: string): Promise<any>;
|
|
23
24
|
export declare function getFontPath(fontFileName: string): Promise<any>;
|
|
24
25
|
export declare function setKeepScreenOn(enable: boolean): Promise<any>;
|
|
@@ -34,6 +35,7 @@ declare const _default: {
|
|
|
34
35
|
getDeviceInfo: typeof getDeviceInfo;
|
|
35
36
|
getDisplayInfo: typeof getDisplayInfo;
|
|
36
37
|
getProperty: typeof getProperty;
|
|
38
|
+
setProperty: typeof setProperty;
|
|
37
39
|
checkApi: typeof checkApi;
|
|
38
40
|
getFontPath: typeof getFontPath;
|
|
39
41
|
setKeepScreenOn: typeof setKeepScreenOn;
|
package/lib/voice/index.d.ts
CHANGED
|
@@ -1,19 +1,27 @@
|
|
|
1
1
|
export declare function enableVoiceInput(clientId?: string, parameters?: any, expandedParameters?: any): Promise<any>;
|
|
2
2
|
export declare function disableVoiceInput(): Promise<any>;
|
|
3
3
|
export declare function enableDirective(enable?: boolean): Promise<any>;
|
|
4
|
+
export declare function setDirective(enable?: boolean): Promise<any>;
|
|
5
|
+
export declare function enableRecording(): Promise<any>;
|
|
6
|
+
export declare function disableRecording(): Promise<any>;
|
|
4
7
|
export declare function stopTts(): Promise<any>;
|
|
5
8
|
export declare function sendTts(text: string, ttsId: string): Promise<any>;
|
|
6
9
|
export declare function sendStreamTts(text: string, ttsId: string, isFirst: boolean, isEnd: boolean): Promise<any>;
|
|
7
10
|
export declare function setTtsSpeaker(speaker: string): Promise<any>;
|
|
8
11
|
export declare function sendVoiceTextToAI(text: string): Promise<any>;
|
|
12
|
+
export declare function setA2UI(enable?: boolean): Promise<any>;
|
|
9
13
|
declare const _default: {
|
|
10
14
|
enableVoiceInput: typeof enableVoiceInput;
|
|
11
15
|
disableVoiceInput: typeof disableVoiceInput;
|
|
12
16
|
enableDirective: typeof enableDirective;
|
|
17
|
+
setDirective: typeof setDirective;
|
|
18
|
+
enableRecording: typeof enableRecording;
|
|
19
|
+
disableRecording: typeof disableRecording;
|
|
13
20
|
stopTts: typeof stopTts;
|
|
14
21
|
sendTts: typeof sendTts;
|
|
15
22
|
sendStreamTts: typeof sendStreamTts;
|
|
16
23
|
setTtsSpeaker: typeof setTtsSpeaker;
|
|
17
24
|
sendVoiceTextToAI: typeof sendVoiceTextToAI;
|
|
25
|
+
setA2UI: typeof setA2UI;
|
|
18
26
|
};
|
|
19
27
|
export default _default;
|