react-native-wakeword 1.1.70 → 1.1.71

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-wakeword",
3
- "version": "1.1.70",
3
+ "version": "1.1.71",
4
4
  "description": "Voice/Wake-word detection library for React Native",
5
5
  "main": "wakewords/index.js",
6
6
  "types": "wakewords/index.d.ts",
@@ -21,7 +21,15 @@ export class KeyWordRNBridgeInstance {
21
21
  setKeywordDetectionLicense(license: any): Promise<any>;
22
22
  replaceKeywordDetectionModel(modelName: any, threshold: any, bufferCnt: any): Promise<any>;
23
23
  setKeywordLicense(license: any): Promise<any>;
24
- startKeywordDetection(threshold: any, speakerVerificationEnrollmentJsonOrPathOrSetActive?: null, setActive?: boolean, duckOthers?: boolean, mixWithOthers?: boolean, defaultToSpeaker?: boolean): Promise<any>;
24
+ /**
25
+ * @param {any} threshold
26
+ * @param {string | undefined} [speakerVerificationEnrollmentJsonOrPathOrSetActive]
27
+ * @param {boolean} [setActive]
28
+ * @param {boolean} [duckOthers]
29
+ * @param {boolean} [mixWithOthers]
30
+ * @param {boolean} [defaultToSpeaker]
31
+ */
32
+ startKeywordDetection(threshold: any, speakerVerificationEnrollmentJsonOrPathOrSetActive?: string | undefined, setActive?: boolean, duckOthers?: boolean, mixWithOthers?: boolean, defaultToSpeaker?: boolean): Promise<any>;
25
33
  getRecordingWavArray(): Promise<any>;
26
34
  getRecordingWav(): Promise<any>;
27
35
  stopKeywordDetection(): Promise<any>;
@@ -126,15 +126,24 @@ export class KeyWordRNBridgeInstance {
126
126
  return KeyWordRNBridge.setKeywordLicense(this.instanceId, license);
127
127
  }
128
128
 
129
+ /**
130
+ * @param {any} threshold
131
+ * @param {string | undefined} [speakerVerificationEnrollmentJsonOrPathOrSetActive]
132
+ * @param {boolean} [setActive]
133
+ * @param {boolean} [duckOthers]
134
+ * @param {boolean} [mixWithOthers]
135
+ * @param {boolean} [defaultToSpeaker]
136
+ */
129
137
  async startKeywordDetection(
130
138
  threshold,
131
- speakerVerificationEnrollmentJsonOrPathOrSetActive = null,
139
+ speakerVerificationEnrollmentJsonOrPathOrSetActive = undefined,
132
140
  setActive = true,
133
141
  duckOthers = false,
134
142
  mixWithOthers = true,
135
143
  defaultToSpeaker = true
136
144
  ) {
137
- let speakerVerificationEnrollmentJsonOrPath = null;
145
+ /** @type {string | undefined} */
146
+ let speakerVerificationEnrollmentJsonOrPath = undefined;
138
147
 
139
148
  if (
140
149
  typeof speakerVerificationEnrollmentJsonOrPathOrSetActive === 'string' ||