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
|
-
|
|
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();
|