react-native-wakeword-sid 1.1.101 → 1.1.102

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.
@@ -24,7 +24,7 @@ import java.io.BufferedInputStream;
24
24
  import java.io.ByteArrayOutputStream;
25
25
  import java.io.IOException;
26
26
  import java.util.Locale;
27
-
27
+ import java.util.Log;
28
28
 
29
29
  /**
30
30
  * React Native bridge for the speaker-id Android library.
@@ -112,7 +112,7 @@ public class SpeakerIdRNBridge extends ReactContextBaseJavaModule {
112
112
  }
113
113
 
114
114
  @ReactMethod
115
- public void initVerificationUsingCurrentConfig(Promise promise) {
115
+ public void initVerificationUsingCurrentConfig(String instanceId, Promise promise) {
116
116
  SpeakerIdApi api = instances.get(instanceId);
117
117
  if (api == null) { promise.reject("InstanceNotFound", instanceId); return; }
118
118
  try {
@@ -390,13 +390,19 @@ public class SpeakerIdRNBridge extends ReactContextBaseJavaModule {
390
390
  promise.reject("InstanceExists", "Instance already exists: " + instanceId);
391
391
  return;
392
392
  }
393
+ Log.d("WWD DEBUG", "createInstanceWWD")
394
+
393
395
  exec.submit(() -> {
394
396
  try {
397
+ Log.d("WWD DEBUG", "createInstanceWWD2")
395
398
  SpeakerIdApi api = SpeakerIdApi.createWWD(reactContext);
399
+ Log.d("WWD DEBUG", "createInstanceWWD3")
396
400
  synchronized (instances) { instances.put(instanceId, api); }
401
+ Log.d("WWD DEBUG", "createInstanceWWD4")
397
402
  main.post(() -> promise.resolve(true));
398
403
  // Then run debug async if enabled
399
404
  if (DEBUG_SID_ASSETS) {
405
+ Log.d("WWD DEBUG", "Calling debugOnAssetsWWD")
400
406
  exec.submit(() -> debugOnAssetsWWD(instanceId));
401
407
  }
402
408
 
@@ -508,6 +514,7 @@ public class SpeakerIdRNBridge extends ReactContextBaseJavaModule {
508
514
  // ======= DEBUG harness (assets) =======
509
515
 
510
516
  private void emitDebug(String msg) {
517
+ Log.d("WWD DEBUG", msg)
511
518
  WritableMap m = Arguments.createMap();
512
519
  m.putString("line", msg);
513
520
  sendEvent("SpeakerIdDebug", m);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-wakeword-sid",
3
- "version": "1.1.101",
3
+ "version": "1.1.102",
4
4
  "description": "Voice/Wake-word detection library for React Native",
5
5
  "main": "wakewords/index.js",
6
6
  "types": "wakewords/index.d.ts",