@ccos/ccsdk-lite 1.0.24 → 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 CHANGED
@@ -1141,6 +1141,19 @@ function enableDirective(enable) {
1141
1141
  if (enable === void 0) { enable = true; }
1142
1142
  return callNative(getFuncName$1('enableDirective'), { enable: enable });
1143
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
+ }
1144
1157
  // 停止TTS播报
1145
1158
  //
1146
1159
  function stopTts$1() {
@@ -1162,15 +1175,24 @@ function setTtsSpeaker(speaker) {
1162
1175
  function sendVoiceTextToAI(text) {
1163
1176
  return callNative(getFuncName$1('sendVoiceTextToAI'), { text: text });
1164
1177
  }
1178
+ // 开启意图识别指令返回
1179
+ function setA2UI(enable) {
1180
+ if (enable === void 0) { enable = true; }
1181
+ return callNative(getFuncName$1('setA2UI'), { enable: enable });
1182
+ }
1165
1183
  var voice = {
1166
1184
  enableVoiceInput: enableVoiceInput,
1167
1185
  disableVoiceInput: disableVoiceInput,
1168
1186
  enableDirective: enableDirective,
1187
+ setDirective: setDirective,
1188
+ enableRecording: enableRecording,
1189
+ disableRecording: disableRecording,
1169
1190
  stopTts: stopTts$1,
1170
1191
  sendTts: sendTts$1,
1171
1192
  sendStreamTts: sendStreamTts$1,
1172
1193
  setTtsSpeaker: setTtsSpeaker,
1173
1194
  sendVoiceTextToAI: sendVoiceTextToAI,
1195
+ setA2UI: setA2UI,
1174
1196
  };
1175
1197
 
1176
1198
  // 添加事件监听
package/lib/index.d.ts CHANGED
@@ -102,11 +102,15 @@ declare const _default: {
102
102
  enableVoiceInput: typeof import("./voice").enableVoiceInput;
103
103
  disableVoiceInput: typeof import("./voice").disableVoiceInput;
104
104
  enableDirective: typeof import("./voice").enableDirective;
105
+ setDirective: typeof import("./voice").setDirective;
106
+ enableRecording: typeof import("./voice").enableRecording;
107
+ disableRecording: typeof import("./voice").disableRecording;
105
108
  stopTts: typeof import("./voice").stopTts;
106
109
  sendTts: typeof import("./voice").sendTts;
107
110
  sendStreamTts: typeof import("./voice").sendStreamTts;
108
111
  setTtsSpeaker: typeof import("./voice").setTtsSpeaker;
109
112
  sendVoiceTextToAI: typeof import("./voice").sendVoiceTextToAI;
113
+ setA2UI: typeof import("./voice").setA2UI;
110
114
  };
111
115
  event: {
112
116
  addEventListener: typeof import("./event").addEventListener;
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ccos/ccsdk-lite",
3
- "version": "1.0.24",
3
+ "version": "1.0.25",
4
4
  "description": "a jssdk for coocaa tv-system",
5
5
  "type": "module",
6
6
  "main": "lib/bundle.js",