@ccos/ccsdk-lite 1.0.19 → 1.0.20

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
@@ -1097,10 +1097,15 @@ function getFuncName$1(name) {
1097
1097
  return moduleName$1 + '_' + name;
1098
1098
  }
1099
1099
  // 开启语音输入
1100
- function enableVoiceInput(clientId, enable) {
1100
+ function enableVoiceInput(clientId, parameters, expandedParameters) {
1101
1101
  if (clientId === void 0) { clientId = ''; }
1102
- if (enable === void 0) { enable = true; }
1103
- return callNative(getFuncName$1('enableVoiceInput'), { clientId: clientId, enable: enable });
1102
+ if (parameters === void 0) { parameters = {}; }
1103
+ if (expandedParameters === void 0) { expandedParameters = {}; }
1104
+ return callNative(getFuncName$1('enableVoiceInput'), { clientId: clientId, parameters: parameters, expandedParameters: expandedParameters });
1105
+ }
1106
+ // 关闭语音输入
1107
+ function disableVoiceInput() {
1108
+ return callNative(getFuncName$1('disableVoiceInput'), {});
1104
1109
  }
1105
1110
  // 开启意图识别指令返回
1106
1111
  function enableDirective(enable) {
@@ -1124,13 +1129,19 @@ function sendStreamTts$1(text, ttsId, isFirst, isEnd) {
1124
1129
  function setTtsSpeaker(speaker) {
1125
1130
  return callNative(getFuncName$1('setTtsSpeaker'), { speaker: speaker });
1126
1131
  }
1132
+ // 发送纯文本
1133
+ function sendVoiceTextToAI(text) {
1134
+ return callNative(getFuncName$1('sendVoiceTextToAI'), { text: text });
1135
+ }
1127
1136
  var voice = {
1128
1137
  enableVoiceInput: enableVoiceInput,
1138
+ disableVoiceInput: disableVoiceInput,
1129
1139
  enableDirective: enableDirective,
1130
1140
  stopTts: stopTts$1,
1131
1141
  sendTts: sendTts$1,
1132
1142
  sendStreamTts: sendStreamTts$1,
1133
1143
  setTtsSpeaker: setTtsSpeaker,
1144
+ sendVoiceTextToAI: sendVoiceTextToAI,
1134
1145
  };
1135
1146
 
1136
1147
  // 添加事件监听
package/lib/index.d.ts CHANGED
@@ -97,11 +97,13 @@ declare const _default: {
97
97
  };
98
98
  voice: {
99
99
  enableVoiceInput: typeof import("./voice").enableVoiceInput;
100
+ disableVoiceInput: typeof import("./voice").disableVoiceInput;
100
101
  enableDirective: typeof import("./voice").enableDirective;
101
102
  stopTts: typeof import("./voice").stopTts;
102
103
  sendTts: typeof import("./voice").sendTts;
103
104
  sendStreamTts: typeof import("./voice").sendStreamTts;
104
105
  setTtsSpeaker: typeof import("./voice").setTtsSpeaker;
106
+ sendVoiceTextToAI: typeof import("./voice").sendVoiceTextToAI;
105
107
  };
106
108
  event: {
107
109
  addEventListener: typeof import("./event").addEventListener;
@@ -1,15 +1,19 @@
1
- export declare function enableVoiceInput(clientId?: string, enable?: boolean): Promise<any>;
1
+ export declare function enableVoiceInput(clientId?: string, parameters?: any, expandedParameters?: any): Promise<any>;
2
+ export declare function disableVoiceInput(): Promise<any>;
2
3
  export declare function enableDirective(enable?: boolean): Promise<any>;
3
4
  export declare function stopTts(): Promise<any>;
4
5
  export declare function sendTts(text: string, ttsId: string): Promise<any>;
5
6
  export declare function sendStreamTts(text: string, ttsId: string, isFirst: boolean, isEnd: boolean): Promise<any>;
6
7
  export declare function setTtsSpeaker(speaker: string): Promise<any>;
8
+ export declare function sendVoiceTextToAI(text: string): Promise<any>;
7
9
  declare const _default: {
8
10
  enableVoiceInput: typeof enableVoiceInput;
11
+ disableVoiceInput: typeof disableVoiceInput;
9
12
  enableDirective: typeof enableDirective;
10
13
  stopTts: typeof stopTts;
11
14
  sendTts: typeof sendTts;
12
15
  sendStreamTts: typeof sendStreamTts;
13
16
  setTtsSpeaker: typeof setTtsSpeaker;
17
+ sendVoiceTextToAI: typeof sendVoiceTextToAI;
14
18
  };
15
19
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ccos/ccsdk-lite",
3
- "version": "1.0.19",
3
+ "version": "1.0.20",
4
4
  "description": "a jssdk for coocaa tv-system",
5
5
  "type": "module",
6
6
  "main": "lib/bundle.js",