react-native-wakeword 1.1.65 → 1.1.67
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/android/libs/com/davoice/keyworddetection/1.0.0/keyworddetection-1.0.0.aar +0 -0
- package/android/libs/com/davoice/keyworddetection/1.0.0/keyworddetection-1.0.0.aar.md5 +1 -1
- package/android/libs/com/davoice/keyworddetection/1.0.0/keyworddetection-1.0.0.aar.sha1 +1 -1
- package/android/src/main/java/com/davoice/keywordspotting/KeyWordRNBridge.java +30 -0
- package/package.json +1 -1
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
e3ed3e2d1e4f0fdf290f0974d23eb8aa keyworddetection-1.0.0.aar
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
ac32d0a227f675731ec7ef3aa4c5943ac00c5a68 keyworddetection-1.0.0.aar
|
|
@@ -250,6 +250,36 @@ public class KeyWordRNBridge extends ReactContextBaseJavaModule {
|
|
|
250
250
|
}
|
|
251
251
|
}
|
|
252
252
|
|
|
253
|
+
@ReactMethod
|
|
254
|
+
public void pauseDetection(String instanceId, boolean stopMic, Promise promise) {
|
|
255
|
+
KeyWordsDetection instance = instances.get(instanceId);
|
|
256
|
+
if (instance != null) {
|
|
257
|
+
try {
|
|
258
|
+
instance.pauseDetection(stopMic);
|
|
259
|
+
promise.resolve("Paused detection for instance: " + instanceId + " (stopMic=" + stopMic + ")");
|
|
260
|
+
} catch (Exception e) {
|
|
261
|
+
promise.reject("PauseDetectionError", "Failed to pause detection: " + e.getMessage());
|
|
262
|
+
}
|
|
263
|
+
} else {
|
|
264
|
+
promise.reject("InstanceNotFound", "No instance found with ID: " + instanceId);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
@ReactMethod
|
|
269
|
+
public void unPauseDetection(String instanceId, Promise promise) {
|
|
270
|
+
KeyWordsDetection instance = instances.get(instanceId);
|
|
271
|
+
if (instance != null) {
|
|
272
|
+
try {
|
|
273
|
+
instance.unPauseDetection();
|
|
274
|
+
promise.resolve("Unpaused detection for instance: " + instanceId);
|
|
275
|
+
} catch (Exception e) {
|
|
276
|
+
promise.reject("UnPauseDetectionError", "Failed to unpause detection: " + e.getMessage());
|
|
277
|
+
}
|
|
278
|
+
} else {
|
|
279
|
+
promise.reject("InstanceNotFound", "No instance found with ID: " + instanceId);
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
253
283
|
// Destroy an instance
|
|
254
284
|
@ReactMethod
|
|
255
285
|
public void destroyInstance(String instanceId, Promise promise) {
|