@runtypelabs/voice 0.2.3 → 0.3.0
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 +131 -6
- package/dist/index.cjs +211 -17
- package/dist/index.d.cts +24 -2
- package/dist/index.d.ts +24 -2
- package/dist/index.js +211 -17
- package/dist/persona.cjs +272 -21
- package/dist/persona.d.cts +23 -4
- package/dist/persona.d.ts +23 -4
- package/dist/persona.js +272 -21
- package/dist/react.cjs +261 -24
- package/dist/react.d.cts +7 -4
- package/dist/react.d.ts +7 -4
- package/dist/react.js +262 -25
- package/dist/types-DaXyPeiV.d.cts +95 -0
- package/dist/types-DaXyPeiV.d.ts +95 -0
- package/package.json +9 -10
- package/dist/types-9SfA7oHc.d.cts +0 -40
- package/dist/types-9SfA7oHc.d.ts +0 -40
package/dist/types-9SfA7oHc.d.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
type VoiceStatus = 'idle' | 'connecting' | 'listening' | 'thinking' | 'speaking' | 'error';
|
|
2
|
-
type InterruptionMode = 'none' | 'cancel' | 'barge-in';
|
|
3
|
-
interface TranscriptEntry {
|
|
4
|
-
readonly role: 'user' | 'assistant';
|
|
5
|
-
readonly content: string;
|
|
6
|
-
readonly timestamp: number;
|
|
7
|
-
readonly turnId?: string;
|
|
8
|
-
}
|
|
9
|
-
interface VoiceMetrics {
|
|
10
|
-
readonly llmMs?: number;
|
|
11
|
-
readonly ttsMs?: number;
|
|
12
|
-
readonly firstAudioMs?: number;
|
|
13
|
-
readonly totalMs?: number;
|
|
14
|
-
}
|
|
15
|
-
interface VoiceSnapshot {
|
|
16
|
-
readonly status: VoiceStatus;
|
|
17
|
-
readonly transcript: readonly TranscriptEntry[];
|
|
18
|
-
readonly interimTranscript: string | null;
|
|
19
|
-
readonly metrics: VoiceMetrics | null;
|
|
20
|
-
readonly audioLevel: number;
|
|
21
|
-
readonly isMuted: boolean;
|
|
22
|
-
readonly error: string | null;
|
|
23
|
-
readonly errorDetails?: {
|
|
24
|
-
code: string;
|
|
25
|
-
serverId?: string;
|
|
26
|
-
serverName: string;
|
|
27
|
-
diagnosticId: string;
|
|
28
|
-
};
|
|
29
|
-
readonly interruptionMode: InterruptionMode;
|
|
30
|
-
readonly canCancel: boolean;
|
|
31
|
-
}
|
|
32
|
-
interface VoiceClientOptions {
|
|
33
|
-
agentId: string;
|
|
34
|
-
/** Browser client token, or a getter called once per call to obtain a fresh token. */
|
|
35
|
-
clientToken: string | (() => string | Promise<string>);
|
|
36
|
-
/** Absolute API base URL, including any proxy path prefix. Defaults to https://api.runtype.com. */
|
|
37
|
-
apiUrl?: string;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export type { InterruptionMode as I, TranscriptEntry as T, VoiceClientOptions as V, VoiceSnapshot as a, VoiceMetrics as b, VoiceStatus as c };
|