react-native-wakeword 1.0.39 → 1.0.40

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.
@@ -130,10 +130,9 @@ RCT_EXPORT_METHOD(startKeywordDetection:(NSString *)instanceId threshold:(float)
130
130
  KeyWordsDetectionWrapper *wrapper = self.instances[instanceId];
131
131
  KeyWordsDetection *instance = wrapper.keyWordsDetection;
132
132
  if (instance) {
133
- NSError *error = nil;
134
- [instance startListeningAndReturnError:&error];
135
- if (error) {
136
- reject(@"StartError", [NSString stringWithFormat:@"Failed to start detection: %@", error.localizedDescription], nil);
133
+ BOOL success = [keyWordsDetection startListening];
134
+ if (success == false) {
135
+ reject(@"StartError", [NSString stringWithFormat:@"Failed to start detection"], nil);
137
136
  } else {
138
137
  resolve([NSString stringWithFormat:@"Started detection for instance: %@", instanceId]);
139
138
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-wakeword",
3
- "version": "1.0.39",
3
+ "version": "1.0.40",
4
4
  "description": "Voice/Wake-word detection library for React Native",
5
5
  "main": "wakewords/index.js",
6
6
  "types": "wakewords/index.d.ts",