@ccos/ccsdk-lite 1.0.18 → 1.0.19
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 +9 -2
- package/lib/index.d.ts +1 -0
- package/lib/voice/index.d.ts +3 -1
- package/package.json +1 -1
package/lib/bundle.js
CHANGED
|
@@ -1097,9 +1097,15 @@ function getFuncName$1(name) {
|
|
|
1097
1097
|
return moduleName$1 + '_' + name;
|
|
1098
1098
|
}
|
|
1099
1099
|
// 开启语音输入
|
|
1100
|
-
function enableVoiceInput(clientId) {
|
|
1100
|
+
function enableVoiceInput(clientId, enable) {
|
|
1101
1101
|
if (clientId === void 0) { clientId = ''; }
|
|
1102
|
-
|
|
1102
|
+
if (enable === void 0) { enable = true; }
|
|
1103
|
+
return callNative(getFuncName$1('enableVoiceInput'), { clientId: clientId, enable: enable });
|
|
1104
|
+
}
|
|
1105
|
+
// 开启意图识别指令返回
|
|
1106
|
+
function enableDirective(enable) {
|
|
1107
|
+
if (enable === void 0) { enable = true; }
|
|
1108
|
+
return callNative(getFuncName$1('enableDirective'), { enable: enable });
|
|
1103
1109
|
}
|
|
1104
1110
|
// 停止TTS播报
|
|
1105
1111
|
//
|
|
@@ -1120,6 +1126,7 @@ function setTtsSpeaker(speaker) {
|
|
|
1120
1126
|
}
|
|
1121
1127
|
var voice = {
|
|
1122
1128
|
enableVoiceInput: enableVoiceInput,
|
|
1129
|
+
enableDirective: enableDirective,
|
|
1123
1130
|
stopTts: stopTts$1,
|
|
1124
1131
|
sendTts: sendTts$1,
|
|
1125
1132
|
sendStreamTts: sendStreamTts$1,
|
package/lib/index.d.ts
CHANGED
|
@@ -97,6 +97,7 @@ declare const _default: {
|
|
|
97
97
|
};
|
|
98
98
|
voice: {
|
|
99
99
|
enableVoiceInput: typeof import("./voice").enableVoiceInput;
|
|
100
|
+
enableDirective: typeof import("./voice").enableDirective;
|
|
100
101
|
stopTts: typeof import("./voice").stopTts;
|
|
101
102
|
sendTts: typeof import("./voice").sendTts;
|
|
102
103
|
sendStreamTts: typeof import("./voice").sendStreamTts;
|
package/lib/voice/index.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
export declare function enableVoiceInput(clientId?: string): Promise<any>;
|
|
1
|
+
export declare function enableVoiceInput(clientId?: string, enable?: boolean): Promise<any>;
|
|
2
|
+
export declare function enableDirective(enable?: boolean): Promise<any>;
|
|
2
3
|
export declare function stopTts(): Promise<any>;
|
|
3
4
|
export declare function sendTts(text: string, ttsId: string): Promise<any>;
|
|
4
5
|
export declare function sendStreamTts(text: string, ttsId: string, isFirst: boolean, isEnd: boolean): Promise<any>;
|
|
5
6
|
export declare function setTtsSpeaker(speaker: string): Promise<any>;
|
|
6
7
|
declare const _default: {
|
|
7
8
|
enableVoiceInput: typeof enableVoiceInput;
|
|
9
|
+
enableDirective: typeof enableDirective;
|
|
8
10
|
stopTts: typeof stopTts;
|
|
9
11
|
sendTts: typeof sendTts;
|
|
10
12
|
sendStreamTts: typeof sendStreamTts;
|