@absolutejs/voice 0.0.22-beta.310 → 0.0.22-beta.311
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/dist/index.d.ts +2 -0
- package/dist/index.js +588 -413
- package/dist/mediaPipelineRoutes.d.ts +93 -0
- package/package.json +1 -1
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { Elysia } from 'elysia';
|
|
2
|
+
import { type VoiceMediaFrame, type VoiceMediaInterruptionReport, type VoiceMediaPipelineCalibrationInput, type VoiceMediaPipelineCalibrationReport, type VoiceMediaPipelineStatus, type VoiceMediaResamplingPlan, type VoiceMediaVadReport } from './mediaPipeline';
|
|
3
|
+
export type VoiceMediaPipelineReportOptions = VoiceMediaPipelineCalibrationInput & {
|
|
4
|
+
frames?: readonly VoiceMediaFrame[];
|
|
5
|
+
maxInterruptionLatencyMs?: number;
|
|
6
|
+
maxSilenceFrames?: number;
|
|
7
|
+
minSpeechFrames?: number;
|
|
8
|
+
speechEndThreshold?: number;
|
|
9
|
+
speechStartThreshold?: number;
|
|
10
|
+
};
|
|
11
|
+
export type VoiceMediaPipelineReport = {
|
|
12
|
+
calibration: VoiceMediaPipelineCalibrationReport;
|
|
13
|
+
checkedAt: number;
|
|
14
|
+
frames: number;
|
|
15
|
+
interruption: VoiceMediaInterruptionReport;
|
|
16
|
+
ok: boolean;
|
|
17
|
+
resampling?: VoiceMediaResamplingPlan;
|
|
18
|
+
status: VoiceMediaPipelineStatus;
|
|
19
|
+
surface: string;
|
|
20
|
+
vad: VoiceMediaVadReport;
|
|
21
|
+
};
|
|
22
|
+
export type VoiceMediaPipelineAssertionInput = {
|
|
23
|
+
maxFirstAudioLatencyMs?: number;
|
|
24
|
+
maxInterruptionLatencyMs?: number;
|
|
25
|
+
minAssistantAudioFrames?: number;
|
|
26
|
+
minInputAudioFrames?: number;
|
|
27
|
+
minTraceLinkedFrames?: number;
|
|
28
|
+
minVadSegments?: number;
|
|
29
|
+
requireInterruptionFrame?: boolean;
|
|
30
|
+
requirePass?: boolean;
|
|
31
|
+
requireResamplingReady?: boolean;
|
|
32
|
+
};
|
|
33
|
+
export type VoiceMediaPipelineAssertionReport = {
|
|
34
|
+
issues: string[];
|
|
35
|
+
ok: boolean;
|
|
36
|
+
status: VoiceMediaPipelineStatus;
|
|
37
|
+
surface: string;
|
|
38
|
+
};
|
|
39
|
+
export type VoiceMediaPipelineRoutesOptions = VoiceMediaPipelineReportOptions & {
|
|
40
|
+
headers?: HeadersInit;
|
|
41
|
+
htmlPath?: false | string;
|
|
42
|
+
markdownPath?: false | string;
|
|
43
|
+
name?: string;
|
|
44
|
+
path?: string;
|
|
45
|
+
render?: (report: VoiceMediaPipelineReport) => Promise<string> | string;
|
|
46
|
+
source?: (() => Promise<VoiceMediaPipelineReportOptions> | VoiceMediaPipelineReportOptions) | VoiceMediaPipelineReportOptions;
|
|
47
|
+
title?: string;
|
|
48
|
+
};
|
|
49
|
+
export declare const buildVoiceMediaPipelineReport: (options?: VoiceMediaPipelineReportOptions) => VoiceMediaPipelineReport;
|
|
50
|
+
export declare const evaluateVoiceMediaPipelineEvidence: (report: VoiceMediaPipelineReport, input?: VoiceMediaPipelineAssertionInput) => VoiceMediaPipelineAssertionReport;
|
|
51
|
+
export declare const assertVoiceMediaPipelineEvidence: (report: VoiceMediaPipelineReport, input?: VoiceMediaPipelineAssertionInput) => VoiceMediaPipelineAssertionReport;
|
|
52
|
+
export declare const renderVoiceMediaPipelineMarkdown: (report: VoiceMediaPipelineReport) => string;
|
|
53
|
+
export declare const renderVoiceMediaPipelineHTML: (report: VoiceMediaPipelineReport, title?: string) => string;
|
|
54
|
+
export declare const createVoiceMediaPipelineRoutes: (options?: VoiceMediaPipelineRoutesOptions) => Elysia<"", {
|
|
55
|
+
decorator: {};
|
|
56
|
+
store: {};
|
|
57
|
+
derive: {};
|
|
58
|
+
resolve: {};
|
|
59
|
+
}, {
|
|
60
|
+
typebox: {};
|
|
61
|
+
error: {};
|
|
62
|
+
}, {
|
|
63
|
+
schema: {};
|
|
64
|
+
standaloneSchema: {};
|
|
65
|
+
macro: {};
|
|
66
|
+
macroFn: {};
|
|
67
|
+
parser: {};
|
|
68
|
+
response: {};
|
|
69
|
+
}, {
|
|
70
|
+
[x: string]: {
|
|
71
|
+
get: {
|
|
72
|
+
body: unknown;
|
|
73
|
+
params: {};
|
|
74
|
+
query: unknown;
|
|
75
|
+
headers: unknown;
|
|
76
|
+
response: {
|
|
77
|
+
200: Response;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
}, {
|
|
82
|
+
derive: {};
|
|
83
|
+
resolve: {};
|
|
84
|
+
schema: {};
|
|
85
|
+
standaloneSchema: {};
|
|
86
|
+
response: {};
|
|
87
|
+
}, {
|
|
88
|
+
derive: {};
|
|
89
|
+
resolve: {};
|
|
90
|
+
schema: {};
|
|
91
|
+
standaloneSchema: {};
|
|
92
|
+
response: {};
|
|
93
|
+
}>;
|