react-native-wakeword 1.0.38 → 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/README.md CHANGED
@@ -8,6 +8,20 @@ Contact us at info@DaVoice.io
8
8
  ## Installation
9
9
  npm install react-native-wakeword
10
10
 
11
+ ## Android:
12
+ Add this to your android/build.gradle file:
13
+
14
+ allprojects {
15
+ repositories {
16
+ // react-native-wakeword added
17
+ maven { url "${project(":react-native-wakeword").projectDir}/libs" }
18
+ maven { url("${project(':react-native-wakeword').projectDir}/libs") }
19
+ maven {
20
+ url("${project(':react-native-wakeword').projectDir}/libs")
21
+ }
22
+ // End react-native-wakeword added
23
+ ... your other lines...
24
+
11
25
  ## Githhub examples:
12
26
 
13
27
  ### Checkout examples on:
@@ -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.38",
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",