@absolutejs/voice 0.0.22-beta.301 → 0.0.22-beta.302

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.
@@ -0,0 +1,127 @@
1
+ import { Elysia } from 'elysia';
2
+ import type { AudioFormat } from './types';
3
+ export type VoiceRealtimeChannelStatus = 'fail' | 'pass' | 'warn';
4
+ export type VoiceRealtimeChannelRuntimeSample = {
5
+ format?: AudioFormat;
6
+ kind: 'assistant-audio' | 'browser-capture' | 'input-audio' | 'reconnect' | 'turn-commit';
7
+ latencyMs?: number;
8
+ ok?: boolean;
9
+ source?: string;
10
+ };
11
+ export type VoiceRealtimeChannelBrowserCapture = {
12
+ audioContextSampleRateHz?: number;
13
+ channelCount?: 1 | 2;
14
+ processorBufferSize?: number;
15
+ sampleRateHz?: number;
16
+ };
17
+ export type VoiceRealtimeChannelReportOptions = {
18
+ browserCapture?: VoiceRealtimeChannelBrowserCapture;
19
+ expectedInputFormat?: AudioFormat;
20
+ expectedOutputFormat?: AudioFormat;
21
+ inputFormat?: AudioFormat;
22
+ maxFirstAudioLatencyMs?: number;
23
+ minAssistantAudioSamples?: number;
24
+ minInputAudioSamples?: number;
25
+ operationsRecordHref?: string;
26
+ outputFormat?: AudioFormat;
27
+ provider: string;
28
+ readinessHref?: string;
29
+ runtimeSamples?: VoiceRealtimeChannelRuntimeSample[];
30
+ surface?: string;
31
+ };
32
+ export type VoiceRealtimeChannelIssue = {
33
+ code: string;
34
+ message: string;
35
+ severity: 'error' | 'warning';
36
+ };
37
+ export type VoiceRealtimeChannelReport = {
38
+ browserCapture?: VoiceRealtimeChannelBrowserCapture & {
39
+ resamplingRequired: boolean;
40
+ resamplingTargetHz?: number;
41
+ };
42
+ checkedAt: number;
43
+ inputFormat: AudioFormat;
44
+ issues: VoiceRealtimeChannelIssue[];
45
+ operationsRecordHref?: string;
46
+ outputFormat: AudioFormat;
47
+ provider: string;
48
+ readinessHref?: string;
49
+ runtime: {
50
+ assistantAudioSamples: number;
51
+ firstAudioLatencyMs?: number;
52
+ inputAudioSamples: number;
53
+ samples: VoiceRealtimeChannelRuntimeSample[];
54
+ };
55
+ status: VoiceRealtimeChannelStatus;
56
+ surface: string;
57
+ };
58
+ export type VoiceRealtimeChannelAssertionInput = {
59
+ maxFirstAudioLatencyMs?: number;
60
+ minAssistantAudioSamples?: number;
61
+ minInputAudioSamples?: number;
62
+ requireBrowserCapture?: boolean;
63
+ requireOperationsRecordHref?: boolean;
64
+ requirePass?: boolean;
65
+ requireReadinessHref?: boolean;
66
+ };
67
+ export type VoiceRealtimeChannelAssertionReport = {
68
+ issues: string[];
69
+ ok: boolean;
70
+ provider: string;
71
+ status: VoiceRealtimeChannelStatus;
72
+ surface: string;
73
+ };
74
+ export type VoiceRealtimeChannelRoutesOptions = VoiceRealtimeChannelReportOptions & {
75
+ headers?: HeadersInit;
76
+ htmlPath?: false | string;
77
+ markdownPath?: false | string;
78
+ name?: string;
79
+ path?: string;
80
+ render?: (report: VoiceRealtimeChannelReport) => Promise<string> | string;
81
+ title?: string;
82
+ };
83
+ export declare const buildVoiceRealtimeChannelReport: (options: VoiceRealtimeChannelReportOptions) => VoiceRealtimeChannelReport;
84
+ export declare const evaluateVoiceRealtimeChannelEvidence: (report: VoiceRealtimeChannelReport, input?: VoiceRealtimeChannelAssertionInput) => VoiceRealtimeChannelAssertionReport;
85
+ export declare const assertVoiceRealtimeChannelEvidence: (report: VoiceRealtimeChannelReport, input?: VoiceRealtimeChannelAssertionInput) => VoiceRealtimeChannelAssertionReport;
86
+ export declare const renderVoiceRealtimeChannelMarkdown: (report: VoiceRealtimeChannelReport) => string;
87
+ export declare const renderVoiceRealtimeChannelHTML: (report: VoiceRealtimeChannelReport, title?: string) => string;
88
+ export declare const createVoiceRealtimeChannelRoutes: (options: VoiceRealtimeChannelRoutesOptions) => Elysia<"", {
89
+ decorator: {};
90
+ store: {};
91
+ derive: {};
92
+ resolve: {};
93
+ }, {
94
+ typebox: {};
95
+ error: {};
96
+ }, {
97
+ schema: {};
98
+ standaloneSchema: {};
99
+ macro: {};
100
+ macroFn: {};
101
+ parser: {};
102
+ response: {};
103
+ }, {
104
+ [x: string]: {
105
+ get: {
106
+ body: unknown;
107
+ params: {};
108
+ query: unknown;
109
+ headers: unknown;
110
+ response: {
111
+ 200: Response;
112
+ };
113
+ };
114
+ };
115
+ }, {
116
+ derive: {};
117
+ resolve: {};
118
+ schema: {};
119
+ standaloneSchema: {};
120
+ response: {};
121
+ }, {
122
+ derive: {};
123
+ resolve: {};
124
+ schema: {};
125
+ standaloneSchema: {};
126
+ response: {};
127
+ }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@absolutejs/voice",
3
- "version": "0.0.22-beta.301",
3
+ "version": "0.0.22-beta.302",
4
4
  "description": "Voice primitives and Elysia plugin for AbsoluteJS",
5
5
  "repository": {
6
6
  "type": "git",