@absolutejs/voice 0.0.19 → 0.0.21
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 +387 -4
- package/dist/angular/index.d.ts +1 -0
- package/dist/angular/index.js +669 -3
- package/dist/angular/voice-controller.service.d.ts +21 -0
- package/dist/audioConditioning.d.ts +3 -0
- package/dist/client/actions.d.ts +7 -0
- package/dist/client/connection.d.ts +5 -0
- package/dist/client/controller.d.ts +2 -0
- package/dist/client/htmxBootstrap.js +576 -167
- package/dist/client/index.d.ts +1 -0
- package/dist/client/index.js +486 -3
- package/dist/client/microphone.d.ts +4 -2
- package/dist/correction.d.ts +16 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +1314 -283
- package/dist/presets.d.ts +13 -0
- package/dist/react/index.d.ts +1 -0
- package/dist/react/index.js +642 -3
- package/dist/react/useVoiceController.d.ts +20 -0
- package/dist/react/useVoiceStream.d.ts +1 -0
- package/dist/store.d.ts +2 -2
- package/dist/svelte/index.d.ts +1 -0
- package/dist/svelte/index.js +607 -3
- package/dist/testing/benchmark.d.ts +36 -0
- package/dist/testing/fixtures.d.ts +1 -0
- package/dist/testing/index.d.ts +2 -0
- package/dist/testing/index.js +1975 -4
- package/dist/testing/resilience.d.ts +20 -0
- package/dist/testing/sessionBenchmark.d.ts +126 -0
- package/dist/testing/stt.d.ts +1 -0
- package/dist/turnDetection.d.ts +5 -1
- package/dist/turnProfiles.d.ts +6 -0
- package/dist/types.d.ts +198 -8
- package/dist/vue/index.d.ts +1 -0
- package/dist/vue/index.js +660 -3
- package/dist/vue/useVoiceController.d.ts +19 -0
- package/fixtures/README.md +24 -0
- package/fixtures/manifest.json +127 -0
- package/fixtures/pcm/dialogue-three-clean.pcm +0 -0
- package/fixtures/pcm/dialogue-three-mixed.pcm +0 -0
- package/fixtures/pcm/dialogue-two-clean.pcm +0 -0
- package/fixtures/pcm/dialogue-two-noisy.pcm +0 -0
- package/fixtures/pcm/multiturn-three-mixed.pcm +0 -0
- package/fixtures/pcm/multiturn-two-clean.pcm +0 -0
- package/fixtures/pcm/stella-bulgaria-bulgarian20.pcm +0 -0
- package/fixtures/pcm/stella-jamaica-jamaican-creole-english1.pcm +0 -0
- package/fixtures/pcm/stella-liberia-liberian-pidgin-english2.pcm +0 -0
- package/fixtures/pcm/stella-sierra-leone-krio5.pcm +0 -0
- package/package.json +25 -1
|
@@ -8,6 +8,7 @@ export type VoiceExpectedTermAccuracy = {
|
|
|
8
8
|
missingTerms: string[];
|
|
9
9
|
recall: number;
|
|
10
10
|
};
|
|
11
|
+
export type VoiceSTTFixtureEnvironment = 'accent' | 'accent-noisy' | 'clean' | 'noisy' | 'other';
|
|
11
12
|
export type VoiceSTTBenchmarkFixtureResult = {
|
|
12
13
|
accuracy: VoiceSTTAdapterHarnessResult['accuracy'];
|
|
13
14
|
closeCount: number;
|
|
@@ -20,8 +21,11 @@ export type VoiceSTTBenchmarkFixtureResult = {
|
|
|
20
21
|
finalText: string;
|
|
21
22
|
fixtureId: string;
|
|
22
23
|
fragmentationCount: number;
|
|
24
|
+
group: VoiceSTTFixtureEnvironment;
|
|
23
25
|
passes: boolean;
|
|
24
26
|
partialCount: number;
|
|
27
|
+
postSpeechTimeToEndOfTurnMs?: number;
|
|
28
|
+
postSpeechTimeToFirstFinalMs?: number;
|
|
25
29
|
tags: string[];
|
|
26
30
|
timeToEndOfTurnMs?: number;
|
|
27
31
|
timeToFirstFinalMs?: number;
|
|
@@ -35,6 +39,8 @@ export type VoiceSTTBenchmarkSummary = {
|
|
|
35
39
|
averageEndOfTurnCount: number;
|
|
36
40
|
averageFinalCount: number;
|
|
37
41
|
averageTermRecall: number;
|
|
42
|
+
averagePostSpeechTimeToEndOfTurnMs?: number;
|
|
43
|
+
averagePostSpeechTimeToFirstFinalMs?: number;
|
|
38
44
|
averageTimeToEndOfTurnMs?: number;
|
|
39
45
|
averageTimeToFirstFinalMs?: number;
|
|
40
46
|
averageTimeToFirstPartialMs?: number;
|
|
@@ -46,6 +52,19 @@ export type VoiceSTTBenchmarkSummary = {
|
|
|
46
52
|
passRate: number;
|
|
47
53
|
totalErrorCount: number;
|
|
48
54
|
wordAccuracyRate: number;
|
|
55
|
+
groupSummaries: VoiceSTTBenchmarkFixtureSummary[];
|
|
56
|
+
};
|
|
57
|
+
export type VoiceSTTBenchmarkFixtureSummary = {
|
|
58
|
+
group: VoiceSTTFixtureEnvironment;
|
|
59
|
+
fixtureCount: number;
|
|
60
|
+
fixturesWithErrors: number;
|
|
61
|
+
fixturesWithFragments: number;
|
|
62
|
+
passCount: number;
|
|
63
|
+
passRate: number;
|
|
64
|
+
wordAccuracyRate: number;
|
|
65
|
+
averageTermRecall: number;
|
|
66
|
+
averageWordErrorRate: number;
|
|
67
|
+
averageElapsedMs: number;
|
|
49
68
|
};
|
|
50
69
|
export type VoiceSTTBenchmarkReport = {
|
|
51
70
|
adapterId: string;
|
|
@@ -63,10 +82,27 @@ export type VoiceSTTBenchmarkComparison = {
|
|
|
63
82
|
bestByWordErrorRate?: VoiceSTTBenchmarkComparisonEntry;
|
|
64
83
|
entries: VoiceSTTBenchmarkComparisonEntry[];
|
|
65
84
|
};
|
|
85
|
+
export type VoiceSTTBenchmarkAcceptanceThresholds = {
|
|
86
|
+
termRecall?: number;
|
|
87
|
+
wordAccuracyRate?: number;
|
|
88
|
+
overallPassRate?: number;
|
|
89
|
+
groupPassRate?: Partial<Record<VoiceSTTFixtureEnvironment, {
|
|
90
|
+
passRate?: number;
|
|
91
|
+
wordAccuracyRate?: number;
|
|
92
|
+
}>>;
|
|
93
|
+
};
|
|
94
|
+
export type VoiceSTTBenchmarkAcceptanceResult = {
|
|
95
|
+
adapterId: string;
|
|
96
|
+
failures: string[];
|
|
97
|
+
passed: boolean;
|
|
98
|
+
score: number;
|
|
99
|
+
};
|
|
66
100
|
export type VoiceSTTBenchmarkOptions = VoiceSTTAdapterHarnessOptions & {
|
|
67
101
|
fixtureOptions?: Record<string, Omit<VoiceSTTAdapterHarnessOptions, 'fixtureOptions'>>;
|
|
68
102
|
};
|
|
103
|
+
export declare const resolveFixtureEnvironment: (fixture: Pick<VoiceTestFixture, "tags">) => VoiceSTTFixtureEnvironment;
|
|
69
104
|
export declare const summarizeSTTBenchmark: (adapterId: string, fixtures: VoiceSTTBenchmarkFixtureResult[]) => VoiceSTTBenchmarkSummary;
|
|
105
|
+
export declare const evaluateSTTBenchmarkAcceptance: (report: VoiceSTTBenchmarkReport, thresholds?: VoiceSTTBenchmarkAcceptanceThresholds) => VoiceSTTBenchmarkAcceptanceResult;
|
|
70
106
|
export declare const compareSTTBenchmarks: (reports: VoiceSTTBenchmarkReport[]) => VoiceSTTBenchmarkComparison;
|
|
71
107
|
export declare const runSTTAdapterBenchmark: ({ adapter, adapterId, fixtures, options }: {
|
|
72
108
|
adapter: STTAdapter;
|