react-native-wakeword-sid 1.1.72 → 1.1.74
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/package.json +1 -1
- package/speakerid/SpeakerIdRNBridge.d.ts +43 -42
- package/speakerid/index.d.ts +18 -0
- package/speakerid/index.js +21 -0
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
50862aa181f9e90c686f985677960a24 keyworddetection-1.0.0.aar
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
3a0d3de64293f27044cfbd32a57d8ef3e7572dce keyworddetection-1.0.0.aar
|
package/package.json
CHANGED
|
@@ -1,44 +1,45 @@
|
|
|
1
|
-
export type SpeakerVerificationResult = {
|
|
2
|
-
fullSec: number;
|
|
3
|
-
voicedSec: number;
|
|
4
|
-
bestScore: number;
|
|
5
|
-
bestStrategy: string;
|
|
6
|
-
bestTargetLabel: string;
|
|
7
|
-
perTargetStrategy?: Record<string, Record<string, number>>;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export type OnboardingResult = {
|
|
11
|
-
clusterSize: number;
|
|
12
|
-
embDim: number;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
1
|
export class SpeakerIdInstance {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
2
|
+
constructor(instanceId: any);
|
|
3
|
+
instanceId: any;
|
|
4
|
+
listeners: any[];
|
|
5
|
+
/**
|
|
6
|
+
* Lifecycle
|
|
7
|
+
*/
|
|
8
|
+
createInstance(): Promise<any>;
|
|
9
|
+
destroyInstance(): Promise<any>;
|
|
10
|
+
/**
|
|
11
|
+
* Onboarding
|
|
12
|
+
*/
|
|
13
|
+
onboardFromMicrophone(maxMillis?: number): Promise<any>;
|
|
14
|
+
onboardingStreamStart(): Promise<any>;
|
|
15
|
+
onboardingStreamFeed(blockInt16: any): Promise<any>;
|
|
16
|
+
onboardingStreamFinish(): Promise<any>;
|
|
17
|
+
onboardFromWav(absPath: any): Promise<any>;
|
|
18
|
+
/**
|
|
19
|
+
* Verification init
|
|
20
|
+
*/
|
|
21
|
+
initVerificationUsingDefaults(): Promise<any>;
|
|
22
|
+
initVerificationWithFiles(meanNpyPath: any, clusterNpyPath: any): Promise<any>;
|
|
23
|
+
/**
|
|
24
|
+
* Verification
|
|
25
|
+
*/
|
|
26
|
+
verifyFromMicrophone(maxMillis?: number): Promise<any>;
|
|
27
|
+
verifyFromWav(absPath: any): Promise<any>;
|
|
28
|
+
verifyStreamPush(blockInt16: any): Promise<any>;
|
|
29
|
+
verifyStreamFinish(): Promise<any>;
|
|
30
|
+
/**
|
|
31
|
+
* Export helpers (Downloads/)
|
|
32
|
+
*/
|
|
33
|
+
exportDefaultClusterToDownloads(): Promise<any>;
|
|
34
|
+
exportDefaultMeanToDownloads(): Promise<any>;
|
|
35
|
+
exportDefaultMeanCountToDownloads(): Promise<any>;
|
|
36
|
+
/**
|
|
37
|
+
* Optional: subscribe to an event fired when a segment is finalized during mic verification
|
|
38
|
+
* Native side will emit { instanceId, result: {...same fields as verify...} }
|
|
39
|
+
*/
|
|
40
|
+
onVerificationEvent(callback: any): import("react-native").EmitterSubscription;
|
|
41
|
+
removeListeners(): void;
|
|
40
42
|
}
|
|
41
|
-
|
|
42
|
-
export
|
|
43
|
-
export
|
|
44
|
-
export const float32ToInt16: (f32: number[] | Float32Array) => Int16Array;
|
|
43
|
+
export function createSpeakerIdInstance(instanceId: any): Promise<SpeakerIdInstance>;
|
|
44
|
+
export function removeAllSpeakerIdListeners(): Promise<void>;
|
|
45
|
+
export function float32ToInt16(f32: any): Int16Array<any>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export function createSpeakerIdInstance(instanceId?: string): Promise<{
|
|
2
|
+
createInstance: () => any;
|
|
3
|
+
initVerificationUsingDefaults: () => any;
|
|
4
|
+
initVerificationWithFiles: (m: any, c: any) => any;
|
|
5
|
+
onboardFromMicrophone: (ms: any) => any;
|
|
6
|
+
onboardStartStream: () => any;
|
|
7
|
+
onboardStreamFeed: (int16: any) => any;
|
|
8
|
+
onboardStreamFinish: () => any;
|
|
9
|
+
onboardFromWav: (p: any) => any;
|
|
10
|
+
verifyFromMicrophone: (ms: any) => any;
|
|
11
|
+
verifyStreamPush: (int16: any) => any;
|
|
12
|
+
verifyStreamFinish: () => any;
|
|
13
|
+
verifyFromWav: (p: any) => any;
|
|
14
|
+
exportDefaultClusterToDownloads: () => any;
|
|
15
|
+
exportDefaultMeanToDownloads: () => any;
|
|
16
|
+
exportDefaultMeanCountToDownloads: () => any;
|
|
17
|
+
destroy: () => any;
|
|
18
|
+
}>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { NativeModules } from 'react-native';
|
|
2
|
+
const { SpeakerIdRNBridge } = NativeModules;
|
|
3
|
+
|
|
4
|
+
export const createSpeakerIdInstance = async (instanceId = 'sid1') => ({
|
|
5
|
+
createInstance: () => SpeakerIdRNBridge.createInstance(instanceId),
|
|
6
|
+
initVerificationUsingDefaults: () => SpeakerIdRNBridge.initVerificationUsingDefaults(instanceId),
|
|
7
|
+
initVerificationWithFiles: (m, c) => SpeakerIdRNBridge.initVerificationWithFiles(instanceId, m, c),
|
|
8
|
+
onboardFromMicrophone: (ms) => SpeakerIdRNBridge.onboardFromMicrophone(instanceId, ms ?? 12000),
|
|
9
|
+
onboardStartStream: () => SpeakerIdRNBridge.onboardStartStream(instanceId),
|
|
10
|
+
onboardStreamFeed: (int16) => SpeakerIdRNBridge.onboardStreamFeed(instanceId, Array.from(int16)),
|
|
11
|
+
onboardStreamFinish: () => SpeakerIdRNBridge.onboardStreamFinish(instanceId),
|
|
12
|
+
onboardFromWav: (p) => SpeakerIdRNBridge.onboardFromWav(instanceId, p),
|
|
13
|
+
verifyFromMicrophone: (ms) => SpeakerIdRNBridge.verifyFromMicrophone(instanceId, ms ?? 8000),
|
|
14
|
+
verifyStreamPush: (int16) => SpeakerIdRNBridge.verifyStreamPush(instanceId, Array.from(int16)),
|
|
15
|
+
verifyStreamFinish: () => SpeakerIdRNBridge.verifyStreamFinish(instanceId),
|
|
16
|
+
verifyFromWav: (p) => SpeakerIdRNBridge.verifyFromWav(instanceId, p),
|
|
17
|
+
exportDefaultClusterToDownloads: () => SpeakerIdRNBridge.exportDefaultClusterToDownloads(instanceId),
|
|
18
|
+
exportDefaultMeanToDownloads: () => SpeakerIdRNBridge.exportDefaultMeanToDownloads(instanceId),
|
|
19
|
+
exportDefaultMeanCountToDownloads: () => SpeakerIdRNBridge.exportDefaultMeanCountToDownloads(instanceId),
|
|
20
|
+
destroy: () => SpeakerIdRNBridge.destroyInstance(instanceId),
|
|
21
|
+
});
|