react-native-wakeword 1.1.71 → 1.1.73
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/package.json
CHANGED
|
@@ -23,13 +23,13 @@ export class KeyWordRNBridgeInstance {
|
|
|
23
23
|
setKeywordLicense(license: any): Promise<any>;
|
|
24
24
|
/**
|
|
25
25
|
* @param {any} threshold
|
|
26
|
-
* @param {string | undefined} [speakerVerificationEnrollmentJsonOrPathOrSetActive]
|
|
26
|
+
* @param {string | boolean | undefined} [speakerVerificationEnrollmentJsonOrPathOrSetActive]
|
|
27
27
|
* @param {boolean} [setActive]
|
|
28
28
|
* @param {boolean} [duckOthers]
|
|
29
29
|
* @param {boolean} [mixWithOthers]
|
|
30
30
|
* @param {boolean} [defaultToSpeaker]
|
|
31
31
|
*/
|
|
32
|
-
startKeywordDetection(threshold: any, speakerVerificationEnrollmentJsonOrPathOrSetActive?: string | undefined, setActive?: boolean, duckOthers?: boolean, mixWithOthers?: boolean, defaultToSpeaker?: boolean): Promise<any>;
|
|
32
|
+
startKeywordDetection(threshold: any, speakerVerificationEnrollmentJsonOrPathOrSetActive?: string | boolean | undefined, setActive?: boolean, duckOthers?: boolean, mixWithOthers?: boolean, defaultToSpeaker?: boolean): Promise<any>;
|
|
33
33
|
getRecordingWavArray(): Promise<any>;
|
|
34
34
|
getRecordingWav(): Promise<any>;
|
|
35
35
|
stopKeywordDetection(): Promise<any>;
|
|
@@ -128,7 +128,7 @@ export class KeyWordRNBridgeInstance {
|
|
|
128
128
|
|
|
129
129
|
/**
|
|
130
130
|
* @param {any} threshold
|
|
131
|
-
* @param {string | undefined} [speakerVerificationEnrollmentJsonOrPathOrSetActive]
|
|
131
|
+
* @param {string | boolean | undefined} [speakerVerificationEnrollmentJsonOrPathOrSetActive]
|
|
132
132
|
* @param {boolean} [setActive]
|
|
133
133
|
* @param {boolean} [duckOthers]
|
|
134
134
|
* @param {boolean} [mixWithOthers]
|
|
@@ -144,6 +144,10 @@ export class KeyWordRNBridgeInstance {
|
|
|
144
144
|
) {
|
|
145
145
|
/** @type {string | undefined} */
|
|
146
146
|
let speakerVerificationEnrollmentJsonOrPath = undefined;
|
|
147
|
+
let resolvedSetActive = setActive;
|
|
148
|
+
let resolvedDuckOthers = duckOthers;
|
|
149
|
+
let resolvedMixWithOthers = mixWithOthers;
|
|
150
|
+
let resolvedDefaultToSpeaker = defaultToSpeaker;
|
|
147
151
|
|
|
148
152
|
if (
|
|
149
153
|
typeof speakerVerificationEnrollmentJsonOrPathOrSetActive === 'string' ||
|
|
@@ -151,10 +155,7 @@ export class KeyWordRNBridgeInstance {
|
|
|
151
155
|
) {
|
|
152
156
|
speakerVerificationEnrollmentJsonOrPath = speakerVerificationEnrollmentJsonOrPathOrSetActive;
|
|
153
157
|
} else {
|
|
154
|
-
|
|
155
|
-
mixWithOthers = duckOthers;
|
|
156
|
-
duckOthers = setActive;
|
|
157
|
-
setActive = speakerVerificationEnrollmentJsonOrPathOrSetActive;
|
|
158
|
+
resolvedSetActive = speakerVerificationEnrollmentJsonOrPathOrSetActive;
|
|
158
159
|
}
|
|
159
160
|
|
|
160
161
|
if (Platform.OS === 'ios') {
|
|
@@ -162,10 +163,10 @@ export class KeyWordRNBridgeInstance {
|
|
|
162
163
|
this.instanceId,
|
|
163
164
|
threshold,
|
|
164
165
|
speakerVerificationEnrollmentJsonOrPath,
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
166
|
+
resolvedSetActive,
|
|
167
|
+
resolvedDuckOthers,
|
|
168
|
+
resolvedMixWithOthers,
|
|
169
|
+
resolvedDefaultToSpeaker
|
|
169
170
|
);
|
|
170
171
|
} else {
|
|
171
172
|
return KeyWordRNBridge.startKeywordDetection(
|