react-native-wakeword-sid 1.1.103 → 1.1.105

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.
@@ -261,7 +261,9 @@ public void startVADDetection(String instanceId, Promise promise) {
261
261
  return;
262
262
  }
263
263
  try {
264
- float thr = vadThresholdByInstance.getOrDefault(instanceId, DEFAULT_VAD_THRESHOLD);
264
+ // after: API-21 safe
265
+ Float _thr = vadThresholdByInstance.get(instanceId);
266
+ float thr = (_thr != null) ? _thr : DEFAULT_VAD_THRESHOLD;
265
267
  int win = vadMsWindowByInstance.getOrDefault(instanceId, DEFAULT_VAD_MSWINDOW);
266
268
  instance.setVADParams(thr, win);
267
269
  boolean ok = instance.startVADListening();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-wakeword-sid",
3
- "version": "1.1.103",
3
+ "version": "1.1.105",
4
4
  "description": "Voice/Wake-word detection library for React Native",
5
5
  "main": "wakewords/index.js",
6
6
  "types": "wakewords/index.d.ts",