react-native-wakeword 1.0.58 → 1.0.59
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 +18 -0
- package/ios/KeyWordDetection.xcframework/Info.plist +5 -5
- package/package.json +6 -5
- package/wakewords/KeyWordRNBridge.d.ts +1 -1
- package/wakewords/index.d.ts +4 -4
- package/wakewords/useModel.d.ts +5 -12
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
38aa482dee7ea21e23ec1452064dd117 keyworddetection-1.0.0.aar
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
759de3418d13a7578fcfdd6dce64408a7e1d4336 keyworddetection-1.0.0.aar
|
|
@@ -61,6 +61,24 @@ public class KeyWordRNBridge extends ReactContextBaseJavaModule {
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
+
// Create a new instance
|
|
65
|
+
@ReactMethod
|
|
66
|
+
public String getRecordingWav(String instanceId, Promise promise) {
|
|
67
|
+
KeyWordsDetection instance = instances.get(instanceId);
|
|
68
|
+
String recordingWav = "";
|
|
69
|
+
if (instance == null) {
|
|
70
|
+
promise.reject("Instance not Exists", "Instance does not exists with ID: " + instanceId);
|
|
71
|
+
return recordingWav;
|
|
72
|
+
}
|
|
73
|
+
try {
|
|
74
|
+
recordingWav = instance.getRecordingWav();
|
|
75
|
+
promise.resolve("Instance ID: " + instanceId + " change model " + modelName);
|
|
76
|
+
} catch (Exception e) {
|
|
77
|
+
promise.reject("CreateError", "Failed to create instance: " + e.getMessage());
|
|
78
|
+
}
|
|
79
|
+
return recordingWav;
|
|
80
|
+
}
|
|
81
|
+
|
|
64
82
|
// Create a new instance
|
|
65
83
|
@ReactMethod
|
|
66
84
|
public void replaceKeywordDetectionModel(String instanceId, String modelName, float threshold, int bufferCnt, Promise promise) {
|
|
@@ -8,32 +8,32 @@
|
|
|
8
8
|
<key>BinaryPath</key>
|
|
9
9
|
<string>KeyWordDetection.framework/KeyWordDetection</string>
|
|
10
10
|
<key>LibraryIdentifier</key>
|
|
11
|
-
<string>ios-
|
|
11
|
+
<string>ios-arm64_x86_64-simulator</string>
|
|
12
12
|
<key>LibraryPath</key>
|
|
13
13
|
<string>KeyWordDetection.framework</string>
|
|
14
14
|
<key>SupportedArchitectures</key>
|
|
15
15
|
<array>
|
|
16
16
|
<string>arm64</string>
|
|
17
|
+
<string>x86_64</string>
|
|
17
18
|
</array>
|
|
18
19
|
<key>SupportedPlatform</key>
|
|
19
20
|
<string>ios</string>
|
|
21
|
+
<key>SupportedPlatformVariant</key>
|
|
22
|
+
<string>simulator</string>
|
|
20
23
|
</dict>
|
|
21
24
|
<dict>
|
|
22
25
|
<key>BinaryPath</key>
|
|
23
26
|
<string>KeyWordDetection.framework/KeyWordDetection</string>
|
|
24
27
|
<key>LibraryIdentifier</key>
|
|
25
|
-
<string>ios-
|
|
28
|
+
<string>ios-arm64</string>
|
|
26
29
|
<key>LibraryPath</key>
|
|
27
30
|
<string>KeyWordDetection.framework</string>
|
|
28
31
|
<key>SupportedArchitectures</key>
|
|
29
32
|
<array>
|
|
30
33
|
<string>arm64</string>
|
|
31
|
-
<string>x86_64</string>
|
|
32
34
|
</array>
|
|
33
35
|
<key>SupportedPlatform</key>
|
|
34
36
|
<string>ios</string>
|
|
35
|
-
<key>SupportedPlatformVariant</key>
|
|
36
|
-
<string>simulator</string>
|
|
37
37
|
</dict>
|
|
38
38
|
</array>
|
|
39
39
|
<key>CFBundlePackageType</key>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-wakeword",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.59",
|
|
4
4
|
"description": "Voice/Wake-word detection library for React Native",
|
|
5
5
|
"main": "wakewords/index.js",
|
|
6
6
|
"types": "wakewords/index.d.ts",
|
|
@@ -20,15 +20,16 @@
|
|
|
20
20
|
"build": "gradlew assembleRelease"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@types/react": "
|
|
24
|
-
"typescript": "
|
|
23
|
+
"@types/react": ">=18.0.0",
|
|
24
|
+
"typescript": ">=4.0.0"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"react": "
|
|
28
|
-
"react-native": "
|
|
27
|
+
"react": ">=18.0.0",
|
|
28
|
+
"react-native": ">=0.70.0"
|
|
29
29
|
},
|
|
30
30
|
"keywords": [
|
|
31
31
|
"react-native wake word",
|
|
32
|
+
"Davoice.io",
|
|
32
33
|
"voice commands",
|
|
33
34
|
"wake word",
|
|
34
35
|
"wakeword",
|
|
@@ -11,7 +11,7 @@ export class KeyWordRNBridgeInstance {
|
|
|
11
11
|
startKeywordDetection(threshold: any): Promise<any>;
|
|
12
12
|
stopKeywordDetection(): Promise<any>;
|
|
13
13
|
destroyInstance(): Promise<any>;
|
|
14
|
-
onKeywordDetectionEvent(callback: any):
|
|
14
|
+
onKeywordDetectionEvent(callback: any): any;
|
|
15
15
|
removeListeners(): void;
|
|
16
16
|
}
|
|
17
17
|
export function removeAllRNBridgeListeners(): Promise<void>;
|
package/wakewords/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export default useModel;
|
|
2
|
-
import { removeAllRNBridgeListeners } from
|
|
3
|
-
import { createKeyWordRNBridgeInstance } from
|
|
4
|
-
import { KeyWordRNBridgeInstance } from
|
|
5
|
-
import useModel from
|
|
2
|
+
import { removeAllRNBridgeListeners } from './KeyWordRNBridge';
|
|
3
|
+
import { createKeyWordRNBridgeInstance } from './KeyWordRNBridge';
|
|
4
|
+
import { KeyWordRNBridgeInstance } from './KeyWordRNBridge';
|
|
5
|
+
import useModel from './useModel';
|
|
6
6
|
export { removeAllRNBridgeListeners, createKeyWordRNBridgeInstance, KeyWordRNBridgeInstance, useModel };
|
package/wakewords/useModel.d.ts
CHANGED
|
@@ -1,19 +1,12 @@
|
|
|
1
|
-
interface instanceConfig {
|
|
2
|
-
id: string;
|
|
3
|
-
modelName: string;
|
|
4
|
-
threshold: number;
|
|
5
|
-
bufferCnt: number;
|
|
6
|
-
sticky: boolean;
|
|
7
|
-
}
|
|
8
1
|
/**
|
|
9
2
|
* Custom hook for handling keyword detection using KeyWordRNBridge
|
|
10
3
|
* @returns An object with functions and state for keyword detection
|
|
11
4
|
*/
|
|
12
5
|
export declare const useModel: () => {
|
|
13
|
-
isListening:
|
|
14
|
-
startListening:
|
|
15
|
-
loadModel:
|
|
16
|
-
setKeywordDetectionLicense:
|
|
17
|
-
stopListening:
|
|
6
|
+
isListening: any;
|
|
7
|
+
startListening: any;
|
|
8
|
+
loadModel: any;
|
|
9
|
+
setKeywordDetectionLicense: any;
|
|
10
|
+
stopListening: any;
|
|
18
11
|
};
|
|
19
12
|
export default useModel;
|