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.
- package/ios/KeyWordRNBridge.mm +3 -4
- package/package.json +1 -1
package/ios/KeyWordRNBridge.mm
CHANGED
|
@@ -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
|
-
|
|
134
|
-
|
|
135
|
-
|
|
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
|
}
|