voice-runtime 1.1.0 → 1.2.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 +16 -9
- package/dist/index.cjs +9776 -3143
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.ts +1001 -290
- package/dist/index.js +9761 -3148
- package/dist/index.js.map +4 -4
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import WebSocket from 'ws';
|
|
1
|
+
import * as WebSocket from 'ws';
|
|
2
|
+
import WebSocket__default from 'ws';
|
|
2
3
|
import { IncomingMessage, ServerResponse } from 'node:http';
|
|
3
4
|
import { AddressInfo } from 'node:net';
|
|
4
5
|
|
|
@@ -230,6 +231,9 @@ declare class MemorySessionQuotaExceededError extends DurableError {
|
|
|
230
231
|
declare const TVIC_ERROR_CODES: Readonly<{
|
|
231
232
|
readonly providerAuthFailed: "provider.auth_failed";
|
|
232
233
|
readonly providerRateLimited: "provider.rate_limited";
|
|
234
|
+
readonly providerQuotaExceeded: "provider.quota_exceeded";
|
|
235
|
+
readonly providerTransportWriteFailed: "provider.transport_write_failed";
|
|
236
|
+
readonly providerTransportTimeout: "provider.transport_timeout";
|
|
233
237
|
readonly providerModelUnsupported: "provider.model_unsupported";
|
|
234
238
|
readonly providerVoiceUnsupported: "provider.voice_unsupported";
|
|
235
239
|
readonly providerInputRejected: "provider.input_rejected";
|
|
@@ -251,7 +255,10 @@ declare const TVIC_ERROR_CODES: Readonly<{
|
|
|
251
255
|
declare const TVIC_ERROR_CODE_ALIASES: Readonly<{
|
|
252
256
|
readonly "stt.provider.auth_failed": "provider.auth_failed";
|
|
253
257
|
readonly "stt.provider.rate_limited": "provider.rate_limited";
|
|
254
|
-
readonly "stt.provider.quota_exceeded": "provider.
|
|
258
|
+
readonly "stt.provider.quota_exceeded": "provider.quota_exceeded";
|
|
259
|
+
readonly "stt.transport.write_failed": "provider.transport_write_failed";
|
|
260
|
+
readonly "stt.send_timeout": "provider.transport_timeout";
|
|
261
|
+
readonly "stt.audio_write_timeout": "provider.transport_timeout";
|
|
255
262
|
readonly "stt.provider.invalid_request": "provider.invalid_request";
|
|
256
263
|
readonly "stt.provider.input_rejected": "provider.input_rejected";
|
|
257
264
|
readonly "stt.provider.session_expired": "provider.session_expired";
|
|
@@ -278,9 +285,11 @@ declare const PROVIDER_NAMES: {
|
|
|
278
285
|
readonly twilio: "twilio-media-streams";
|
|
279
286
|
readonly deepgram: "deepgram";
|
|
280
287
|
readonly cartesia: "cartesia";
|
|
288
|
+
readonly cartesiaStt: "cartesia-stt";
|
|
281
289
|
readonly elevenlabs: "elevenlabs";
|
|
282
290
|
readonly elevenlabsStt: "elevenlabs-stt-realtime";
|
|
283
291
|
readonly sarvam: "sarvam";
|
|
292
|
+
readonly sarvamTts: "sarvam-tts";
|
|
284
293
|
readonly assemblyaiStt: "assemblyai-stt";
|
|
285
294
|
readonly sonioxStt: "soniox-stt";
|
|
286
295
|
readonly groq: "groq-chat-completions";
|
|
@@ -294,6 +303,7 @@ declare const PROVIDER_ERROR_CODES: {
|
|
|
294
303
|
readonly elevenlabsTts: "elevenlabs.tts.error";
|
|
295
304
|
readonly elevenlabsStt: "elevenlabs.stt.error";
|
|
296
305
|
readonly sarvamStt: "sarvam.stt.error";
|
|
306
|
+
readonly sarvamTts: "sarvam.tts.error";
|
|
297
307
|
readonly assemblyaiStt: "assemblyai.stt.error";
|
|
298
308
|
readonly sonioxStt: "soniox.stt.error";
|
|
299
309
|
readonly groqChat: "groq.chat.error";
|
|
@@ -304,10 +314,12 @@ declare const PROVIDER_ERROR_CODES: {
|
|
|
304
314
|
readonly openaiHttp: "openai.http_error";
|
|
305
315
|
readonly openaiResponseFailed: "openai.response.failed";
|
|
306
316
|
readonly webClientAudio: "web_client_audio.error";
|
|
317
|
+
readonly cartesiaStt: "cartesia.stt.error";
|
|
307
318
|
};
|
|
308
319
|
/** Stable runtime taxonomy consumed by reconnect and call-failure policy. */
|
|
309
320
|
declare const STT_ERROR_CODES: {
|
|
310
|
-
readonly transportWriteFailed: "
|
|
321
|
+
readonly transportWriteFailed: "provider.transport_write_failed";
|
|
322
|
+
readonly transportTimeout: "provider.transport_timeout";
|
|
311
323
|
readonly unexpectedEof: "stt.transport.unexpected_eof";
|
|
312
324
|
readonly connectFailed: "stt.transport.connect_failed";
|
|
313
325
|
readonly connectTimeout: "stt.transport.connect_timeout";
|
|
@@ -315,13 +327,13 @@ declare const STT_ERROR_CODES: {
|
|
|
315
327
|
readonly invalidRequest: "provider.invalid_request";
|
|
316
328
|
readonly inputRejected: "provider.input_rejected";
|
|
317
329
|
readonly rateLimited: "provider.rate_limited";
|
|
318
|
-
readonly quotaExceeded: "provider.
|
|
330
|
+
readonly quotaExceeded: "provider.quota_exceeded";
|
|
319
331
|
readonly serviceUnavailable: "provider.upstream_failed";
|
|
320
332
|
readonly providerInternal: "provider.upstream_failed";
|
|
321
333
|
readonly protocolError: "provider.protocol_invalid";
|
|
322
334
|
readonly sessionExpired: "provider.session_expired";
|
|
323
335
|
readonly streamEnded: "stt.stream_ended";
|
|
324
|
-
readonly audioWriteTimeout: "
|
|
336
|
+
readonly audioWriteTimeout: "provider.transport_timeout";
|
|
325
337
|
readonly closeTimeout: "stt.close_timeout";
|
|
326
338
|
readonly bufferOverflow: "stt.reconnect.buffer_overflow";
|
|
327
339
|
readonly sessionBufferOverflow: "stt.session_buffer_overflow";
|
|
@@ -912,6 +924,12 @@ interface ProviderStreamingCapabilities {
|
|
|
912
924
|
/** Streaming is supported by the provider protocol, not emulated by chunked requests. */
|
|
913
925
|
readonly native: boolean;
|
|
914
926
|
}
|
|
927
|
+
interface ProviderBatchCapabilities {
|
|
928
|
+
/** Accepts one complete input payload instead of requiring a live stream. */
|
|
929
|
+
readonly input: boolean;
|
|
930
|
+
/** Returns one complete output payload instead of incremental events. */
|
|
931
|
+
readonly output: boolean;
|
|
932
|
+
}
|
|
915
933
|
interface ProviderCancellationCapabilities {
|
|
916
934
|
/** Active provider work can be stopped rather than merely ignored by TVIC. */
|
|
917
935
|
readonly request: boolean;
|
|
@@ -946,11 +964,13 @@ interface ProviderPlayoutCapabilities {
|
|
|
946
964
|
*/
|
|
947
965
|
interface ProviderCapabilities {
|
|
948
966
|
readonly streaming: ProviderStreamingCapabilities;
|
|
967
|
+
readonly batch?: ProviderBatchCapabilities;
|
|
949
968
|
readonly cancellation: ProviderCancellationCapabilities;
|
|
950
969
|
readonly transports: readonly ProviderTransport[];
|
|
951
970
|
readonly audio?: ProviderAudioCapabilities;
|
|
952
971
|
readonly languages?: readonly string[];
|
|
953
972
|
readonly models?: readonly string[];
|
|
973
|
+
readonly batchModels?: readonly string[];
|
|
954
974
|
readonly voices?: readonly string[];
|
|
955
975
|
readonly turnDetection?: readonly TurnDetectionMode[];
|
|
956
976
|
readonly tools?: ProviderToolCapabilities;
|
|
@@ -979,12 +999,14 @@ type RequiredProviderCapabilities<T extends object> = {
|
|
|
979
999
|
interface ProviderRequirements {
|
|
980
1000
|
readonly kind: ProviderKind;
|
|
981
1001
|
readonly streaming?: RequiredProviderCapabilities<ProviderStreamingCapabilities>;
|
|
1002
|
+
readonly batch?: RequiredProviderCapabilities<ProviderBatchCapabilities>;
|
|
982
1003
|
readonly cancellation?: RequiredProviderCapabilities<ProviderCancellationCapabilities>;
|
|
983
1004
|
readonly transport?: ProviderTransport;
|
|
984
1005
|
readonly inputFormat?: AudioFormat;
|
|
985
1006
|
readonly outputFormat?: AudioFormat;
|
|
986
1007
|
readonly language?: string;
|
|
987
1008
|
readonly model?: string;
|
|
1009
|
+
readonly batchModel?: string;
|
|
988
1010
|
readonly voice?: string;
|
|
989
1011
|
readonly turnDetection?: TurnDetectionMode;
|
|
990
1012
|
readonly functionCalling?: boolean;
|
|
@@ -994,7 +1016,7 @@ interface ProviderRequirements {
|
|
|
994
1016
|
readonly region?: string;
|
|
995
1017
|
readonly dataPolicy?: ProviderDataPolicy;
|
|
996
1018
|
}
|
|
997
|
-
type ProviderCompatibilityIssueCode = "kind.unsupported" | "streaming.unsupported" | "cancellation.unsupported" | "transport.unsupported" | "audio.input_unsupported" | "audio.output_unsupported" | "language.unsupported" | "provider.model_unsupported" | "provider.voice_unsupported" | "turn_detection.unsupported" | "tools.unsupported" | "playout.unsupported" | "call_control.unsupported" | "region.unsupported" | "data_policy.unsupported";
|
|
1019
|
+
type ProviderCompatibilityIssueCode = "kind.unsupported" | "streaming.unsupported" | "batch.unsupported" | "cancellation.unsupported" | "transport.unsupported" | "audio.input_unsupported" | "audio.output_unsupported" | "language.unsupported" | "provider.model_unsupported" | "provider.voice_unsupported" | "turn_detection.unsupported" | "tools.unsupported" | "playout.unsupported" | "call_control.unsupported" | "region.unsupported" | "data_policy.unsupported";
|
|
998
1020
|
interface ProviderCompatibilityIssue {
|
|
999
1021
|
readonly code: ProviderCompatibilityIssueCode;
|
|
1000
1022
|
readonly requirement: string;
|
|
@@ -1102,6 +1124,37 @@ interface SttOpenRequest {
|
|
|
1102
1124
|
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
1103
1125
|
readonly signal?: AbortSignal;
|
|
1104
1126
|
}
|
|
1127
|
+
type SttBatchTimestampGranularity = "word";
|
|
1128
|
+
/** A complete audio payload for a non-streaming transcription request. */
|
|
1129
|
+
interface SttBatchTranscriptionRequest {
|
|
1130
|
+
/** Container bytes, or raw bytes when `format` is supplied. */
|
|
1131
|
+
readonly audio: Uint8Array;
|
|
1132
|
+
/** Optional filename used as the multipart upload filename and format hint. */
|
|
1133
|
+
readonly fileName?: string;
|
|
1134
|
+
/** Optional MIME type for the multipart file part. */
|
|
1135
|
+
readonly mimeType?: string;
|
|
1136
|
+
/** Raw PCM format. Omit this when `audio` contains a self-describing container. */
|
|
1137
|
+
readonly format?: AudioFormat;
|
|
1138
|
+
readonly language?: string;
|
|
1139
|
+
readonly model?: string;
|
|
1140
|
+
readonly timestampGranularities?: readonly SttBatchTimestampGranularity[];
|
|
1141
|
+
readonly allowUnknownModel?: boolean;
|
|
1142
|
+
readonly signal?: AbortSignal;
|
|
1143
|
+
}
|
|
1144
|
+
interface SttBatchWord {
|
|
1145
|
+
readonly word: string;
|
|
1146
|
+
readonly startMs: number;
|
|
1147
|
+
readonly endMs: number;
|
|
1148
|
+
}
|
|
1149
|
+
/** A complete transcript returned by a batch STT provider. */
|
|
1150
|
+
interface SttBatchTranscription {
|
|
1151
|
+
readonly text: string;
|
|
1152
|
+
readonly requestId?: string;
|
|
1153
|
+
readonly language?: string;
|
|
1154
|
+
readonly durationMs?: number;
|
|
1155
|
+
readonly words?: readonly SttBatchWord[];
|
|
1156
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
1157
|
+
}
|
|
1105
1158
|
type SttCommitMode = "provider" | "none";
|
|
1106
1159
|
/**
|
|
1107
1160
|
* Origin of audio offsets emitted by an STT stream. Reconnectable streams must
|
|
@@ -1121,6 +1174,8 @@ interface SttStream {
|
|
|
1121
1174
|
interface SpeechToTextProvider extends Provider {
|
|
1122
1175
|
readonly kind: "stt";
|
|
1123
1176
|
open(request: SttOpenRequest): Promise<SttStream>;
|
|
1177
|
+
/** Optional complete-file transcription capability. */
|
|
1178
|
+
transcribe?(request: SttBatchTranscriptionRequest): Promise<SttBatchTranscription>;
|
|
1124
1179
|
}
|
|
1125
1180
|
|
|
1126
1181
|
interface TtsSessionOpenRequest {
|
|
@@ -1971,14 +2026,18 @@ declare function isTerminalTurn(turn: Turn): turn is TerminalTurn;
|
|
|
1971
2026
|
|
|
1972
2027
|
interface ProviderClock {
|
|
1973
2028
|
now(): Timestamp;
|
|
2029
|
+
/** Optional for backward-compatible injected clocks; adapters fall back to performance.now(). */
|
|
2030
|
+
monotonicNowMs?(): number;
|
|
1974
2031
|
}
|
|
1975
2032
|
|
|
2033
|
+
declare const TWILIO_MAX_AUDIO_EVENT_BYTES = 65536;
|
|
2034
|
+
|
|
1976
2035
|
interface TwilioMediaStreamSocket {
|
|
1977
2036
|
readonly readyState: number;
|
|
1978
2037
|
readonly bufferedAmount?: number;
|
|
1979
2038
|
send(data: string): void;
|
|
1980
2039
|
close(code?: number, reason?: string): void;
|
|
1981
|
-
on(event: "message", handler: (data:
|
|
2040
|
+
on(event: "message", handler: (data: WebSocket__default.RawData) => void): this;
|
|
1982
2041
|
on(event: "close", handler: () => void): this;
|
|
1983
2042
|
on(event: "error", handler: (error: Error) => void): this;
|
|
1984
2043
|
}
|
|
@@ -2052,21 +2111,23 @@ declare class TwilioMediaStreamsProvider implements TelephonyProvider {
|
|
|
2052
2111
|
declare function createTwilioMediaStreamsProvider(): TwilioMediaStreamsProvider;
|
|
2053
2112
|
|
|
2054
2113
|
declare const WEB_CLIENT_AUDIO_CLOSE_CODES: {
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2114
|
+
protocol: number;
|
|
2115
|
+
heartbeatTimeout: number;
|
|
2116
|
+
superseded: number;
|
|
2117
|
+
maxDuration: number;
|
|
2118
|
+
resourceLimit: number;
|
|
2119
|
+
operatorTerminated: number;
|
|
2061
2120
|
};
|
|
2062
2121
|
declare const WEB_CLIENT_AUDIO_DEFAULTS: {
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2122
|
+
heartbeatIntervalMs: number;
|
|
2123
|
+
heartbeatTimeoutMs: number;
|
|
2124
|
+
maxSessionDurationMs: number;
|
|
2125
|
+
maxPendingEvents: number;
|
|
2126
|
+
maxInputFramesPerSecond: number;
|
|
2127
|
+
maxPendingAcks: number;
|
|
2069
2128
|
};
|
|
2129
|
+
declare const WEB_CLIENT_AUDIO_ACK_RETENTION_MS = 60000;
|
|
2130
|
+
|
|
2070
2131
|
interface WebClientAudioSocket {
|
|
2071
2132
|
readonly readyState: number;
|
|
2072
2133
|
readonly bufferedAmount?: number;
|
|
@@ -2113,11 +2174,9 @@ interface WebClientAudioCallHandleOptions {
|
|
|
2113
2174
|
readonly onConnectionEvent?: (event: ConnectionObservabilityEvent) => void;
|
|
2114
2175
|
readonly onClosed?: () => void;
|
|
2115
2176
|
}
|
|
2116
|
-
|
|
2117
|
-
#private;
|
|
2177
|
+
interface WebClientAudioCallHandle extends CallHandle {
|
|
2118
2178
|
readonly callId: CallId;
|
|
2119
2179
|
readonly events: AsyncIterable<InboundMediaEvent>;
|
|
2120
|
-
constructor(options: WebClientAudioCallHandleOptions);
|
|
2121
2180
|
send(event: OutputMediaEvent): Promise<boolean>;
|
|
2122
2181
|
deliverText(turnId: TurnId, sequence: number, text: string): Promise<boolean>;
|
|
2123
2182
|
clear(): Promise<void>;
|
|
@@ -2125,45 +2184,16 @@ declare class WebClientAudioCallHandle implements CallHandle {
|
|
|
2125
2184
|
terminate(code: number, reason: string): void;
|
|
2126
2185
|
confirmPlayout(markId: string, timeoutMs: number): Promise<boolean>;
|
|
2127
2186
|
}
|
|
2187
|
+
declare const WebClientAudioCallHandle: {
|
|
2188
|
+
new (options: WebClientAudioCallHandleOptions): WebClientAudioCallHandle;
|
|
2189
|
+
};
|
|
2128
2190
|
interface WebClientAudioProviderOptions extends Omit<WebClientAudioCallHandleOptions, "socket" | "callId" | "sessionId" | "onClosed" | "expectedMode"> {
|
|
2129
2191
|
}
|
|
2130
|
-
|
|
2131
|
-
#private;
|
|
2192
|
+
interface WebClientAudioProvider extends TelephonyProvider {
|
|
2132
2193
|
readonly name: "web-client-audio";
|
|
2133
|
-
readonly kind
|
|
2134
|
-
readonly version
|
|
2135
|
-
readonly capabilities:
|
|
2136
|
-
streaming: {
|
|
2137
|
-
input: true;
|
|
2138
|
-
output: true;
|
|
2139
|
-
native: true;
|
|
2140
|
-
};
|
|
2141
|
-
cancellation: {
|
|
2142
|
-
request: true;
|
|
2143
|
-
output: true;
|
|
2144
|
-
buffer: true;
|
|
2145
|
-
truncation: false;
|
|
2146
|
-
};
|
|
2147
|
-
transports: "websocket"[];
|
|
2148
|
-
audio: {
|
|
2149
|
-
input: {
|
|
2150
|
-
readonly encoding: "pcm_s16le";
|
|
2151
|
-
readonly sampleRateHz: 16000;
|
|
2152
|
-
readonly channels: 1;
|
|
2153
|
-
}[];
|
|
2154
|
-
output: {
|
|
2155
|
-
readonly encoding: "pcm_s16le";
|
|
2156
|
-
readonly sampleRateHz: 16000;
|
|
2157
|
-
readonly channels: 1;
|
|
2158
|
-
}[];
|
|
2159
|
-
};
|
|
2160
|
-
playout: {
|
|
2161
|
-
clearBuffer: true;
|
|
2162
|
-
acknowledgement: true;
|
|
2163
|
-
position: false;
|
|
2164
|
-
};
|
|
2165
|
-
};
|
|
2166
|
-
constructor(options?: WebClientAudioProviderOptions);
|
|
2194
|
+
readonly kind: "telephony";
|
|
2195
|
+
readonly version: "0.1.0";
|
|
2196
|
+
readonly capabilities: ProviderCapabilities;
|
|
2167
2197
|
dial(): Promise<CallHandle>;
|
|
2168
2198
|
accept(ctx: Parameters<TelephonyProvider["accept"]>[0]): Promise<CallHandle>;
|
|
2169
2199
|
attachWebSocket(socket: WebClientAudioSocket, callId: CallId, sessionId: SessionId): void;
|
|
@@ -2173,6 +2203,9 @@ declare class WebClientAudioProvider implements TelephonyProvider {
|
|
|
2173
2203
|
hangup(callId: CallId): Promise<void>;
|
|
2174
2204
|
supersede(callId: CallId): Promise<void>;
|
|
2175
2205
|
}
|
|
2206
|
+
declare const WebClientAudioProvider: {
|
|
2207
|
+
new (options?: WebClientAudioProviderOptions): WebClientAudioProvider;
|
|
2208
|
+
};
|
|
2176
2209
|
declare function createWebClientAudioProvider(options?: WebClientAudioProviderOptions): WebClientAudioProvider;
|
|
2177
2210
|
|
|
2178
2211
|
interface DeepgramSttProviderOptions {
|
|
@@ -2183,8 +2216,9 @@ interface DeepgramSttProviderOptions {
|
|
|
2183
2216
|
readonly endpointingMs?: number;
|
|
2184
2217
|
readonly vadEvents?: boolean;
|
|
2185
2218
|
readonly punctuate?: boolean;
|
|
2186
|
-
readonly webSocketFactory?: (url: string, headers: Readonly<Record<string, string>>) =>
|
|
2219
|
+
readonly webSocketFactory?: (url: string, headers: Readonly<Record<string, string>>) => WebSocket__default;
|
|
2187
2220
|
}
|
|
2221
|
+
declare const MAX_PROVIDER_AUDIO_OFFSET_MS = 86400000;
|
|
2188
2222
|
declare class DeepgramSttProvider implements SpeechToTextProvider {
|
|
2189
2223
|
#private;
|
|
2190
2224
|
readonly name: "deepgram";
|
|
@@ -2219,6 +2253,72 @@ declare class DeepgramSttProvider implements SpeechToTextProvider {
|
|
|
2219
2253
|
}
|
|
2220
2254
|
declare function createDeepgramSttProvider(options: DeepgramSttProviderOptions): DeepgramSttProvider;
|
|
2221
2255
|
|
|
2256
|
+
type CartesiaSttMode = "manual" | "auto";
|
|
2257
|
+
interface CartesiaSttProviderOptions {
|
|
2258
|
+
readonly apiKey: string;
|
|
2259
|
+
readonly url?: string;
|
|
2260
|
+
readonly batchUrl?: string;
|
|
2261
|
+
readonly modelId?: string;
|
|
2262
|
+
readonly batchModelId?: string;
|
|
2263
|
+
readonly allowUnknownModel?: boolean;
|
|
2264
|
+
/** `manual` uses `/stt/websocket`; `auto` uses Ink's native turn detector. */
|
|
2265
|
+
readonly mode?: CartesiaSttMode;
|
|
2266
|
+
/** Used when a session request does not provide a language. Ink 2 can auto-detect. */
|
|
2267
|
+
readonly language?: string;
|
|
2268
|
+
readonly turnStartThreshold?: number;
|
|
2269
|
+
readonly turnEagerEndThreshold?: number;
|
|
2270
|
+
readonly turnEndThreshold?: number;
|
|
2271
|
+
readonly turnEndTimeoutMs?: number;
|
|
2272
|
+
readonly clock?: ProviderClock;
|
|
2273
|
+
readonly fetchImpl?: typeof fetch;
|
|
2274
|
+
readonly webSocketFactory?: (url: string, headers: Readonly<Record<string, string>>) => WebSocket__default;
|
|
2275
|
+
}
|
|
2276
|
+
declare class CartesiaSttProvider implements SpeechToTextProvider {
|
|
2277
|
+
#private;
|
|
2278
|
+
readonly name: "cartesia-stt";
|
|
2279
|
+
readonly kind = "stt";
|
|
2280
|
+
readonly version = "0.1.0";
|
|
2281
|
+
readonly capabilities: {
|
|
2282
|
+
streaming: {
|
|
2283
|
+
input: true;
|
|
2284
|
+
output: true;
|
|
2285
|
+
native: true;
|
|
2286
|
+
};
|
|
2287
|
+
batch: {
|
|
2288
|
+
input: true;
|
|
2289
|
+
output: true;
|
|
2290
|
+
};
|
|
2291
|
+
cancellation: {
|
|
2292
|
+
request: true;
|
|
2293
|
+
output: false;
|
|
2294
|
+
buffer: false;
|
|
2295
|
+
truncation: false;
|
|
2296
|
+
};
|
|
2297
|
+
transports: ("http" | "websocket")[];
|
|
2298
|
+
audio: {
|
|
2299
|
+
input: {
|
|
2300
|
+
readonly encoding: "pcm_s16le";
|
|
2301
|
+
readonly sampleRateHz: 16000;
|
|
2302
|
+
readonly channels: 1;
|
|
2303
|
+
}[];
|
|
2304
|
+
};
|
|
2305
|
+
models: readonly ["ink-2", "ink-preview", "ink-whisper-2025-06-04"];
|
|
2306
|
+
batchModels: readonly ["ink-whisper"];
|
|
2307
|
+
turnDetection: ("manual" | "provider")[];
|
|
2308
|
+
metadata: {
|
|
2309
|
+
realtimeModels: string[];
|
|
2310
|
+
autoTurnModels: string[];
|
|
2311
|
+
batchModels: string[];
|
|
2312
|
+
partialTranscripts: boolean;
|
|
2313
|
+
manualFinalize: boolean;
|
|
2314
|
+
};
|
|
2315
|
+
};
|
|
2316
|
+
constructor(options: CartesiaSttProviderOptions);
|
|
2317
|
+
open(request: SttOpenRequest): Promise<SttStream>;
|
|
2318
|
+
transcribe(request: SttBatchTranscriptionRequest): Promise<SttBatchTranscription>;
|
|
2319
|
+
}
|
|
2320
|
+
declare function createCartesiaSttProvider(options: CartesiaSttProviderOptions): CartesiaSttProvider;
|
|
2321
|
+
|
|
2222
2322
|
type SarvamOutputMode = "transcribe" | "translate" | "verbatim" | "translit" | "codemix";
|
|
2223
2323
|
interface SarvamSttProviderOptions {
|
|
2224
2324
|
readonly apiKey: string;
|
|
@@ -2230,7 +2330,7 @@ interface SarvamSttProviderOptions {
|
|
|
2230
2330
|
readonly flushSignal?: boolean;
|
|
2231
2331
|
readonly inputAudioCodec?: "pcm_s16le" | "pcm_l16" | "pcm_raw";
|
|
2232
2332
|
readonly clock?: ProviderClock;
|
|
2233
|
-
readonly webSocketFactory?: (url: string, headers: Readonly<Record<string, string>>) =>
|
|
2333
|
+
readonly webSocketFactory?: (url: string, headers: Readonly<Record<string, string>>) => WebSocket__default;
|
|
2234
2334
|
}
|
|
2235
2335
|
declare class SarvamSttProvider implements SpeechToTextProvider {
|
|
2236
2336
|
#private;
|
|
@@ -2263,7 +2363,7 @@ declare class SarvamSttProvider implements SpeechToTextProvider {
|
|
|
2263
2363
|
})[];
|
|
2264
2364
|
};
|
|
2265
2365
|
models: readonly ["saaras:v3", "saaras:v4"];
|
|
2266
|
-
turnDetection: ("
|
|
2366
|
+
turnDetection: ("manual" | "vad")[];
|
|
2267
2367
|
metadata: {
|
|
2268
2368
|
interimResults: boolean;
|
|
2269
2369
|
outputModes: string[];
|
|
@@ -2274,24 +2374,39 @@ declare class SarvamSttProvider implements SpeechToTextProvider {
|
|
|
2274
2374
|
}
|
|
2275
2375
|
declare function createSarvamSttProvider(options: SarvamSttProviderOptions): SarvamSttProvider;
|
|
2276
2376
|
|
|
2277
|
-
|
|
2278
|
-
interface ElevenLabsSttProviderOptions {
|
|
2377
|
+
interface SarvamTtsProviderOptions {
|
|
2279
2378
|
readonly apiKey: string;
|
|
2280
2379
|
readonly url?: string;
|
|
2281
|
-
readonly
|
|
2380
|
+
readonly voiceId?: string;
|
|
2282
2381
|
readonly modelId?: string;
|
|
2283
|
-
readonly
|
|
2284
|
-
|
|
2285
|
-
readonly
|
|
2286
|
-
|
|
2287
|
-
readonly
|
|
2382
|
+
readonly language?: string;
|
|
2383
|
+
/** Provider pace. Sarvam v3 accepts 0.5 through 2.0. */
|
|
2384
|
+
readonly pace?: number;
|
|
2385
|
+
/** Provider temperature. Sarvam's streaming schema accepts 0.01 through 1.0. */
|
|
2386
|
+
readonly temperature?: number;
|
|
2387
|
+
readonly minBufferSize?: number;
|
|
2388
|
+
readonly maxChunkLength?: number;
|
|
2389
|
+
readonly pronunciationDictionaryId?: string;
|
|
2390
|
+
readonly keepAliveIntervalMs?: number;
|
|
2288
2391
|
readonly clock?: ProviderClock;
|
|
2289
|
-
readonly webSocketFactory?: (url: string, headers: Readonly<Record<string, string>>) =>
|
|
2392
|
+
readonly webSocketFactory?: (url: string, headers: Readonly<Record<string, string>>) => WebSocket__default;
|
|
2290
2393
|
}
|
|
2291
|
-
|
|
2394
|
+
interface SarvamTtsStreamOptions {
|
|
2395
|
+
readonly clock: ProviderClock;
|
|
2396
|
+
readonly model: string;
|
|
2397
|
+
readonly language: string;
|
|
2398
|
+
readonly voice: string;
|
|
2399
|
+
readonly pace: number;
|
|
2400
|
+
readonly temperature: number;
|
|
2401
|
+
readonly minBufferSize: number;
|
|
2402
|
+
readonly maxChunkLength: number;
|
|
2403
|
+
readonly pronunciationDictionaryId?: string;
|
|
2404
|
+
readonly keepAliveIntervalMs: number;
|
|
2405
|
+
}
|
|
2406
|
+
declare class SarvamTtsProvider implements IncrementalTextToSpeechProvider {
|
|
2292
2407
|
#private;
|
|
2293
|
-
readonly name: "
|
|
2294
|
-
readonly kind = "
|
|
2408
|
+
readonly name: "sarvam-tts";
|
|
2409
|
+
readonly kind = "tts";
|
|
2295
2410
|
readonly version = "0.1.0";
|
|
2296
2411
|
readonly capabilities: {
|
|
2297
2412
|
streaming: {
|
|
@@ -2307,67 +2422,62 @@ declare class ElevenLabsSttProvider implements SpeechToTextProvider {
|
|
|
2307
2422
|
};
|
|
2308
2423
|
transports: "websocket"[];
|
|
2309
2424
|
audio: {
|
|
2310
|
-
|
|
2311
|
-
readonly encoding: "pcm_s16le";
|
|
2312
|
-
readonly sampleRateHz: 8000;
|
|
2313
|
-
readonly channels: 1;
|
|
2314
|
-
}, {
|
|
2425
|
+
output: {
|
|
2315
2426
|
readonly encoding: "pcm_s16le";
|
|
2316
2427
|
readonly sampleRateHz: 16000;
|
|
2317
2428
|
readonly channels: 1;
|
|
2318
|
-
}
|
|
2319
|
-
readonly encoding: "pcm_s16le";
|
|
2320
|
-
readonly sampleRateHz: 22050;
|
|
2321
|
-
readonly channels: 1;
|
|
2322
|
-
}, {
|
|
2323
|
-
readonly encoding: "pcm_s16le";
|
|
2324
|
-
readonly sampleRateHz: 24000;
|
|
2325
|
-
readonly channels: 1;
|
|
2326
|
-
}, {
|
|
2327
|
-
readonly encoding: "pcm_s16le";
|
|
2328
|
-
readonly sampleRateHz: 44100;
|
|
2329
|
-
readonly channels: 1;
|
|
2330
|
-
}, {
|
|
2331
|
-
readonly encoding: "pcm_s16le";
|
|
2332
|
-
readonly sampleRateHz: 48000;
|
|
2333
|
-
readonly channels: 1;
|
|
2334
|
-
}];
|
|
2429
|
+
}[];
|
|
2335
2430
|
};
|
|
2336
|
-
|
|
2337
|
-
|
|
2431
|
+
languages: readonly ["hi-IN", "bn-IN", "ta-IN", "te-IN", "gu-IN", "kn-IN", "ml-IN", "mr-IN", "pa-IN", "od-IN", "en-IN"];
|
|
2432
|
+
models: readonly ["bulbul:v3"];
|
|
2433
|
+
voices: readonly ["shubh", "aditya", "ritu", "priya", "neha", "rahul", "pooja", "rohan", "simran", "kavya", "amit", "dev", "ishita", "shreya", "ratan", "varun", "manan", "sumit", "roopa", "kabir", "aayan", "ashutosh", "advait", "anand", "tanya", "tarun", "sunny", "mani", "gokul", "vijay", "shruti", "suhani", "mohit", "kavitha", "rehan", "soham", "rupali"];
|
|
2338
2434
|
metadata: {
|
|
2339
|
-
|
|
2340
|
-
|
|
2435
|
+
outputAudioCodec: string;
|
|
2436
|
+
outputSampleRateHz: number;
|
|
2437
|
+
completionEvent: string;
|
|
2341
2438
|
};
|
|
2342
2439
|
};
|
|
2343
|
-
constructor(options:
|
|
2344
|
-
|
|
2440
|
+
constructor(options: SarvamTtsProviderOptions);
|
|
2441
|
+
synthesize(request: TtsSynthesisRequest): Promise<TtsStream>;
|
|
2442
|
+
openSession(request: TtsSessionOpenRequest): Promise<SarvamTtsStream>;
|
|
2345
2443
|
}
|
|
2346
|
-
declare
|
|
2444
|
+
declare class SarvamTtsStream implements TtsSession {
|
|
2445
|
+
#private;
|
|
2446
|
+
readonly events: AsyncIterable<TtsEvent>;
|
|
2447
|
+
constructor(socket: WebSocket__default, request: TtsSessionOpenRequest, options: SarvamTtsStreamOptions);
|
|
2448
|
+
sendText(text: string): Promise<void>;
|
|
2449
|
+
flush(): Promise<TtsFlushResult>;
|
|
2450
|
+
finish(): Promise<void>;
|
|
2451
|
+
keepAlive(): Promise<void>;
|
|
2452
|
+
cancel(): Promise<void>;
|
|
2453
|
+
}
|
|
2454
|
+
declare function createSarvamTtsProvider(options: SarvamTtsProviderOptions): SarvamTtsProvider;
|
|
2347
2455
|
|
|
2348
|
-
interface
|
|
2456
|
+
interface SarvamTtsHttpProviderOptions {
|
|
2349
2457
|
readonly apiKey: string;
|
|
2350
2458
|
readonly url?: string;
|
|
2459
|
+
readonly voiceId?: string;
|
|
2351
2460
|
readonly modelId?: string;
|
|
2352
|
-
readonly
|
|
2353
|
-
|
|
2354
|
-
readonly
|
|
2355
|
-
|
|
2356
|
-
readonly
|
|
2357
|
-
readonly
|
|
2461
|
+
readonly language?: string;
|
|
2462
|
+
/** Provider pace. Sarvam Bulbul v3 accepts 0.5 through 2.0. */
|
|
2463
|
+
readonly pace?: number;
|
|
2464
|
+
/** Provider temperature. Sarvam Bulbul v3 accepts 0.01 through 1.0. */
|
|
2465
|
+
readonly temperature?: number;
|
|
2466
|
+
readonly pronunciationDictionaryId?: string;
|
|
2358
2467
|
readonly clock?: ProviderClock;
|
|
2359
|
-
|
|
2468
|
+
/** Injectable fetch makes protocol and failure tests hermetic. */
|
|
2469
|
+
readonly fetchImpl?: typeof fetch;
|
|
2360
2470
|
}
|
|
2361
|
-
declare class
|
|
2471
|
+
declare class SarvamTtsRestProvider implements TextToSpeechProvider {
|
|
2362
2472
|
#private;
|
|
2363
|
-
readonly name: "
|
|
2364
|
-
readonly kind = "
|
|
2473
|
+
readonly name: "sarvam-tts";
|
|
2474
|
+
readonly kind = "tts";
|
|
2365
2475
|
readonly version = "0.1.0";
|
|
2366
2476
|
readonly capabilities: {
|
|
2367
2477
|
streaming: {
|
|
2368
|
-
input:
|
|
2369
|
-
output:
|
|
2370
|
-
native:
|
|
2478
|
+
input: false;
|
|
2479
|
+
output: false;
|
|
2480
|
+
native: false;
|
|
2371
2481
|
};
|
|
2372
2482
|
cancellation: {
|
|
2373
2483
|
request: true;
|
|
@@ -2375,204 +2485,186 @@ declare class AssemblyAiSttProvider implements SpeechToTextProvider {
|
|
|
2375
2485
|
buffer: false;
|
|
2376
2486
|
truncation: false;
|
|
2377
2487
|
};
|
|
2378
|
-
transports: "
|
|
2488
|
+
transports: "http"[];
|
|
2379
2489
|
audio: {
|
|
2380
|
-
|
|
2490
|
+
output: {
|
|
2381
2491
|
readonly encoding: "pcm_s16le";
|
|
2382
2492
|
readonly sampleRateHz: 16000;
|
|
2383
2493
|
readonly channels: 1;
|
|
2384
2494
|
}[];
|
|
2385
2495
|
};
|
|
2386
|
-
|
|
2387
|
-
|
|
2496
|
+
languages: readonly ["hi-IN", "bn-IN", "ta-IN", "te-IN", "gu-IN", "kn-IN", "ml-IN", "mr-IN", "pa-IN", "od-IN", "en-IN"];
|
|
2497
|
+
models: readonly ["bulbul:v3"];
|
|
2498
|
+
voices: readonly ["shubh", "aditya", "ritu", "priya", "neha", "rahul", "pooja", "rohan", "simran", "kavya", "amit", "dev", "ishita", "shreya", "ratan", "varun", "manan", "sumit", "roopa", "kabir", "aayan", "ashutosh", "advait", "anand", "tanya", "tarun", "sunny", "mani", "gokul", "vijay", "shruti", "suhani", "mohit", "kavitha", "rehan", "soham", "rupali"];
|
|
2388
2499
|
metadata: {
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2500
|
+
transport: string;
|
|
2501
|
+
endpoint: string;
|
|
2502
|
+
requestTextLimit: number;
|
|
2503
|
+
wireOutputCodec: string;
|
|
2504
|
+
normalizedOutput: string;
|
|
2505
|
+
documentation: string;
|
|
2392
2506
|
};
|
|
2393
2507
|
};
|
|
2394
|
-
constructor(options:
|
|
2395
|
-
|
|
2396
|
-
}
|
|
2397
|
-
declare function createAssemblyAiSttProvider(options: AssemblyAiSttProviderOptions): AssemblyAiSttProvider;
|
|
2398
|
-
|
|
2399
|
-
interface SonioxStructuredContext {
|
|
2400
|
-
readonly general?: readonly Readonly<{
|
|
2401
|
-
key: string;
|
|
2402
|
-
value: string;
|
|
2403
|
-
}>[];
|
|
2404
|
-
readonly text?: string;
|
|
2405
|
-
readonly terms?: readonly string[];
|
|
2406
|
-
}
|
|
2407
|
-
interface SonioxSttProviderOptions {
|
|
2408
|
-
readonly apiKey: string;
|
|
2409
|
-
readonly url?: string;
|
|
2410
|
-
readonly modelId?: string;
|
|
2411
|
-
readonly allowUnknownModel?: boolean;
|
|
2412
|
-
readonly context?: SonioxStructuredContext;
|
|
2413
|
-
readonly enableEndpointDetection?: boolean;
|
|
2414
|
-
readonly maxEndpointDelayMs?: number;
|
|
2415
|
-
readonly endpointSensitivity?: number;
|
|
2416
|
-
readonly endpointLatencyAdjustmentLevel?: number;
|
|
2417
|
-
readonly enableLanguageIdentification?: boolean;
|
|
2418
|
-
readonly clock?: ProviderClock;
|
|
2419
|
-
readonly webSocketFactory?: (url: string, headers: Readonly<Record<string, string>>) => WebSocket;
|
|
2508
|
+
constructor(options: SarvamTtsHttpProviderOptions);
|
|
2509
|
+
synthesize(request: TtsSynthesisRequest): Promise<TtsStream>;
|
|
2420
2510
|
}
|
|
2421
|
-
declare class
|
|
2511
|
+
declare class SarvamTtsHttpStreamProvider implements TextToSpeechProvider {
|
|
2422
2512
|
#private;
|
|
2423
|
-
readonly name: "
|
|
2424
|
-
readonly kind = "
|
|
2513
|
+
readonly name: "sarvam-tts";
|
|
2514
|
+
readonly kind = "tts";
|
|
2425
2515
|
readonly version = "0.1.0";
|
|
2426
2516
|
readonly capabilities: {
|
|
2427
2517
|
streaming: {
|
|
2428
|
-
input:
|
|
2518
|
+
input: false;
|
|
2429
2519
|
output: true;
|
|
2430
2520
|
native: true;
|
|
2431
2521
|
};
|
|
2432
2522
|
cancellation: {
|
|
2433
2523
|
request: true;
|
|
2434
|
-
output:
|
|
2524
|
+
output: true;
|
|
2435
2525
|
buffer: false;
|
|
2436
2526
|
truncation: false;
|
|
2437
2527
|
};
|
|
2438
|
-
transports: "
|
|
2528
|
+
transports: "http"[];
|
|
2439
2529
|
audio: {
|
|
2440
|
-
|
|
2441
|
-
readonly encoding: "pcm_s16le";
|
|
2442
|
-
readonly sampleRateHz: 8000;
|
|
2443
|
-
readonly channels: 1;
|
|
2444
|
-
}, {
|
|
2530
|
+
output: {
|
|
2445
2531
|
readonly encoding: "pcm_s16le";
|
|
2446
2532
|
readonly sampleRateHz: 16000;
|
|
2447
2533
|
readonly channels: 1;
|
|
2448
|
-
}];
|
|
2534
|
+
}[];
|
|
2449
2535
|
};
|
|
2450
|
-
|
|
2451
|
-
|
|
2536
|
+
languages: readonly ["hi-IN", "bn-IN", "ta-IN", "te-IN", "gu-IN", "kn-IN", "ml-IN", "mr-IN", "pa-IN", "od-IN", "en-IN"];
|
|
2537
|
+
models: readonly ["bulbul:v3"];
|
|
2538
|
+
voices: readonly ["shubh", "aditya", "ritu", "priya", "neha", "rahul", "pooja", "rohan", "simran", "kavya", "amit", "dev", "ishita", "shreya", "ratan", "varun", "manan", "sumit", "roopa", "kabir", "aayan", "ashutosh", "advait", "anand", "tanya", "tarun", "sunny", "mani", "gokul", "vijay", "shruti", "suhani", "mohit", "kavitha", "rehan", "soham", "rupali"];
|
|
2452
2539
|
metadata: {
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2540
|
+
transport: string;
|
|
2541
|
+
endpoint: string;
|
|
2542
|
+
requestTextLimit: number;
|
|
2543
|
+
wireOutputCodec: string;
|
|
2544
|
+
normalizedOutput: string;
|
|
2545
|
+
documentation: string;
|
|
2456
2546
|
};
|
|
2457
2547
|
};
|
|
2458
|
-
constructor(options:
|
|
2459
|
-
|
|
2548
|
+
constructor(options: SarvamTtsHttpProviderOptions);
|
|
2549
|
+
synthesize(request: TtsSynthesisRequest): Promise<TtsStream>;
|
|
2460
2550
|
}
|
|
2461
|
-
declare function
|
|
2551
|
+
declare function createSarvamTtsRestProvider(options: SarvamTtsHttpProviderOptions): SarvamTtsRestProvider;
|
|
2552
|
+
declare function createSarvamTtsHttpStreamProvider(options: SarvamTtsHttpProviderOptions): SarvamTtsHttpStreamProvider;
|
|
2462
2553
|
|
|
2463
|
-
|
|
2554
|
+
type ElevenLabsBatchTimestampGranularity = "none" | "word" | "character";
|
|
2555
|
+
type ElevenLabsEntityDetection = string | readonly string[];
|
|
2556
|
+
interface ElevenLabsBatchSttRequest {
|
|
2557
|
+
readonly audio: Uint8Array;
|
|
2558
|
+
readonly format: AudioFormat;
|
|
2559
|
+
readonly model?: string;
|
|
2560
|
+
readonly language?: string;
|
|
2561
|
+
readonly keyterms?: readonly string[];
|
|
2562
|
+
readonly tagAudioEvents?: boolean;
|
|
2563
|
+
readonly diarize?: boolean;
|
|
2564
|
+
readonly numSpeakers?: number;
|
|
2565
|
+
readonly timestampsGranularity?: ElevenLabsBatchTimestampGranularity;
|
|
2566
|
+
readonly diarizationThreshold?: number;
|
|
2567
|
+
readonly entityDetection?: ElevenLabsEntityDetection;
|
|
2568
|
+
readonly noVerbatim?: boolean;
|
|
2569
|
+
readonly signal?: AbortSignal;
|
|
2570
|
+
}
|
|
2571
|
+
interface ElevenLabsBatchSttResult {
|
|
2572
|
+
readonly modelId: string;
|
|
2573
|
+
readonly text: string;
|
|
2574
|
+
readonly languageCode?: string;
|
|
2575
|
+
readonly languageProbability?: number;
|
|
2576
|
+
readonly words: readonly Readonly<Record<string, unknown>>[];
|
|
2577
|
+
readonly entities?: readonly Readonly<Record<string, unknown>>[];
|
|
2578
|
+
}
|
|
2579
|
+
|
|
2580
|
+
type ElevenLabsSttCommitStrategy = "manual" | "vad";
|
|
2581
|
+
|
|
2582
|
+
interface ElevenLabsSttProviderOptions {
|
|
2464
2583
|
readonly apiKey: string;
|
|
2465
2584
|
readonly url?: string;
|
|
2585
|
+
readonly batchUrl?: string;
|
|
2586
|
+
readonly allowUnknownModel?: boolean;
|
|
2587
|
+
readonly modelId?: string;
|
|
2588
|
+
readonly commitStrategy?: ElevenLabsSttCommitStrategy;
|
|
2589
|
+
readonly includeTimestamps?: boolean;
|
|
2590
|
+
readonly includeLanguageDetection?: boolean;
|
|
2591
|
+
readonly vadThreshold?: number;
|
|
2592
|
+
readonly vadSilenceThresholdSecs?: number;
|
|
2593
|
+
readonly secondaryLanguages?: readonly string[];
|
|
2594
|
+
readonly minSpeechDurationMs?: number;
|
|
2595
|
+
readonly minSilenceDurationMs?: number;
|
|
2596
|
+
readonly noVerbatim?: boolean;
|
|
2597
|
+
/** Detect bounded entity records on committed realtime transcript segments. */
|
|
2598
|
+
readonly entityDetection?: ElevenLabsEntityDetection;
|
|
2599
|
+
readonly filterBackgroundAudio?: boolean;
|
|
2600
|
+
readonly enableLogging?: boolean;
|
|
2601
|
+
/** Context sent with the first audio frame; useful after reconnects. */
|
|
2602
|
+
readonly previousText?: string;
|
|
2466
2603
|
readonly clock?: ProviderClock;
|
|
2604
|
+
readonly fetchImpl?: typeof fetch;
|
|
2605
|
+
readonly webSocketFactory?: (url: string, headers: Readonly<Record<string, string>>) => WebSocket__default;
|
|
2467
2606
|
}
|
|
2468
|
-
declare class
|
|
2607
|
+
declare class ElevenLabsSttProvider implements SpeechToTextProvider {
|
|
2469
2608
|
#private;
|
|
2470
|
-
readonly name: "
|
|
2471
|
-
readonly kind = "
|
|
2609
|
+
readonly name: "elevenlabs-stt-realtime";
|
|
2610
|
+
readonly kind = "stt";
|
|
2472
2611
|
readonly version = "0.1.0";
|
|
2473
2612
|
readonly capabilities: {
|
|
2474
2613
|
streaming: {
|
|
2475
|
-
input:
|
|
2614
|
+
input: true;
|
|
2476
2615
|
output: true;
|
|
2477
2616
|
native: true;
|
|
2478
2617
|
};
|
|
2479
2618
|
cancellation: {
|
|
2480
2619
|
request: true;
|
|
2481
|
-
output:
|
|
2620
|
+
output: false;
|
|
2482
2621
|
buffer: false;
|
|
2483
2622
|
truncation: false;
|
|
2484
2623
|
};
|
|
2485
|
-
transports: ("http" | "
|
|
2486
|
-
models: readonly ["gpt-5", "gpt-5-mini", "gpt-4.1", "gpt-4.1-mini"];
|
|
2487
|
-
tools: {
|
|
2488
|
-
functionCalling: true;
|
|
2489
|
-
parallelCalls: true;
|
|
2490
|
-
};
|
|
2491
|
-
};
|
|
2492
|
-
constructor(options: OpenAiResponsesLlmProviderOptions);
|
|
2493
|
-
complete(request: LlmCompletionRequest): Promise<LlmCompletion>;
|
|
2494
|
-
}
|
|
2495
|
-
declare function createOpenAiResponsesLlmProvider(options: OpenAiResponsesLlmProviderOptions): OpenAiResponsesLlmProvider;
|
|
2496
|
-
|
|
2497
|
-
interface GroqChatLlmProviderOptions {
|
|
2498
|
-
readonly apiKey: string;
|
|
2499
|
-
readonly url?: string;
|
|
2500
|
-
/** Allows an explicitly configured compatible endpoint/model outside the dated catalog. */
|
|
2501
|
-
readonly allowUnknownModel?: boolean;
|
|
2502
|
-
readonly clock?: ProviderClock;
|
|
2503
|
-
}
|
|
2504
|
-
declare class GroqChatLlmProvider implements LLMProvider {
|
|
2505
|
-
#private;
|
|
2506
|
-
readonly name: "groq-chat-completions";
|
|
2507
|
-
readonly kind = "llm";
|
|
2508
|
-
readonly version = "0.1.0";
|
|
2509
|
-
readonly capabilities: {
|
|
2510
|
-
streaming: {
|
|
2511
|
-
input: false;
|
|
2512
|
-
output: true;
|
|
2513
|
-
native: true;
|
|
2514
|
-
};
|
|
2515
|
-
cancellation: {
|
|
2516
|
-
request: true;
|
|
2517
|
-
output: true;
|
|
2518
|
-
buffer: false;
|
|
2519
|
-
truncation: false;
|
|
2520
|
-
};
|
|
2521
|
-
transports: ("http" | "sse")[];
|
|
2522
|
-
models: readonly ["openai/gpt-oss-20b", "openai/gpt-oss-120b"];
|
|
2523
|
-
tools: {
|
|
2524
|
-
functionCalling: true;
|
|
2525
|
-
parallelCalls: false;
|
|
2526
|
-
};
|
|
2527
|
-
};
|
|
2528
|
-
constructor(options: GroqChatLlmProviderOptions);
|
|
2529
|
-
complete(request: LlmCompletionRequest): Promise<LlmCompletion>;
|
|
2530
|
-
}
|
|
2531
|
-
declare function createGroqChatLlmProvider(options: GroqChatLlmProviderOptions): GroqChatLlmProvider;
|
|
2532
|
-
|
|
2533
|
-
interface CartesiaTtsProviderOptions {
|
|
2534
|
-
readonly apiKey: string;
|
|
2535
|
-
readonly url?: string;
|
|
2536
|
-
readonly voiceId: string;
|
|
2537
|
-
readonly modelId?: string;
|
|
2538
|
-
/** Allows an explicitly configured compatible endpoint/model outside the dated catalog. */
|
|
2539
|
-
readonly allowUnknownModel?: boolean;
|
|
2540
|
-
readonly language?: string;
|
|
2541
|
-
readonly clock?: ProviderClock;
|
|
2542
|
-
readonly webSocketFactory?: (url: string, headers: Readonly<Record<string, string>>) => WebSocket;
|
|
2543
|
-
}
|
|
2544
|
-
declare class CartesiaTtsProvider implements IncrementalTextToSpeechProvider {
|
|
2545
|
-
#private;
|
|
2546
|
-
readonly name: "cartesia";
|
|
2547
|
-
readonly kind = "tts";
|
|
2548
|
-
readonly version = "0.1.0";
|
|
2549
|
-
readonly capabilities: {
|
|
2550
|
-
streaming: {
|
|
2551
|
-
input: true;
|
|
2552
|
-
output: true;
|
|
2553
|
-
native: true;
|
|
2554
|
-
};
|
|
2555
|
-
cancellation: {
|
|
2556
|
-
request: true;
|
|
2557
|
-
output: false;
|
|
2558
|
-
buffer: false;
|
|
2559
|
-
truncation: false;
|
|
2560
|
-
};
|
|
2561
|
-
transports: "websocket"[];
|
|
2624
|
+
transports: ("http" | "websocket")[];
|
|
2562
2625
|
audio: {
|
|
2563
|
-
|
|
2626
|
+
input: readonly [{
|
|
2627
|
+
readonly encoding: "pcm_s16le";
|
|
2628
|
+
readonly sampleRateHz: 8000;
|
|
2629
|
+
readonly channels: 1;
|
|
2630
|
+
}, {
|
|
2564
2631
|
readonly encoding: "pcm_s16le";
|
|
2565
2632
|
readonly sampleRateHz: 16000;
|
|
2566
2633
|
readonly channels: 1;
|
|
2567
|
-
}
|
|
2634
|
+
}, {
|
|
2635
|
+
readonly encoding: "pcm_s16le";
|
|
2636
|
+
readonly sampleRateHz: 22050;
|
|
2637
|
+
readonly channels: 1;
|
|
2638
|
+
}, {
|
|
2639
|
+
readonly encoding: "pcm_s16le";
|
|
2640
|
+
readonly sampleRateHz: 24000;
|
|
2641
|
+
readonly channels: 1;
|
|
2642
|
+
}, {
|
|
2643
|
+
readonly encoding: "pcm_s16le";
|
|
2644
|
+
readonly sampleRateHz: 44100;
|
|
2645
|
+
readonly channels: 1;
|
|
2646
|
+
}, {
|
|
2647
|
+
readonly encoding: "pcm_s16le";
|
|
2648
|
+
readonly sampleRateHz: 48000;
|
|
2649
|
+
readonly channels: 1;
|
|
2650
|
+
}];
|
|
2651
|
+
};
|
|
2652
|
+
models: readonly ["scribe_v2_realtime", "scribe_v2", "scribe_v2_medical"];
|
|
2653
|
+
turnDetection: ("manual" | "vad")[];
|
|
2654
|
+
metadata: {
|
|
2655
|
+
realtimeModel: string;
|
|
2656
|
+
realtimeModels: string[];
|
|
2657
|
+
batchModels: string[];
|
|
2658
|
+
batchTranscription: boolean;
|
|
2659
|
+
partialTranscripts: boolean;
|
|
2568
2660
|
};
|
|
2569
|
-
models: readonly ["sonic-3", "sonic-2"];
|
|
2570
2661
|
};
|
|
2571
|
-
constructor(options:
|
|
2572
|
-
|
|
2573
|
-
|
|
2662
|
+
constructor(options: ElevenLabsSttProviderOptions);
|
|
2663
|
+
open(request: SttOpenRequest): Promise<SttStream>;
|
|
2664
|
+
transcribe(request: ElevenLabsBatchSttRequest): Promise<ElevenLabsBatchSttResult>;
|
|
2665
|
+
transcribe(request: SttBatchTranscriptionRequest): Promise<SttBatchTranscription>;
|
|
2574
2666
|
}
|
|
2575
|
-
declare function
|
|
2667
|
+
declare function createElevenLabsSttProvider(options: ElevenLabsSttProviderOptions): ElevenLabsSttProvider;
|
|
2576
2668
|
|
|
2577
2669
|
/**
|
|
2578
2670
|
* Vendor facts that change on the provider's release schedule rather than ours:
|
|
@@ -2596,20 +2688,31 @@ interface ProviderCatalogEntry {
|
|
|
2596
2688
|
readonly defaultModel: string;
|
|
2597
2689
|
/** Models this adapter is known to work with, not the vendor's full catalog. */
|
|
2598
2690
|
readonly models: readonly string[];
|
|
2691
|
+
/** Optional transport-specific model groups when one adapter spans transports. */
|
|
2692
|
+
readonly realtimeModels?: readonly string[];
|
|
2693
|
+
readonly preRecordedModels?: readonly string[];
|
|
2694
|
+
readonly syncModels?: readonly string[];
|
|
2695
|
+
/** Models supported by a separate complete-input/batch contract, when present. */
|
|
2696
|
+
readonly batchModels?: readonly string[];
|
|
2697
|
+
/** Official documentation for the separate batch contract, when present. */
|
|
2698
|
+
readonly batchSource?: string;
|
|
2599
2699
|
}
|
|
2600
2700
|
/**
|
|
2601
|
-
* TVIC maturity labels are our release claim, not a vendor guarantee.
|
|
2602
|
-
*
|
|
2603
|
-
*
|
|
2604
|
-
*
|
|
2701
|
+
* TVIC maturity labels are our release claim, not a vendor guarantee. They are
|
|
2702
|
+
* ordered from least to most supported as deferred, experimental, validated,
|
|
2703
|
+
* and stable. `validated` means the exact adapter/model path has passed the
|
|
2704
|
+
* small-scale live evidence profile; it is not an uptime or compatibility SLA.
|
|
2605
2705
|
*/
|
|
2606
|
-
|
|
2706
|
+
declare const PROVIDER_STABILITY_LEVELS: readonly ["deferred", "experimental", "validated", "stable"];
|
|
2707
|
+
type ProviderStability = (typeof PROVIDER_STABILITY_LEVELS)[number];
|
|
2607
2708
|
declare const PROVIDER_STABILITY: Readonly<{
|
|
2608
2709
|
readonly deepgram: "experimental";
|
|
2710
|
+
readonly cartesiaStt: "experimental";
|
|
2609
2711
|
readonly sarvam: "experimental";
|
|
2610
2712
|
readonly elevenlabsStt: "experimental";
|
|
2611
2713
|
readonly assemblyai: "experimental";
|
|
2612
2714
|
readonly soniox: "experimental";
|
|
2715
|
+
readonly sarvamTts: "experimental";
|
|
2613
2716
|
readonly groq: "experimental";
|
|
2614
2717
|
readonly openaiResponses: "experimental";
|
|
2615
2718
|
readonly cartesia: "experimental";
|
|
@@ -2624,35 +2727,52 @@ declare const PROVIDER_CATALOG: {
|
|
|
2624
2727
|
readonly defaultModel: "nova-3";
|
|
2625
2728
|
readonly models: readonly ["nova-3", "nova-2"];
|
|
2626
2729
|
};
|
|
2730
|
+
readonly cartesiaStt: {
|
|
2731
|
+
readonly verifiedAt: "2026-09-27";
|
|
2732
|
+
readonly source: "https://docs.cartesia.ai/build-with-cartesia/stt/latest";
|
|
2733
|
+
readonly defaultModel: "ink-2";
|
|
2734
|
+
readonly models: readonly ["ink-2", "ink-preview", "ink-whisper-2025-06-04"];
|
|
2735
|
+
readonly batchModels: readonly ["ink-whisper"];
|
|
2736
|
+
readonly batchSource: "https://docs.cartesia.ai/api-reference/stt/transcribe";
|
|
2737
|
+
};
|
|
2627
2738
|
readonly sarvam: {
|
|
2628
2739
|
readonly verifiedAt: "2026-09-15";
|
|
2629
2740
|
readonly source: "https://docs.sarvam.ai/api-reference/speech-to-text/transcribe/ws";
|
|
2630
2741
|
readonly defaultModel: "saaras:v3";
|
|
2631
2742
|
readonly models: readonly ["saaras:v3", "saaras:v4"];
|
|
2632
2743
|
};
|
|
2744
|
+
readonly sarvamTts: {
|
|
2745
|
+
readonly verifiedAt: "2026-09-25";
|
|
2746
|
+
readonly source: "https://docs.sarvam.ai/api-reference/text-to-speech/convert";
|
|
2747
|
+
readonly defaultModel: "bulbul:v3";
|
|
2748
|
+
readonly models: readonly ["bulbul:v3"];
|
|
2749
|
+
};
|
|
2633
2750
|
readonly cartesia: {
|
|
2634
|
-
readonly verifiedAt: "2026-09-
|
|
2635
|
-
readonly source: "https://docs.cartesia.ai/build-with-cartesia/tts-models/
|
|
2636
|
-
readonly defaultModel: "sonic-3";
|
|
2637
|
-
readonly models: readonly ["sonic-3", "sonic-
|
|
2751
|
+
readonly verifiedAt: "2026-09-25";
|
|
2752
|
+
readonly source: "https://docs.cartesia.ai/build-with-cartesia/tts-models/latest";
|
|
2753
|
+
readonly defaultModel: "sonic-3.6";
|
|
2754
|
+
readonly models: readonly ["sonic-3.6", "sonic-3.6-2026-08-27", "sonic-preview", "sonic-3.5", "sonic-3.5-2026-05-04", "sonic-3", "sonic-3-2026-01-12"];
|
|
2638
2755
|
};
|
|
2639
2756
|
readonly elevenlabs: {
|
|
2640
|
-
readonly verifiedAt: "2026-
|
|
2641
|
-
readonly source: "https://elevenlabs.io/docs/models";
|
|
2757
|
+
readonly verifiedAt: "2026-09-25";
|
|
2758
|
+
readonly source: "https://elevenlabs.io/docs/overview/models";
|
|
2642
2759
|
readonly defaultModel: "eleven_flash_v2_5";
|
|
2643
|
-
readonly models: readonly ["eleven_flash_v2_5", "
|
|
2760
|
+
readonly models: readonly ["eleven_flash_v2_5", "eleven_flash_v2", "eleven_v3", "eleven_v3_conversational", "eleven_multilingual_v2", "eleven_turbo_v2_5", "eleven_turbo_v2"];
|
|
2644
2761
|
};
|
|
2645
2762
|
readonly elevenlabsStt: {
|
|
2646
|
-
readonly verifiedAt: "2026-
|
|
2647
|
-
readonly source: "https://elevenlabs.io/docs/
|
|
2763
|
+
readonly verifiedAt: "2026-09-24";
|
|
2764
|
+
readonly source: "https://elevenlabs.io/docs/overview/models";
|
|
2648
2765
|
readonly defaultModel: "scribe_v2_realtime";
|
|
2649
|
-
readonly models: readonly ["scribe_v2_realtime"];
|
|
2766
|
+
readonly models: readonly ["scribe_v2_realtime", "scribe_v2", "scribe_v2_medical"];
|
|
2650
2767
|
};
|
|
2651
2768
|
readonly assemblyai: {
|
|
2652
|
-
readonly verifiedAt: "2026-
|
|
2653
|
-
readonly source: "https://www.assemblyai.com/docs/streaming/
|
|
2654
|
-
readonly defaultModel: "
|
|
2655
|
-
readonly models: readonly [
|
|
2769
|
+
readonly verifiedAt: "2026-09-27";
|
|
2770
|
+
readonly source: "https://www.assemblyai.com/docs/streaming/select-the-speech-model";
|
|
2771
|
+
readonly defaultModel: "universal-3-6-pro";
|
|
2772
|
+
readonly models: readonly string[];
|
|
2773
|
+
readonly realtimeModels: readonly ["universal-3-6-pro", "universal-3-5-pro", "universal-streaming-english", "universal-streaming-multilingual"];
|
|
2774
|
+
readonly preRecordedModels: readonly ["universal-3-5-pro", "universal-2"];
|
|
2775
|
+
readonly syncModels: readonly ["universal-3-5-pro"];
|
|
2656
2776
|
};
|
|
2657
2777
|
readonly soniox: {
|
|
2658
2778
|
readonly verifiedAt: "2026-08-20";
|
|
@@ -2678,7 +2798,8 @@ declare const PROVIDER_CATALOG: {
|
|
|
2678
2798
|
* protocol version changes adapter parsing, not just which model is selected.
|
|
2679
2799
|
*/
|
|
2680
2800
|
declare const PROVIDER_API_VERSIONS: {
|
|
2681
|
-
readonly cartesia: "2026-
|
|
2801
|
+
readonly cartesia: "2026-08-14";
|
|
2802
|
+
readonly cartesiaStt: "2026-08-14";
|
|
2682
2803
|
};
|
|
2683
2804
|
/**
|
|
2684
2805
|
* TVIC's own adapter tuning. These are our decisions about how to drive a provider,
|
|
@@ -2697,21 +2818,468 @@ declare const ADAPTER_DEFAULTS: {
|
|
|
2697
2818
|
readonly flushSignal: true;
|
|
2698
2819
|
readonly inputAudioCodec: "pcm_s16le";
|
|
2699
2820
|
};
|
|
2821
|
+
readonly sarvamTts: {
|
|
2822
|
+
readonly language: "en-IN";
|
|
2823
|
+
readonly voice: "shubh";
|
|
2824
|
+
readonly pace: 1;
|
|
2825
|
+
readonly temperature: 0.6;
|
|
2826
|
+
readonly minBufferSize: 50;
|
|
2827
|
+
readonly maxChunkLength: 150;
|
|
2828
|
+
};
|
|
2700
2829
|
readonly cartesia: {
|
|
2701
2830
|
readonly language: "en";
|
|
2702
2831
|
};
|
|
2832
|
+
readonly cartesiaStt: {
|
|
2833
|
+
readonly mode: "manual";
|
|
2834
|
+
};
|
|
2703
2835
|
};
|
|
2704
2836
|
|
|
2837
|
+
interface AssemblyAiSpeakerOptions {
|
|
2838
|
+
readonly minSpeakersExpected?: number;
|
|
2839
|
+
readonly maxSpeakersExpected?: number;
|
|
2840
|
+
readonly includeSpeakerConfidence?: boolean;
|
|
2841
|
+
}
|
|
2842
|
+
type AssemblyAiPiiSubstitution = "entity_name" | "hash";
|
|
2843
|
+
type AssemblyAiRedactedAudioQuality = "mp3" | "wav";
|
|
2844
|
+
interface AssemblyAiRedactPiiAudioOptions {
|
|
2845
|
+
readonly overrideAudioRedactionMethod?: "beep" | "silence";
|
|
2846
|
+
readonly returnRedactedNoSpeechAudio?: boolean;
|
|
2847
|
+
}
|
|
2848
|
+
interface AssemblyAiPreRecordedSttRequest {
|
|
2849
|
+
/** A complete local file or encoded media payload. */
|
|
2850
|
+
readonly audio?: Uint8Array;
|
|
2851
|
+
/** A public URL or AssemblyAI upload URL. Exactly one audio source is required. */
|
|
2852
|
+
readonly audioUrl?: string;
|
|
2853
|
+
/** Content type used when `audio` is uploaded. */
|
|
2854
|
+
readonly mimeType?: string;
|
|
2855
|
+
/** Filename used as the multipart upload filename. */
|
|
2856
|
+
readonly fileName?: string;
|
|
2857
|
+
/** Convenience single-model selector. Cannot be combined with speechModels. */
|
|
2858
|
+
readonly model?: string;
|
|
2859
|
+
/** Ordered model candidates. AssemblyAI may fall back to the next model. */
|
|
2860
|
+
readonly speechModels?: readonly string[];
|
|
2861
|
+
readonly language?: string;
|
|
2862
|
+
readonly languageDetection?: boolean;
|
|
2863
|
+
readonly prompt?: string;
|
|
2864
|
+
readonly vocabulary?: readonly string[];
|
|
2865
|
+
readonly punctuate?: boolean;
|
|
2866
|
+
readonly formatText?: boolean;
|
|
2867
|
+
readonly disfluencies?: boolean;
|
|
2868
|
+
readonly speakerLabels?: boolean;
|
|
2869
|
+
readonly speakersExpected?: number;
|
|
2870
|
+
readonly speakerOptions?: AssemblyAiSpeakerOptions;
|
|
2871
|
+
/** Current AssemblyAI name for separate-channel transcription. */
|
|
2872
|
+
readonly multichannel?: boolean;
|
|
2873
|
+
/** @deprecated Use `multichannel`. Kept as a compatibility alias. */
|
|
2874
|
+
readonly dualChannel?: boolean;
|
|
2875
|
+
readonly redactPii?: boolean;
|
|
2876
|
+
readonly redactPiiPolicies?: readonly string[];
|
|
2877
|
+
readonly redactPiiSub?: AssemblyAiPiiSubstitution;
|
|
2878
|
+
readonly redactPiiAudio?: boolean;
|
|
2879
|
+
readonly redactPiiAudioQuality?: AssemblyAiRedactedAudioQuality;
|
|
2880
|
+
readonly redactPiiAudioOptions?: AssemblyAiRedactPiiAudioOptions;
|
|
2881
|
+
readonly redactPiiReturnUnredacted?: boolean;
|
|
2882
|
+
readonly redactStaticEntities?: Readonly<Record<string, readonly string[]>>;
|
|
2883
|
+
readonly speechThreshold?: number;
|
|
2884
|
+
readonly webhookUrl?: string;
|
|
2885
|
+
readonly webhookAuthHeaderName?: string;
|
|
2886
|
+
readonly webhookAuthHeaderValue?: string;
|
|
2887
|
+
readonly signal?: AbortSignal;
|
|
2888
|
+
readonly pollIntervalMs?: number;
|
|
2889
|
+
readonly pollTimeoutMs?: number;
|
|
2890
|
+
}
|
|
2891
|
+
interface AssemblyAiSyncSttRequest {
|
|
2892
|
+
/** Raw PCM16LE bytes. The format is sent in the Sync config part. */
|
|
2893
|
+
readonly audio: Uint8Array;
|
|
2894
|
+
readonly format: AudioFormat;
|
|
2895
|
+
readonly model?: string;
|
|
2896
|
+
readonly languageCodes?: readonly string[];
|
|
2897
|
+
readonly prompt?: string;
|
|
2898
|
+
readonly vocabulary?: readonly string[];
|
|
2899
|
+
readonly timestamps?: boolean;
|
|
2900
|
+
readonly fileName?: string;
|
|
2901
|
+
readonly signal?: AbortSignal;
|
|
2902
|
+
}
|
|
2903
|
+
interface AssemblyAiSyncLiveSttRequest {
|
|
2904
|
+
/** Async PCM16LE chunks produced while the recording is in progress. */
|
|
2905
|
+
readonly audio: AsyncIterable<Uint8Array>;
|
|
2906
|
+
readonly format: AudioFormat;
|
|
2907
|
+
readonly model?: string;
|
|
2908
|
+
readonly languageCodes?: readonly string[];
|
|
2909
|
+
readonly prompt?: string;
|
|
2910
|
+
readonly vocabulary?: readonly string[];
|
|
2911
|
+
readonly timestamps?: boolean;
|
|
2912
|
+
readonly fileName?: string;
|
|
2913
|
+
readonly signal?: AbortSignal;
|
|
2914
|
+
}
|
|
2915
|
+
interface AssemblyAiTranscriptWord {
|
|
2916
|
+
readonly text: string;
|
|
2917
|
+
readonly start?: number;
|
|
2918
|
+
readonly end?: number;
|
|
2919
|
+
readonly confidence?: number;
|
|
2920
|
+
readonly speaker?: string;
|
|
2921
|
+
readonly [key: string]: unknown;
|
|
2922
|
+
}
|
|
2923
|
+
interface AssemblyAiTranscriptUtterance {
|
|
2924
|
+
readonly text: string;
|
|
2925
|
+
readonly start?: number;
|
|
2926
|
+
readonly end?: number;
|
|
2927
|
+
readonly confidence?: number;
|
|
2928
|
+
readonly speaker?: string;
|
|
2929
|
+
readonly words?: readonly AssemblyAiTranscriptWord[];
|
|
2930
|
+
readonly [key: string]: unknown;
|
|
2931
|
+
}
|
|
2932
|
+
interface AssemblyAiPreRecordedSttResult {
|
|
2933
|
+
readonly id: string;
|
|
2934
|
+
readonly status: "completed";
|
|
2935
|
+
readonly modelId: string;
|
|
2936
|
+
readonly text: string;
|
|
2937
|
+
readonly languageCode?: string;
|
|
2938
|
+
readonly audioDurationMs?: number;
|
|
2939
|
+
readonly audioChannels?: number;
|
|
2940
|
+
readonly confidence?: number;
|
|
2941
|
+
readonly words: readonly AssemblyAiTranscriptWord[];
|
|
2942
|
+
readonly utterances: readonly AssemblyAiTranscriptUtterance[];
|
|
2943
|
+
/** Bounded provider response for fields not yet promoted into the TVIC shape. */
|
|
2944
|
+
readonly providerResponse: Readonly<Record<string, unknown>>;
|
|
2945
|
+
}
|
|
2946
|
+
interface AssemblyAiSyncSttResult {
|
|
2947
|
+
readonly sessionId: string;
|
|
2948
|
+
readonly modelId: string;
|
|
2949
|
+
readonly text: string;
|
|
2950
|
+
readonly confidence?: number;
|
|
2951
|
+
readonly audioDurationMs?: number;
|
|
2952
|
+
readonly requestTimeMs?: number;
|
|
2953
|
+
readonly words: readonly AssemblyAiTranscriptWord[];
|
|
2954
|
+
readonly providerResponse: Readonly<Record<string, unknown>>;
|
|
2955
|
+
}
|
|
2956
|
+
|
|
2957
|
+
interface AssemblyAiSttProviderOptions {
|
|
2958
|
+
readonly apiKey: string;
|
|
2959
|
+
readonly url?: string;
|
|
2960
|
+
readonly modelId?: string;
|
|
2961
|
+
readonly allowUnknownModel?: boolean;
|
|
2962
|
+
readonly formatTurns?: boolean;
|
|
2963
|
+
readonly prompt?: string;
|
|
2964
|
+
readonly languageDetection?: boolean;
|
|
2965
|
+
readonly speakerLabels?: boolean;
|
|
2966
|
+
readonly maxSpeakers?: number;
|
|
2967
|
+
readonly speakerLabelsRevisionIntervalMs?: number;
|
|
2968
|
+
readonly minTurnSilenceMs?: number;
|
|
2969
|
+
readonly maxTurnSilenceMs?: number;
|
|
2970
|
+
readonly clock?: ProviderClock;
|
|
2971
|
+
readonly preRecordedUrl?: string;
|
|
2972
|
+
readonly uploadUrl?: string;
|
|
2973
|
+
readonly syncUrl?: string;
|
|
2974
|
+
readonly fetchImpl?: typeof fetch;
|
|
2975
|
+
readonly webSocketFactory?: (url: string, headers: Readonly<Record<string, string>>) => WebSocket__default;
|
|
2976
|
+
}
|
|
2977
|
+
declare class AssemblyAiSttProvider implements SpeechToTextProvider {
|
|
2978
|
+
#private;
|
|
2979
|
+
readonly name: "assemblyai-stt";
|
|
2980
|
+
readonly kind = "stt";
|
|
2981
|
+
readonly version = "0.1.0";
|
|
2982
|
+
readonly capabilities: {
|
|
2983
|
+
streaming: {
|
|
2984
|
+
input: true;
|
|
2985
|
+
output: true;
|
|
2986
|
+
native: true;
|
|
2987
|
+
};
|
|
2988
|
+
cancellation: {
|
|
2989
|
+
request: true;
|
|
2990
|
+
output: false;
|
|
2991
|
+
buffer: false;
|
|
2992
|
+
truncation: false;
|
|
2993
|
+
};
|
|
2994
|
+
transports: ("http" | "websocket")[];
|
|
2995
|
+
audio: {
|
|
2996
|
+
input: {
|
|
2997
|
+
readonly encoding: "pcm_s16le";
|
|
2998
|
+
readonly sampleRateHz: 16000;
|
|
2999
|
+
readonly channels: 1;
|
|
3000
|
+
}[];
|
|
3001
|
+
};
|
|
3002
|
+
models: readonly string[];
|
|
3003
|
+
turnDetection: "stt_endpointing"[];
|
|
3004
|
+
metadata: {
|
|
3005
|
+
realtimeModel: "universal-3-6-pro";
|
|
3006
|
+
realtimeModels: readonly ["universal-3-6-pro", "universal-3-5-pro", "universal-streaming-english", "universal-streaming-multilingual"];
|
|
3007
|
+
preRecordedModels: readonly ["universal-3-5-pro", "universal-2"];
|
|
3008
|
+
syncModels: readonly ["universal-3-5-pro"];
|
|
3009
|
+
preRecordedTranscription: boolean;
|
|
3010
|
+
syncTranscription: boolean;
|
|
3011
|
+
syncLiveTranscription: boolean;
|
|
3012
|
+
partialTranscripts: boolean;
|
|
3013
|
+
formattedTurns: boolean;
|
|
3014
|
+
speakerDiarization: boolean;
|
|
3015
|
+
multichannelTranscription: boolean;
|
|
3016
|
+
piiRedaction: boolean;
|
|
3017
|
+
};
|
|
3018
|
+
};
|
|
3019
|
+
constructor(options: AssemblyAiSttProviderOptions);
|
|
3020
|
+
open(request: SttOpenRequest): Promise<SttStream>;
|
|
3021
|
+
transcribe(request: AssemblyAiPreRecordedSttRequest): Promise<AssemblyAiPreRecordedSttResult>;
|
|
3022
|
+
transcribe(request: SttBatchTranscriptionRequest): Promise<SttBatchTranscription>;
|
|
3023
|
+
transcribeSync(request: AssemblyAiSyncSttRequest): Promise<AssemblyAiSyncSttResult>;
|
|
3024
|
+
transcribeSyncLive(request: AssemblyAiSyncLiveSttRequest): Promise<AssemblyAiSyncSttResult>;
|
|
3025
|
+
warmSync(model?: string, signal?: AbortSignal): Promise<void>;
|
|
3026
|
+
}
|
|
3027
|
+
declare function createAssemblyAiSttProvider(options: AssemblyAiSttProviderOptions): AssemblyAiSttProvider;
|
|
3028
|
+
|
|
3029
|
+
interface SonioxStructuredContext {
|
|
3030
|
+
readonly general?: readonly Readonly<{
|
|
3031
|
+
key: string;
|
|
3032
|
+
value: string;
|
|
3033
|
+
}>[];
|
|
3034
|
+
readonly text?: string;
|
|
3035
|
+
readonly terms?: readonly string[];
|
|
3036
|
+
}
|
|
3037
|
+
interface SonioxSttProviderOptions {
|
|
3038
|
+
readonly apiKey: string;
|
|
3039
|
+
readonly url?: string;
|
|
3040
|
+
readonly modelId?: string;
|
|
3041
|
+
readonly allowUnknownModel?: boolean;
|
|
3042
|
+
readonly context?: SonioxStructuredContext;
|
|
3043
|
+
readonly enableEndpointDetection?: boolean;
|
|
3044
|
+
readonly maxEndpointDelayMs?: number;
|
|
3045
|
+
readonly endpointSensitivity?: number;
|
|
3046
|
+
readonly endpointLatencyAdjustmentLevel?: number;
|
|
3047
|
+
readonly enableLanguageIdentification?: boolean;
|
|
3048
|
+
readonly clock?: ProviderClock;
|
|
3049
|
+
readonly webSocketFactory?: (url: string, headers: Readonly<Record<string, string>>) => WebSocket__default;
|
|
3050
|
+
}
|
|
3051
|
+
declare class SonioxSttProvider implements SpeechToTextProvider {
|
|
3052
|
+
#private;
|
|
3053
|
+
readonly name: "soniox-stt";
|
|
3054
|
+
readonly kind = "stt";
|
|
3055
|
+
readonly version = "0.1.0";
|
|
3056
|
+
readonly capabilities: {
|
|
3057
|
+
streaming: {
|
|
3058
|
+
input: true;
|
|
3059
|
+
output: true;
|
|
3060
|
+
native: true;
|
|
3061
|
+
};
|
|
3062
|
+
cancellation: {
|
|
3063
|
+
request: true;
|
|
3064
|
+
output: false;
|
|
3065
|
+
buffer: false;
|
|
3066
|
+
truncation: false;
|
|
3067
|
+
};
|
|
3068
|
+
transports: "websocket"[];
|
|
3069
|
+
audio: {
|
|
3070
|
+
input: readonly [{
|
|
3071
|
+
readonly encoding: "pcm_s16le";
|
|
3072
|
+
readonly sampleRateHz: 8000;
|
|
3073
|
+
readonly channels: 1;
|
|
3074
|
+
}, {
|
|
3075
|
+
readonly encoding: "pcm_s16le";
|
|
3076
|
+
readonly sampleRateHz: 16000;
|
|
3077
|
+
readonly channels: 1;
|
|
3078
|
+
}];
|
|
3079
|
+
};
|
|
3080
|
+
models: readonly ["stt-rt-v5"];
|
|
3081
|
+
turnDetection: ("manual" | "stt_endpointing")[];
|
|
3082
|
+
metadata: {
|
|
3083
|
+
realtimeModel: "stt-rt-v5";
|
|
3084
|
+
partialTranscripts: boolean;
|
|
3085
|
+
tokenFinality: boolean;
|
|
3086
|
+
};
|
|
3087
|
+
};
|
|
3088
|
+
constructor(options: SonioxSttProviderOptions);
|
|
3089
|
+
open(request: SttOpenRequest): Promise<SttStream>;
|
|
3090
|
+
}
|
|
3091
|
+
declare function createSonioxSttProvider(options: SonioxSttProviderOptions): SonioxSttProvider;
|
|
3092
|
+
|
|
3093
|
+
interface OpenAiResponsesLlmProviderOptions {
|
|
3094
|
+
readonly apiKey: string;
|
|
3095
|
+
readonly url?: string;
|
|
3096
|
+
readonly clock?: ProviderClock;
|
|
3097
|
+
}
|
|
3098
|
+
declare class OpenAiResponsesLlmProvider implements LLMProvider {
|
|
3099
|
+
#private;
|
|
3100
|
+
readonly name: "openai-responses";
|
|
3101
|
+
readonly kind = "llm";
|
|
3102
|
+
readonly version = "0.1.0";
|
|
3103
|
+
readonly capabilities: {
|
|
3104
|
+
streaming: {
|
|
3105
|
+
input: false;
|
|
3106
|
+
output: true;
|
|
3107
|
+
native: true;
|
|
3108
|
+
};
|
|
3109
|
+
cancellation: {
|
|
3110
|
+
request: true;
|
|
3111
|
+
output: true;
|
|
3112
|
+
buffer: false;
|
|
3113
|
+
truncation: false;
|
|
3114
|
+
};
|
|
3115
|
+
transports: ("http" | "sse")[];
|
|
3116
|
+
models: readonly ["gpt-5", "gpt-5-mini", "gpt-4.1", "gpt-4.1-mini"];
|
|
3117
|
+
tools: {
|
|
3118
|
+
functionCalling: true;
|
|
3119
|
+
parallelCalls: true;
|
|
3120
|
+
};
|
|
3121
|
+
};
|
|
3122
|
+
constructor(options: OpenAiResponsesLlmProviderOptions);
|
|
3123
|
+
complete(request: LlmCompletionRequest): Promise<LlmCompletion>;
|
|
3124
|
+
}
|
|
3125
|
+
declare function createOpenAiResponsesLlmProvider(options: OpenAiResponsesLlmProviderOptions): OpenAiResponsesLlmProvider;
|
|
3126
|
+
|
|
3127
|
+
interface GroqChatLlmProviderOptions {
|
|
3128
|
+
readonly apiKey: string;
|
|
3129
|
+
readonly url?: string;
|
|
3130
|
+
/** Allows an explicitly configured compatible endpoint/model outside the dated catalog. */
|
|
3131
|
+
readonly allowUnknownModel?: boolean;
|
|
3132
|
+
readonly clock?: ProviderClock;
|
|
3133
|
+
}
|
|
3134
|
+
declare class GroqChatLlmProvider implements LLMProvider {
|
|
3135
|
+
#private;
|
|
3136
|
+
readonly name: "groq-chat-completions";
|
|
3137
|
+
readonly kind = "llm";
|
|
3138
|
+
readonly version = "0.1.0";
|
|
3139
|
+
readonly capabilities: {
|
|
3140
|
+
streaming: {
|
|
3141
|
+
input: false;
|
|
3142
|
+
output: true;
|
|
3143
|
+
native: true;
|
|
3144
|
+
};
|
|
3145
|
+
cancellation: {
|
|
3146
|
+
request: true;
|
|
3147
|
+
output: true;
|
|
3148
|
+
buffer: false;
|
|
3149
|
+
truncation: false;
|
|
3150
|
+
};
|
|
3151
|
+
transports: ("http" | "sse")[];
|
|
3152
|
+
models: readonly ["openai/gpt-oss-20b", "openai/gpt-oss-120b"];
|
|
3153
|
+
tools: {
|
|
3154
|
+
functionCalling: true;
|
|
3155
|
+
parallelCalls: false;
|
|
3156
|
+
};
|
|
3157
|
+
};
|
|
3158
|
+
constructor(options: GroqChatLlmProviderOptions);
|
|
3159
|
+
complete(request: LlmCompletionRequest): Promise<LlmCompletion>;
|
|
3160
|
+
}
|
|
3161
|
+
declare function createGroqChatLlmProvider(options: GroqChatLlmProviderOptions): GroqChatLlmProvider;
|
|
3162
|
+
|
|
3163
|
+
interface CartesiaGenerationConfig {
|
|
3164
|
+
/** Relative output volume; Cartesia interprets the value for the selected model. */
|
|
3165
|
+
readonly volume?: number;
|
|
3166
|
+
/** Relative speaking speed; a request-level speed overrides this value. */
|
|
3167
|
+
readonly speed?: number;
|
|
3168
|
+
/** Optional Sonic emotion/style control. */
|
|
3169
|
+
readonly emotion?: string;
|
|
3170
|
+
}
|
|
3171
|
+
|
|
3172
|
+
declare const MAX_CARTESIA_INPUT_UTF16_CODE_UNITS = 1048576;
|
|
3173
|
+
declare const MAX_CARTESIA_INPUT_UTF8_BYTES = 4194304;
|
|
3174
|
+
interface CartesiaTtsProviderOptions {
|
|
3175
|
+
readonly apiKey: string;
|
|
3176
|
+
readonly url?: string;
|
|
3177
|
+
readonly voiceId: string;
|
|
3178
|
+
readonly modelId?: string;
|
|
3179
|
+
/** Allows an explicitly configured compatible endpoint/model outside the dated catalog. */
|
|
3180
|
+
readonly allowUnknownModel?: boolean;
|
|
3181
|
+
readonly language?: string;
|
|
3182
|
+
/** Cartesia locale is mutually exclusive with language. */
|
|
3183
|
+
readonly locale?: string;
|
|
3184
|
+
readonly accent?: string;
|
|
3185
|
+
readonly normalization?: string;
|
|
3186
|
+
readonly generationConfig?: CartesiaGenerationConfig;
|
|
3187
|
+
readonly pronunciationDictId?: string;
|
|
3188
|
+
/** Cartesia server-side continuation buffering; 0 keeps latency under TVIC control. */
|
|
3189
|
+
readonly maxBufferDelayMs?: number;
|
|
3190
|
+
readonly clock?: ProviderClock;
|
|
3191
|
+
readonly webSocketFactory?: (url: string, headers: Readonly<Record<string, string>>) => WebSocket__default;
|
|
3192
|
+
}
|
|
3193
|
+
declare class CartesiaTtsProvider implements IncrementalTextToSpeechProvider {
|
|
3194
|
+
#private;
|
|
3195
|
+
readonly name: "cartesia";
|
|
3196
|
+
readonly kind = "tts";
|
|
3197
|
+
readonly version = "0.1.0";
|
|
3198
|
+
readonly capabilities: {
|
|
3199
|
+
streaming: {
|
|
3200
|
+
input: true;
|
|
3201
|
+
output: true;
|
|
3202
|
+
native: true;
|
|
3203
|
+
};
|
|
3204
|
+
cancellation: {
|
|
3205
|
+
request: true;
|
|
3206
|
+
output: false;
|
|
3207
|
+
buffer: false;
|
|
3208
|
+
truncation: false;
|
|
3209
|
+
};
|
|
3210
|
+
transports: "websocket"[];
|
|
3211
|
+
audio: {
|
|
3212
|
+
output: {
|
|
3213
|
+
readonly encoding: "pcm_s16le";
|
|
3214
|
+
readonly sampleRateHz: 16000;
|
|
3215
|
+
readonly channels: 1;
|
|
3216
|
+
}[];
|
|
3217
|
+
};
|
|
3218
|
+
models: readonly ["sonic-3.6", "sonic-3.6-2026-08-27", "sonic-preview", "sonic-3.5", "sonic-3.5-2026-05-04", "sonic-3", "sonic-3-2026-01-12"];
|
|
3219
|
+
};
|
|
3220
|
+
constructor(options: CartesiaTtsProviderOptions);
|
|
3221
|
+
synthesize(request: TtsSynthesisRequest): Promise<TtsStream>;
|
|
3222
|
+
openSession(request: TtsSessionOpenRequest): Promise<TtsSession>;
|
|
3223
|
+
}
|
|
3224
|
+
declare function createCartesiaTtsProvider(options: CartesiaTtsProviderOptions): CartesiaTtsProvider;
|
|
3225
|
+
|
|
3226
|
+
type ElevenLabsTtsProtocol = "tts" | "dialogue";
|
|
3227
|
+
type ElevenLabsTextNormalization = "auto" | "on" | "off";
|
|
3228
|
+
interface ElevenLabsPronunciationDictionaryLocator {
|
|
3229
|
+
readonly id: string;
|
|
3230
|
+
readonly versionId?: string;
|
|
3231
|
+
}
|
|
3232
|
+
interface ElevenLabsTtsSendTextOptions {
|
|
3233
|
+
/** Regular TTS only. Requests generation before the normal chunk schedule. */
|
|
3234
|
+
readonly tryTriggerGeneration?: boolean;
|
|
3235
|
+
}
|
|
3236
|
+
interface ElevenLabsDialogueTurnOptions {
|
|
3237
|
+
readonly voiceId?: string;
|
|
3238
|
+
/** Starts a new speaker/prosody turn without closing the socket. */
|
|
3239
|
+
readonly newTurn?: boolean;
|
|
3240
|
+
}
|
|
2705
3241
|
interface ElevenLabsTtsProviderOptions {
|
|
2706
3242
|
readonly apiKey: string;
|
|
2707
3243
|
readonly voiceId: string;
|
|
2708
3244
|
readonly modelId?: string;
|
|
2709
3245
|
readonly language?: string;
|
|
2710
3246
|
readonly url?: string;
|
|
3247
|
+
/** Allows an explicitly configured compatible endpoint/model outside the dated catalog. */
|
|
3248
|
+
readonly allowUnknownModel?: boolean;
|
|
2711
3249
|
readonly stability?: number;
|
|
2712
3250
|
readonly similarityBoost?: number;
|
|
3251
|
+
/** Regular TTS WebSocket speaker boost. */
|
|
3252
|
+
readonly useSpeakerBoost?: boolean;
|
|
3253
|
+
/** Regular TTS WebSocket auto mode; use only when sending complete sentences. */
|
|
3254
|
+
readonly autoMode?: boolean;
|
|
3255
|
+
/** Regular TTS WebSocket generation schedule, in provider character thresholds. */
|
|
3256
|
+
readonly chunkLengthSchedule?: readonly number[];
|
|
3257
|
+
readonly applyTextNormalization?: ElevenLabsTextNormalization;
|
|
3258
|
+
readonly enableLogging?: boolean;
|
|
3259
|
+
readonly enableSsmlParsing?: boolean;
|
|
3260
|
+
readonly seed?: number;
|
|
3261
|
+
readonly inactivityTimeoutSeconds?: number;
|
|
3262
|
+
/** Up to three dictionaries, applied in order on the first provider message. */
|
|
3263
|
+
readonly pronunciationDictionaryLocators?: readonly ElevenLabsPronunciationDictionaryLocator[];
|
|
3264
|
+
/** Voices registered for an Eleven v3 dialogue session. */
|
|
3265
|
+
readonly dialogueVoices?: readonly string[];
|
|
2713
3266
|
readonly clock?: ProviderClock;
|
|
2714
|
-
readonly webSocketFactory?: (url: string, headers: Readonly<Record<string, string>>) =>
|
|
3267
|
+
readonly webSocketFactory?: (url: string, headers: Readonly<Record<string, string>>) => WebSocket__default;
|
|
3268
|
+
}
|
|
3269
|
+
|
|
3270
|
+
interface ElevenLabsStreamOptions {
|
|
3271
|
+
readonly clock: ProviderClock;
|
|
3272
|
+
readonly modelId?: string;
|
|
3273
|
+
readonly protocol?: ElevenLabsTtsProtocol;
|
|
3274
|
+
readonly voice?: string;
|
|
3275
|
+
readonly voices?: readonly string[];
|
|
3276
|
+
readonly maxCharacters?: number | undefined;
|
|
3277
|
+
readonly stability: number;
|
|
3278
|
+
readonly similarityBoost: number;
|
|
3279
|
+
readonly useSpeakerBoost?: boolean | undefined;
|
|
3280
|
+
readonly applyTextNormalization?: ElevenLabsTextNormalization | undefined;
|
|
3281
|
+
readonly chunkLengthSchedule?: readonly number[] | undefined;
|
|
3282
|
+
readonly pronunciationDictionaryLocators?: readonly ElevenLabsPronunciationDictionaryLocator[] | undefined;
|
|
2715
3283
|
}
|
|
2716
3284
|
declare class ElevenLabsTtsProvider implements IncrementalTextToSpeechProvider {
|
|
2717
3285
|
#private;
|
|
@@ -2738,14 +3306,129 @@ declare class ElevenLabsTtsProvider implements IncrementalTextToSpeechProvider {
|
|
|
2738
3306
|
readonly channels: 1;
|
|
2739
3307
|
}[];
|
|
2740
3308
|
};
|
|
2741
|
-
models: readonly ["eleven_flash_v2_5", "
|
|
3309
|
+
models: readonly ["eleven_flash_v2_5", "eleven_flash_v2", "eleven_v3", "eleven_v3_conversational", "eleven_multilingual_v2", "eleven_turbo_v2_5", "eleven_turbo_v2"];
|
|
2742
3310
|
};
|
|
2743
3311
|
constructor(options: ElevenLabsTtsProviderOptions);
|
|
2744
3312
|
synthesize(request: TtsSynthesisRequest): Promise<TtsStream>;
|
|
2745
|
-
openSession(request: TtsSessionOpenRequest): Promise<
|
|
3313
|
+
openSession(request: TtsSessionOpenRequest): Promise<ElevenLabsTtsStream>;
|
|
3314
|
+
}
|
|
3315
|
+
declare class ElevenLabsTtsStream implements TtsSession {
|
|
3316
|
+
#private;
|
|
3317
|
+
readonly events: AsyncIterable<TtsEvent>;
|
|
3318
|
+
constructor(socket: WebSocket__default, request: TtsSessionOpenRequest, options: ElevenLabsStreamOptions);
|
|
3319
|
+
sendText(text: string, options?: ElevenLabsTtsSendTextOptions): Promise<void>;
|
|
3320
|
+
/** Sends one incremental line in a Text-to-Dialogue session. */
|
|
3321
|
+
sendDialogueTurn(text: string, options?: ElevenLabsDialogueTurnOptions): Promise<void>;
|
|
3322
|
+
/** Resets the provider receive timeout without causing a generation. */
|
|
3323
|
+
keepAlive(): Promise<void>;
|
|
3324
|
+
flush(): Promise<TtsFlushResult>;
|
|
3325
|
+
finish(): Promise<void>;
|
|
3326
|
+
cancel(): Promise<void>;
|
|
2746
3327
|
}
|
|
2747
3328
|
declare function createElevenLabsTtsProvider(options: ElevenLabsTtsProviderOptions): ElevenLabsTtsProvider;
|
|
2748
3329
|
|
|
3330
|
+
interface ElevenLabsHttpTtsProviderOptions extends Omit<ElevenLabsTtsProviderOptions, "url" | "webSocketFactory"> {
|
|
3331
|
+
/** Overrides the regular text-to-speech endpoint. */
|
|
3332
|
+
readonly url?: string;
|
|
3333
|
+
/** Overrides the text-to-dialogue endpoint. */
|
|
3334
|
+
readonly dialogueUrl?: string;
|
|
3335
|
+
readonly optimizeStreamingLatency?: 0 | 1 | 2 | 3 | 4;
|
|
3336
|
+
readonly applyLanguageTextNormalization?: boolean;
|
|
3337
|
+
readonly fetchImpl?: typeof fetch;
|
|
3338
|
+
}
|
|
3339
|
+
interface ElevenLabsTtsHttpSynthesisRequest extends TtsSynthesisRequest {
|
|
3340
|
+
readonly previousText?: string;
|
|
3341
|
+
readonly nextText?: string;
|
|
3342
|
+
readonly previousRequestIds?: readonly string[];
|
|
3343
|
+
readonly nextRequestIds?: readonly string[];
|
|
3344
|
+
}
|
|
3345
|
+
interface ElevenLabsDialogueInput {
|
|
3346
|
+
readonly text: string;
|
|
3347
|
+
readonly voiceId: string;
|
|
3348
|
+
}
|
|
3349
|
+
interface ElevenLabsDialogueSynthesisRequest extends Omit<TtsSynthesisRequest, "text" | "voice"> {
|
|
3350
|
+
readonly inputs: readonly ElevenLabsDialogueInput[];
|
|
3351
|
+
readonly previousText?: string;
|
|
3352
|
+
readonly futureText?: string;
|
|
3353
|
+
readonly previousRequestIds?: readonly string[];
|
|
3354
|
+
readonly nextRequestIds?: readonly string[];
|
|
3355
|
+
}
|
|
3356
|
+
interface ElevenLabsDialogueProvider extends TextToSpeechProvider {
|
|
3357
|
+
synthesizeDialogue(request: ElevenLabsDialogueSynthesisRequest): Promise<TtsStream>;
|
|
3358
|
+
/** Forces the regular single-voice TTS HTTP endpoint, including for v3 models. */
|
|
3359
|
+
synthesizeSpeech(request: ElevenLabsTtsHttpSynthesisRequest): Promise<TtsStream>;
|
|
3360
|
+
}
|
|
3361
|
+
declare class ElevenLabsTtsRestProvider implements ElevenLabsDialogueProvider {
|
|
3362
|
+
#private;
|
|
3363
|
+
readonly name: "elevenlabs";
|
|
3364
|
+
readonly kind = "tts";
|
|
3365
|
+
readonly version = "0.1.0";
|
|
3366
|
+
readonly capabilities: ProviderCapabilities;
|
|
3367
|
+
constructor(options: ElevenLabsHttpTtsProviderOptions);
|
|
3368
|
+
get _httpOptions(): ElevenLabsHttpTtsProviderOptions;
|
|
3369
|
+
get _httpModelId(): string;
|
|
3370
|
+
get _httpAllowUnknownModel(): boolean;
|
|
3371
|
+
get _httpClock(): ProviderClock;
|
|
3372
|
+
get _httpFetch(): typeof fetch;
|
|
3373
|
+
synthesize(request: TtsSynthesisRequest): Promise<TtsStream>;
|
|
3374
|
+
synthesizeSpeech(request: ElevenLabsTtsHttpSynthesisRequest): Promise<TtsStream>;
|
|
3375
|
+
synthesizeDialogue(request: ElevenLabsDialogueSynthesisRequest): Promise<TtsStream>;
|
|
3376
|
+
}
|
|
3377
|
+
declare class ElevenLabsTtsHttpStreamProvider extends ElevenLabsTtsRestProvider {
|
|
3378
|
+
readonly capabilities: ProviderCapabilities;
|
|
3379
|
+
synthesizeSpeech(request: ElevenLabsTtsHttpSynthesisRequest): Promise<TtsStream>;
|
|
3380
|
+
synthesizeDialogue(request: ElevenLabsDialogueSynthesisRequest): Promise<TtsStream>;
|
|
3381
|
+
private synthesizeSpeechStream;
|
|
3382
|
+
private synthesizeDialogueStream;
|
|
3383
|
+
private executeStreamSpeech;
|
|
3384
|
+
private executeStreamDialogue;
|
|
3385
|
+
private executeViaProtectedPath;
|
|
3386
|
+
}
|
|
3387
|
+
/** The factory is the preferred entry point for complete HTTP responses. */
|
|
3388
|
+
declare function createElevenLabsTtsRestProvider(options: ElevenLabsHttpTtsProviderOptions): ElevenLabsTtsRestProvider;
|
|
3389
|
+
/** The factory is the preferred entry point for chunked HTTP responses. */
|
|
3390
|
+
declare function createElevenLabsTtsHttpStreamProvider(options: ElevenLabsHttpTtsProviderOptions): ElevenLabsTtsHttpStreamProvider;
|
|
3391
|
+
|
|
3392
|
+
/** The point at which the primary TTS provider became unavailable. */
|
|
3393
|
+
type TtsFailoverPhase = "synthesize" | "stream";
|
|
3394
|
+
interface TtsFailoverContext {
|
|
3395
|
+
readonly phase: TtsFailoverPhase;
|
|
3396
|
+
readonly primary: TextToSpeechProvider;
|
|
3397
|
+
readonly fallback: TextToSpeechProvider;
|
|
3398
|
+
readonly request: TtsSynthesisRequest;
|
|
3399
|
+
readonly fallbackRequest: TtsSynthesisRequest;
|
|
3400
|
+
readonly error: NormalizedError;
|
|
3401
|
+
}
|
|
3402
|
+
interface TtsFailoverProviderOptions {
|
|
3403
|
+
/** The provider used for the normal request path. */
|
|
3404
|
+
readonly primary: TextToSpeechProvider;
|
|
3405
|
+
/** The provider used only after the failover policy accepts the error. */
|
|
3406
|
+
readonly fallback: TextToSpeechProvider;
|
|
3407
|
+
/**
|
|
3408
|
+
* Maps the primary request to the fallback provider's model and voice. The
|
|
3409
|
+
* session, turn, signal, and output format must remain unchanged.
|
|
3410
|
+
*/
|
|
3411
|
+
readonly mapFallbackRequest?: (request: TtsSynthesisRequest, error: NormalizedError) => TtsSynthesisRequest;
|
|
3412
|
+
/**
|
|
3413
|
+
* Defaults to operational provider/network/timeout failures. Validation,
|
|
3414
|
+
* authentication, protocol, identity, and cancellation errors do not fail
|
|
3415
|
+
* over because retrying them on another provider usually hides a bug.
|
|
3416
|
+
*/
|
|
3417
|
+
readonly shouldFallback?: (error: NormalizedError, request: TtsSynthesisRequest) => boolean;
|
|
3418
|
+
/** Best-effort observability hook; observer failures never block fallback. */
|
|
3419
|
+
readonly onFallback?: (context: TtsFailoverContext) => void | PromiseLike<void>;
|
|
3420
|
+
readonly name?: string;
|
|
3421
|
+
}
|
|
3422
|
+
/**
|
|
3423
|
+
* Builds an explicit TTS failover provider for host-owned routing.
|
|
3424
|
+
*
|
|
3425
|
+
* Failover is attempted when the primary request fails before a stream is
|
|
3426
|
+
* returned, or when its stream fails before any audio chunk is emitted. Once
|
|
3427
|
+
* audio has been delivered, the original failure is propagated instead of
|
|
3428
|
+
* replaying the whole response and risking duplicated speech.
|
|
3429
|
+
*/
|
|
3430
|
+
declare function createTtsFailoverProvider(options: TtsFailoverProviderOptions): TextToSpeechProvider;
|
|
3431
|
+
|
|
2749
3432
|
declare function bytesToBase64(bytes: Uint8Array): string;
|
|
2750
3433
|
declare function base64ToBytes(value: string): Uint8Array;
|
|
2751
3434
|
declare function mulawToPcm16le(mulaw: Uint8Array): Uint8Array;
|
|
@@ -2803,6 +3486,8 @@ interface AudioNormalizerOptions {
|
|
|
2803
3486
|
interface AudioNormalizer {
|
|
2804
3487
|
readonly inputFormat: AudioFormat;
|
|
2805
3488
|
readonly outputFormat: AudioFormat;
|
|
3489
|
+
/** Create an independent copy at the current sample-clock position. */
|
|
3490
|
+
fork(): AudioNormalizer;
|
|
2806
3491
|
push(bytes: Uint8Array): Uint8Array;
|
|
2807
3492
|
finishSegment(): Uint8Array;
|
|
2808
3493
|
finish(): Uint8Array;
|
|
@@ -2945,6 +3630,7 @@ type AudioFormatDirection = "input" | "output";
|
|
|
2945
3630
|
declare function supportsAudioFormat(provider: Provider, format: AudioFormat, direction: AudioFormatDirection): boolean;
|
|
2946
3631
|
declare function supportsLanguage(provider: Provider, language: string): boolean;
|
|
2947
3632
|
declare function supportsModel(provider: Provider, model: string): boolean;
|
|
3633
|
+
declare function supportsBatchModel(provider: Provider, model: string): boolean;
|
|
2948
3634
|
declare function requireProviderKind<K extends ProviderKind>(provider: RuntimeProvider, kind: K): ProviderForKind<K>;
|
|
2949
3635
|
|
|
2950
3636
|
interface DefineToolInput<TInput, TOutput> {
|
|
@@ -3509,7 +4195,7 @@ type UpgradeAuthorization<TContext> = {
|
|
|
3509
4195
|
readonly reason?: string;
|
|
3510
4196
|
};
|
|
3511
4197
|
interface NodeMediaPlaneConnection<TContext = unknown> {
|
|
3512
|
-
readonly socket:
|
|
4198
|
+
readonly socket: WebSocket__default;
|
|
3513
4199
|
readonly request: IncomingMessage;
|
|
3514
4200
|
readonly url: URL;
|
|
3515
4201
|
readonly params: Readonly<Record<string, string>>;
|
|
@@ -3517,7 +4203,7 @@ interface NodeMediaPlaneConnection<TContext = unknown> {
|
|
|
3517
4203
|
}
|
|
3518
4204
|
type NodeMediaPlaneConnectionHandler<TContext = unknown> = (connection: NodeMediaPlaneConnection<TContext>) => Promise<void> | void;
|
|
3519
4205
|
type NodeMediaPlaneRequestHandler = (request: IncomingMessage, response: ServerResponse) => boolean | Promise<boolean>;
|
|
3520
|
-
type NodeMediaPlaneConnectionErrorHandler = (error: unknown, socket:
|
|
4206
|
+
type NodeMediaPlaneConnectionErrorHandler = (error: unknown, socket: WebSocket__default) => void | Promise<void>;
|
|
3521
4207
|
interface NodeMediaPlaneOptions<TContext = unknown> {
|
|
3522
4208
|
readonly host?: string;
|
|
3523
4209
|
readonly port: number;
|
|
@@ -3579,12 +4265,17 @@ type AssemblyAiProviderConfig = Omit<AssemblyAiSttProviderOptions, "apiKey" | "m
|
|
|
3579
4265
|
readonly apiKey?: string;
|
|
3580
4266
|
readonly model?: string;
|
|
3581
4267
|
};
|
|
4268
|
+
type CartesiaSttProviderConfig = Omit<CartesiaSttProviderOptions, "apiKey" | "modelId"> & {
|
|
4269
|
+
readonly provider: "cartesia";
|
|
4270
|
+
readonly apiKey?: string;
|
|
4271
|
+
readonly model?: string;
|
|
4272
|
+
};
|
|
3582
4273
|
type SonioxProviderConfig = Omit<SonioxSttProviderOptions, "apiKey" | "modelId"> & {
|
|
3583
4274
|
readonly provider: "soniox";
|
|
3584
4275
|
readonly apiKey?: string;
|
|
3585
4276
|
readonly model?: string;
|
|
3586
4277
|
};
|
|
3587
|
-
type SttProviderConfig = DeepgramProviderConfig | SarvamProviderConfig | ElevenLabsSttProviderConfig | AssemblyAiProviderConfig | SonioxProviderConfig;
|
|
4278
|
+
type SttProviderConfig = DeepgramProviderConfig | SarvamProviderConfig | CartesiaSttProviderConfig | ElevenLabsSttProviderConfig | AssemblyAiProviderConfig | SonioxProviderConfig;
|
|
3588
4279
|
type OpenAiProviderConfig = Omit<OpenAiResponsesLlmProviderOptions, "apiKey"> & {
|
|
3589
4280
|
readonly provider: "openai" | "openai-responses";
|
|
3590
4281
|
readonly apiKey?: string;
|
|
@@ -3605,13 +4296,33 @@ type CartesiaProviderConfig = Omit<CartesiaTtsProviderOptions, "apiKey" | "voice
|
|
|
3605
4296
|
readonly model?: string;
|
|
3606
4297
|
readonly voiceId?: string;
|
|
3607
4298
|
};
|
|
3608
|
-
type ElevenLabsTtsProviderConfig = Omit<ElevenLabsTtsProviderOptions, "apiKey" | "voiceId" | "modelId"> & {
|
|
4299
|
+
type ElevenLabsTtsProviderConfig = (Omit<ElevenLabsTtsProviderOptions, "apiKey" | "voiceId" | "modelId"> & {
|
|
3609
4300
|
readonly provider: "elevenlabs";
|
|
4301
|
+
readonly transport?: "websocket";
|
|
3610
4302
|
readonly apiKey?: string;
|
|
3611
4303
|
readonly model?: string;
|
|
3612
4304
|
readonly voiceId?: string;
|
|
3613
|
-
}
|
|
3614
|
-
|
|
4305
|
+
}) | (Omit<ElevenLabsHttpTtsProviderOptions, "apiKey" | "voiceId" | "modelId"> & {
|
|
4306
|
+
readonly provider: "elevenlabs";
|
|
4307
|
+
readonly transport: "rest" | "http-stream";
|
|
4308
|
+
readonly apiKey?: string;
|
|
4309
|
+
readonly model?: string;
|
|
4310
|
+
readonly voiceId?: string;
|
|
4311
|
+
});
|
|
4312
|
+
type SarvamTtsProviderConfig = (Omit<SarvamTtsProviderOptions, "apiKey" | "modelId" | "voiceId"> & {
|
|
4313
|
+
readonly provider: "sarvam";
|
|
4314
|
+
readonly transport?: "websocket";
|
|
4315
|
+
readonly apiKey?: string;
|
|
4316
|
+
readonly model?: string;
|
|
4317
|
+
readonly voiceId?: string;
|
|
4318
|
+
}) | (Omit<SarvamTtsHttpProviderOptions, "apiKey" | "modelId" | "voiceId"> & {
|
|
4319
|
+
readonly provider: "sarvam";
|
|
4320
|
+
readonly transport: "rest" | "http-stream";
|
|
4321
|
+
readonly apiKey?: string;
|
|
4322
|
+
readonly model?: string;
|
|
4323
|
+
readonly voiceId?: string;
|
|
4324
|
+
});
|
|
4325
|
+
type TtsProviderConfig = CartesiaProviderConfig | ElevenLabsTtsProviderConfig | SarvamTtsProviderConfig;
|
|
3615
4326
|
type TelephonyProviderConfig = {
|
|
3616
4327
|
readonly provider: "web-client-audio";
|
|
3617
4328
|
readonly options?: WebClientAudioProviderOptions;
|
|
@@ -4186,5 +4897,5 @@ declare class PostgresMemory implements Memory {
|
|
|
4186
4897
|
}
|
|
4187
4898
|
declare function createPostgresMemory(options: PostgresMemoryOptions): PostgresMemory;
|
|
4188
4899
|
|
|
4189
|
-
export { ADAPTER_DEFAULTS, AssemblyAiSttProvider, AsyncQueue, AsyncQueueConsumerError, BackendUnavailableError, CartesiaTtsProvider, ConversationPolicy, CorruptRecordError, DEFAULT_DURABLE_RUNTIME_POLICY, DTMF_DIGITS, DeepgramSttProvider, DurableError, EVENT_KIND_MAP, ElevenLabsSttProvider, ElevenLabsTtsProvider, InMemoryMemory, InMemorySessionLeaseStore, InMemorySessionStore, InMemoryToolCallStore, InMemoryToolIdempotencyStore, InMemoryTurnStore, InvalidArgumentError, LeaseLostError, LeaseUnavailableError, MemoryBackendUnavailableError, MemoryEntryTooLargeError, MemorySessionQuotaExceededError, NodeMediaPlane, PCM16_16K_MONO, PCM16_8K_MONO, PROVIDER_API_VERSIONS, PROVIDER_CATALOG, PROVIDER_ERROR_CODES, PROVIDER_NAMES, PROVIDER_STABILITY, PipelineVoiceLoop, PipelineVoiceLoopBuilder, RUNTIME_SAMPLE_RATE_HZ, RecordConflictError, RecordNotFoundError, STT_ERROR_CODES, STT_STREAM_ENDED_REASON, SarvamSttProvider, SessionReaper, SessionRecoveryCoordinator, SonioxSttProvider, TELEPHONY_SAMPLE_RATE_HZ, TVIC_ERROR_CODES, TVIC_ERROR_CODE_ALIASES, TVIC_ERROR_MARKER, TVIC_ERROR_NAMES, TvicThrowableError, TwilioMediaStreamCallHandle, TwilioMediaStreamsProvider, VoiceRuntimeFinalizationError, WEB_CLIENT_AUDIO_CLOSE_CODES, WEB_CLIENT_AUDIO_DEFAULTS, WebClientAudioCallHandle, WebClientAudioProvider, assertMemoryCapability, assertMemoryPolicySupported, assertPcm16leFormat, authError, base64ToBytes, bytesToBase64, cancelledError, canonicalizeTwilioData, computeTwilioSignature, connectionError, counterIdGenerator, createAssemblyAiSttProvider, createAudioNormalizer, createCartesiaTtsProvider, createDeepgramSttProvider, createDefaultIdGenerator, createElevenLabsSttProvider, createElevenLabsTtsProvider, createGroqChatLlmProvider, createInMemoryDurableRuntimeStore, createInMemoryMemory, createInMemorySessionStore, createInMemoryToolCallStore, createInMemoryTurnStore, createMediaEvent, createNodeMediaPlane, createOpenAiResponsesLlmProvider, createPostgresDurableRuntimeStore, createPostgresMemory, createPostgresRedisDurableRuntimeStore, createRedisDurableRuntimeStore, createRuntime, createSarvamSttProvider, createSonioxSttProvider, createSttSession, createSystemClock, createToolRegistry, createTwilioMediaStreamsProvider, createVoiceAgent, createWebClientAudioProvider, defineAgent, defineTool, deliverAssistantText, durationMsForPcm16le, evaluateProviderCompatibility, executeTool, formatMemoryContextAsSystemBlock, formatPreCallContextAsSystemBlock, frameCountForPcm16le, getSttRecoveryControl, idempotencyKeyFor, idempotencyRequestHashFor, internalError, interruptedError, isDtmfDigit, isIncrementalTextToSpeechProvider, isInputMediaEvent, isNormalizedError, isOutputMediaEvent, isProviderKind, isReconstructableAudioFormat, isSampleRateHz, isTerminalSession, isTerminalTurn, isTranscriptSegmentEvent, isTvicError, isTvicErrorName, kindForMediaEvent, matchPath, mediaError, monotonicOffsetMs, mulawToPcm16le, normalizeLegacyError, normalizeUnknownError, normalizedError, nowTimestamp, pcm16leToMulaw, providerError, rateLimitError, requireProviderKind, resamplePcm16le, resolvePreCallContext, resolvePreCallMemory, runPostgresMemoryMigrations, runPostgresMigrations, sameAudioFormat, shouldDeliverText, signVoiceSessionToken, signatureError, splitPcm16leFrames, stableStringify, supportsAudioFormat, supportsLanguage, supportsModel, terminalSessionFromRequest, terminalSourceForRequest, terminalTurnFromRequest, timeoutError, toTimestamp, toolError, toolInputError, tvicErrorFromJSON, unknownErrorMessage, validateJsonSchemaSubset, validationError, verifyTwilioSignature, verifyVoiceSessionToken, withSttReconnect };
|
|
4190
|
-
export type { ActiveSession, ActiveTurn, Agent, AgentAudioPolicy, AgentContextPolicy, AgentId, AgentMemoryPolicy, AgentProviders, AnyMediaEventInit, AssemblyAiProviderConfig, AssemblyAiSttProviderOptions, AssistantTextRecord, AudioFormat, AudioNormalizationMode, AudioNormalizer, AudioNormalizerOptions, AudioPayload, BackoffStrategy, Brand, Call, CallControlCapability, CallDirection, CallHandle, CallId, CallSnapshot, CallStatus, CancelledSession, CancelledTurn, CartesiaProviderConfig, CartesiaTtsProviderOptions, ChannelKind, ChannelLayout, CleanupErrorSummary, CleanupStage, Clock, CompletedSession, CompletedTurn, ConnectedCall, ConnectionObservabilityEvent, ConversationPolicyOptions, CounterIdGenerator, CreateVoiceAgentOptions, CreatedCall, CreatedSession, DeepgramProviderConfig, DeepgramSttProviderOptions, DefineAgentInput, DefineToolInput, DtmfDigit, DtmfReceivedEvent, DualProtocolResult, DurableErrorCode, DurableOutboxEvent, DurableRuntimeMetric, DurableRuntimePolicy, DurableRuntimeStore, DurableSessionTransaction, ElevenLabsSttCommitStrategy, ElevenLabsSttProviderConfig, ElevenLabsSttProviderOptions, ElevenLabsTtsProviderConfig, ElevenLabsTtsProviderOptions, EndSessionReason, EndSessionRequest, EndTurnRequest, EndedCall, ErrorCategory, ExecuteToolInput, FailedCall, FailedSession, FailedToolCall, FailedToolCallStatus, FailedTurn, GroqChatLlmProviderOptions, GroqProviderConfig, HealthCheckResult, HealthSnapshot, IdGenerator, IdempotencyPolicy, InMemoryDurableRuntimeStore, InMemoryDurableRuntimeStoreOptions, InMemoryMemoryOptions, InboundCallContext, InboundMediaEvent, IncrementalTextToSpeechProvider, InputAudioChunk, InputMediaEvent, InternalMediaEvent, InterruptRequestedEvent, InterruptionMode, InterruptionPolicy, JsonSchemaDocument, JsonValue, LLMProvider, LiveTerminalSource, LlmCompletion, LlmCompletionRequest, LlmInlineToolCall, LlmMessage, LlmMessageRole, LlmProviderConfig, LlmStreamEvent, LlmUsage, MediaAudioChunkEvent, MediaAudioCommittedEvent, MediaDirection, MediaErrorEvent, MediaEvent, MediaEventId, MediaEventKind, MediaEventType, MediaStreamEndedEvent, MediaStreamStartedEvent, MediaTransport, MediaTransportKind, Memory, MemoryCapabilities, MemoryEntry, MemoryEntryId, MemoryKind, MemoryPutOptions, MemoryQuery, MemoryRef, MemoryScope, NodeMediaPlaneConnection, NodeMediaPlaneConnectionErrorHandler, NodeMediaPlaneConnectionHandler, NodeMediaPlaneOptions, NodeMediaPlaneRequestHandler, NormalizedAudioEncoding, NormalizedError, OpenAiProviderConfig, OpenAiResponsesLlmProviderOptions, OrganizationId, OutboundCallRequest, OutputAudioChunk, OutputMediaEvent, PersonaConfig, PipelineVoiceLoopOptions, PipelineVoiceLoopResult, PostgresDurableStoreOptions, PostgresMemoryOptions, PostgresMigration, PostgresRedisDurableStoreOptions, PreCallContext, PreCallContextResolver, PreCallMemoryContext, PreCallMemoryResolver, Provider, ProviderAudioCapabilities, ProviderCancellationCapabilities, ProviderCapabilities, ProviderCatalogEntry, ProviderCompatibility, ProviderCompatibilityIssue, ProviderCompatibilityIssueCode, ProviderDataPolicy, ProviderEventId, ProviderForKind, ProviderKind, ProviderPlayoutCapabilities, ProviderRequirements, ProviderStability, ProviderStreamingCapabilities, ProviderToolCapabilities, ProviderTransport, QueuedToolCall, RecoveryPollResult, RedisClient, RedisMulti, RedisScanOptions, RedisSetResult, RedisStoreOptions, RequiredProviderCapabilities, RetryPolicy, RingingCall, RunningToolCall, Runtime, RuntimeOptions, RuntimeProvider, RuntimeServiceLifecycle, SampleRateHz, SarvamOutputMode, SarvamProviderConfig, SarvamSttProviderOptions, SchemaValidationResult, Session, SessionAttachment, SessionAttachmentHealth, SessionCancellationReason, SessionEndEvent, SessionEndMemorySnapshot, SessionId, SessionLease, SessionLeaseStore, SessionMemoryFinalization, SessionMetricsRecorder, SessionReaperOptions, SessionRecoveryCoordinatorOptions, SessionRuntimeMetadata, SessionSnapshot, SessionState, SessionStatus, SessionStore, SonioxProviderConfig, SonioxStructuredContext, SonioxSttProviderOptions, SpeechToTextProvider, SqlClient$1 as SqlClient, SqlPool$1 as SqlPool, SqlResult, StartAttachedSessionOptions, StartSessionOptions, StartTurnRequest, StartingSession, StoredSessionRecord, StoredToolCallRecord, StoredTurnRecord, StreamEndReason, SttCommitMode, SttOpenRequest, SttProviderConfig, SttReconnectOptions, SttRecoveryControl, SttRecoveryState, SttSession, SttSessionInputOptions, SttSessionOptions, SttStream, SttTimestampOrigin, SucceededToolCall, TelephonyProvider, TelephonyProviderConfig, TerminalSession, TerminalSessionDraft, TerminalSessionStatus, TerminalSource, TerminalToolCall, TerminalTurn, TextDeliveryMode, TextToSpeechProvider, TimeoutAction, TimeoutPolicy, Timestamp, ToolCall, ToolCallId, ToolCallRuntimeMetadata, ToolCallStatus, ToolCallStore, ToolDefinition, ToolExecutionContext, ToolExecutor, ToolId, ToolIdempotencyClaim, ToolIdempotencyClaimResult, ToolIdempotencyLease, ToolIdempotencyOutcome, ToolIdempotencyRecord, ToolIdempotencyStatus, ToolIdempotencyStore, ToolLogger, ToolName, ToolRegistry, ToolTenant, TranscriptEndpointEvent, TranscriptEndpointReason, TranscriptEvent, TranscriptEventType, TranscriptSegmentEvent, TranscriptSegmentEventType, TranscriptSpeechStartedEvent, TransportAudioEncoding, TransportAudioFormat, TtsAlignmentEvent, TtsAlignmentUnit, TtsEvent, TtsFlushAcknowledgement, TtsFlushCompletedEvent, TtsFlushId, TtsFlushResult, TtsProviderConfig, TtsSession, TtsSessionOpenRequest, TtsStream, TtsSynthesisRequest, Turn, TurnCancellationReason, TurnCommitRequestedEvent, TurnDetectionMode, TurnId, TurnInput, TurnLatency, TurnLatencyRecord, TurnOutput, TurnRuntimeMetadata, TurnStatus, TurnStore, TvicErrorName, TwilioFlatParams, TwilioMediaStreamCallHandleOptions, TwilioMediaStreamSocket, TwilioParamValue, TwilioParams, UpgradeAuthorization, UserId, VerifyTwilioOptions, VerifyVoiceSessionTokenOptions, VoiceAgent, VoiceAgentCallHandleContext, VoiceAgentCallHandleFactory, VoiceAgentModels, VoiceAgentProviderNames, VoiceAgentProviders, VoiceAgentRun, VoiceAgentRunOptions, VoiceAgentSession, VoiceEvent, VoiceRuntimeFailureMetadata, WebClientAudioCallHandleOptions, WebClientAudioConnectionEvent, WebClientAudioProviderOptions, WebClientAudioSocket, WorkflowId };
|
|
4900
|
+
export { ADAPTER_DEFAULTS, AssemblyAiSttProvider, AsyncQueue, AsyncQueueConsumerError, BackendUnavailableError, CartesiaSttProvider, CartesiaTtsProvider, ConversationPolicy, CorruptRecordError, DEFAULT_DURABLE_RUNTIME_POLICY, DTMF_DIGITS, DeepgramSttProvider, DurableError, EVENT_KIND_MAP, ElevenLabsSttProvider, ElevenLabsTtsHttpStreamProvider, ElevenLabsTtsProvider, ElevenLabsTtsRestProvider, InMemoryMemory, InMemorySessionLeaseStore, InMemorySessionStore, InMemoryToolCallStore, InMemoryToolIdempotencyStore, InMemoryTurnStore, InvalidArgumentError, LeaseLostError, LeaseUnavailableError, MAX_CARTESIA_INPUT_UTF16_CODE_UNITS, MAX_CARTESIA_INPUT_UTF8_BYTES, MAX_PROVIDER_AUDIO_OFFSET_MS, MemoryBackendUnavailableError, MemoryEntryTooLargeError, MemorySessionQuotaExceededError, NodeMediaPlane, PCM16_16K_MONO, PCM16_8K_MONO, PROVIDER_API_VERSIONS, PROVIDER_CATALOG, PROVIDER_ERROR_CODES, PROVIDER_NAMES, PROVIDER_STABILITY, PROVIDER_STABILITY_LEVELS, PipelineVoiceLoop, PipelineVoiceLoopBuilder, RUNTIME_SAMPLE_RATE_HZ, RecordConflictError, RecordNotFoundError, STT_ERROR_CODES, STT_STREAM_ENDED_REASON, SarvamSttProvider, SarvamTtsHttpStreamProvider, SarvamTtsProvider, SarvamTtsRestProvider, SessionReaper, SessionRecoveryCoordinator, SonioxSttProvider, TELEPHONY_SAMPLE_RATE_HZ, TVIC_ERROR_CODES, TVIC_ERROR_CODE_ALIASES, TVIC_ERROR_MARKER, TVIC_ERROR_NAMES, TWILIO_MAX_AUDIO_EVENT_BYTES, TvicThrowableError, TwilioMediaStreamCallHandle, TwilioMediaStreamsProvider, VoiceRuntimeFinalizationError, WEB_CLIENT_AUDIO_ACK_RETENTION_MS, WEB_CLIENT_AUDIO_CLOSE_CODES, WEB_CLIENT_AUDIO_DEFAULTS, WebClientAudioCallHandle, WebClientAudioProvider, assertMemoryCapability, assertMemoryPolicySupported, assertPcm16leFormat, authError, base64ToBytes, bytesToBase64, cancelledError, canonicalizeTwilioData, computeTwilioSignature, connectionError, counterIdGenerator, createAssemblyAiSttProvider, createAudioNormalizer, createCartesiaSttProvider, createCartesiaTtsProvider, createDeepgramSttProvider, createDefaultIdGenerator, createElevenLabsSttProvider, createElevenLabsTtsHttpStreamProvider, createElevenLabsTtsProvider, createElevenLabsTtsRestProvider, createGroqChatLlmProvider, createInMemoryDurableRuntimeStore, createInMemoryMemory, createInMemorySessionStore, createInMemoryToolCallStore, createInMemoryTurnStore, createMediaEvent, createNodeMediaPlane, createOpenAiResponsesLlmProvider, createPostgresDurableRuntimeStore, createPostgresMemory, createPostgresRedisDurableRuntimeStore, createRedisDurableRuntimeStore, createRuntime, createSarvamSttProvider, createSarvamTtsHttpStreamProvider, createSarvamTtsProvider, createSarvamTtsRestProvider, createSonioxSttProvider, createSttSession, createSystemClock, createToolRegistry, createTtsFailoverProvider, createTwilioMediaStreamsProvider, createVoiceAgent, createWebClientAudioProvider, defineAgent, defineTool, deliverAssistantText, durationMsForPcm16le, evaluateProviderCompatibility, executeTool, formatMemoryContextAsSystemBlock, formatPreCallContextAsSystemBlock, frameCountForPcm16le, getSttRecoveryControl, idempotencyKeyFor, idempotencyRequestHashFor, internalError, interruptedError, isDtmfDigit, isIncrementalTextToSpeechProvider, isInputMediaEvent, isNormalizedError, isOutputMediaEvent, isProviderKind, isReconstructableAudioFormat, isSampleRateHz, isTerminalSession, isTerminalTurn, isTranscriptSegmentEvent, isTvicError, isTvicErrorName, kindForMediaEvent, matchPath, mediaError, monotonicOffsetMs, mulawToPcm16le, normalizeLegacyError, normalizeUnknownError, normalizedError, nowTimestamp, pcm16leToMulaw, providerError, rateLimitError, requireProviderKind, resamplePcm16le, resolvePreCallContext, resolvePreCallMemory, runPostgresMemoryMigrations, runPostgresMigrations, sameAudioFormat, shouldDeliverText, signVoiceSessionToken, signatureError, splitPcm16leFrames, stableStringify, supportsAudioFormat, supportsBatchModel, supportsLanguage, supportsModel, terminalSessionFromRequest, terminalSourceForRequest, terminalTurnFromRequest, timeoutError, toTimestamp, toolError, toolInputError, tvicErrorFromJSON, unknownErrorMessage, validateJsonSchemaSubset, validationError, verifyTwilioSignature, verifyVoiceSessionToken, withSttReconnect };
|
|
4901
|
+
export type { ActiveSession, ActiveTurn, Agent, AgentAudioPolicy, AgentContextPolicy, AgentId, AgentMemoryPolicy, AgentProviders, AnyMediaEventInit, AssemblyAiProviderConfig, AssemblyAiSttProviderOptions, AssistantTextRecord, AudioFormat, AudioNormalizationMode, AudioNormalizer, AudioNormalizerOptions, AudioPayload, BackoffStrategy, Brand, Call, CallControlCapability, CallDirection, CallHandle, CallId, CallSnapshot, CallStatus, CancelledSession, CancelledTurn, CartesiaGenerationConfig, CartesiaProviderConfig, CartesiaSttMode, CartesiaSttProviderConfig, CartesiaSttProviderOptions, CartesiaTtsProviderOptions, ChannelKind, ChannelLayout, CleanupErrorSummary, CleanupStage, Clock, CompletedSession, CompletedTurn, ConnectedCall, ConnectionObservabilityEvent, ConversationPolicyOptions, CounterIdGenerator, CreateVoiceAgentOptions, CreatedCall, CreatedSession, DeepgramProviderConfig, DeepgramSttProviderOptions, DefineAgentInput, DefineToolInput, DtmfDigit, DtmfReceivedEvent, DualProtocolResult, DurableErrorCode, DurableOutboxEvent, DurableRuntimeMetric, DurableRuntimePolicy, DurableRuntimeStore, DurableSessionTransaction, ElevenLabsBatchSttRequest, ElevenLabsBatchSttResult, ElevenLabsBatchTimestampGranularity, ElevenLabsDialogueInput, ElevenLabsDialogueProvider, ElevenLabsDialogueSynthesisRequest, ElevenLabsDialogueTurnOptions, ElevenLabsEntityDetection, ElevenLabsHttpTtsProviderOptions, ElevenLabsPronunciationDictionaryLocator, ElevenLabsSttCommitStrategy, ElevenLabsSttProviderConfig, ElevenLabsSttProviderOptions, ElevenLabsTextNormalization, ElevenLabsTtsHttpSynthesisRequest, ElevenLabsTtsProviderConfig, ElevenLabsTtsProviderOptions, ElevenLabsTtsSendTextOptions, EndSessionReason, EndSessionRequest, EndTurnRequest, EndedCall, ErrorCategory, ExecuteToolInput, FailedCall, FailedSession, FailedToolCall, FailedToolCallStatus, FailedTurn, GroqChatLlmProviderOptions, GroqProviderConfig, HealthCheckResult, HealthSnapshot, IdGenerator, IdempotencyPolicy, InMemoryDurableRuntimeStore, InMemoryDurableRuntimeStoreOptions, InMemoryMemoryOptions, InboundCallContext, InboundMediaEvent, IncrementalTextToSpeechProvider, InputAudioChunk, InputMediaEvent, InternalMediaEvent, InterruptRequestedEvent, InterruptionMode, InterruptionPolicy, JsonSchemaDocument, JsonValue, LLMProvider, LiveTerminalSource, LlmCompletion, LlmCompletionRequest, LlmInlineToolCall, LlmMessage, LlmMessageRole, LlmProviderConfig, LlmStreamEvent, LlmUsage, MediaAudioChunkEvent, MediaAudioCommittedEvent, MediaDirection, MediaErrorEvent, MediaEvent, MediaEventId, MediaEventKind, MediaEventType, MediaStreamEndedEvent, MediaStreamStartedEvent, MediaTransport, MediaTransportKind, Memory, MemoryCapabilities, MemoryEntry, MemoryEntryId, MemoryKind, MemoryPutOptions, MemoryQuery, MemoryRef, MemoryScope, NodeMediaPlaneConnection, NodeMediaPlaneConnectionErrorHandler, NodeMediaPlaneConnectionHandler, NodeMediaPlaneOptions, NodeMediaPlaneRequestHandler, NormalizedAudioEncoding, NormalizedError, OpenAiProviderConfig, OpenAiResponsesLlmProviderOptions, OrganizationId, OutboundCallRequest, OutputAudioChunk, OutputMediaEvent, PersonaConfig, PipelineVoiceLoopOptions, PipelineVoiceLoopResult, PostgresDurableStoreOptions, PostgresMemoryOptions, PostgresMigration, PostgresRedisDurableStoreOptions, PreCallContext, PreCallContextResolver, PreCallMemoryContext, PreCallMemoryResolver, Provider, ProviderAudioCapabilities, ProviderBatchCapabilities, ProviderCancellationCapabilities, ProviderCapabilities, ProviderCatalogEntry, ProviderClock, ProviderCompatibility, ProviderCompatibilityIssue, ProviderCompatibilityIssueCode, ProviderDataPolicy, ProviderEventId, ProviderForKind, ProviderKind, ProviderPlayoutCapabilities, ProviderRequirements, ProviderStability, ProviderStreamingCapabilities, ProviderToolCapabilities, ProviderTransport, QueuedToolCall, RecoveryPollResult, RedisClient, RedisMulti, RedisScanOptions, RedisSetResult, RedisStoreOptions, RequiredProviderCapabilities, RetryPolicy, RingingCall, RunningToolCall, Runtime, RuntimeOptions, RuntimeProvider, RuntimeServiceLifecycle, SampleRateHz, SarvamOutputMode, SarvamProviderConfig, SarvamSttProviderOptions, SarvamTtsHttpProviderOptions, SarvamTtsProviderConfig, SarvamTtsProviderOptions, SchemaValidationResult, Session, SessionAttachment, SessionAttachmentHealth, SessionCancellationReason, SessionEndEvent, SessionEndMemorySnapshot, SessionId, SessionLease, SessionLeaseStore, SessionMemoryFinalization, SessionMetricsRecorder, SessionReaperOptions, SessionRecoveryCoordinatorOptions, SessionRuntimeMetadata, SessionSnapshot, SessionState, SessionStatus, SessionStore, SonioxProviderConfig, SonioxStructuredContext, SonioxSttProviderOptions, SpeechToTextProvider, SqlClient$1 as SqlClient, SqlPool$1 as SqlPool, SqlResult, StartAttachedSessionOptions, StartSessionOptions, StartTurnRequest, StartingSession, StoredSessionRecord, StoredToolCallRecord, StoredTurnRecord, StreamEndReason, SttBatchTimestampGranularity, SttBatchTranscription, SttBatchTranscriptionRequest, SttBatchWord, SttCommitMode, SttOpenRequest, SttProviderConfig, SttReconnectOptions, SttRecoveryControl, SttRecoveryState, SttSession, SttSessionInputOptions, SttSessionOptions, SttStream, SttTimestampOrigin, SucceededToolCall, TelephonyProvider, TelephonyProviderConfig, TerminalSession, TerminalSessionDraft, TerminalSessionStatus, TerminalSource, TerminalToolCall, TerminalTurn, TextDeliveryMode, TextToSpeechProvider, TimeoutAction, TimeoutPolicy, Timestamp, ToolCall, ToolCallId, ToolCallRuntimeMetadata, ToolCallStatus, ToolCallStore, ToolDefinition, ToolExecutionContext, ToolExecutor, ToolId, ToolIdempotencyClaim, ToolIdempotencyClaimResult, ToolIdempotencyLease, ToolIdempotencyOutcome, ToolIdempotencyRecord, ToolIdempotencyStatus, ToolIdempotencyStore, ToolLogger, ToolName, ToolRegistry, ToolTenant, TranscriptEndpointEvent, TranscriptEndpointReason, TranscriptEvent, TranscriptEventType, TranscriptSegmentEvent, TranscriptSegmentEventType, TranscriptSpeechStartedEvent, TransportAudioEncoding, TransportAudioFormat, TtsAlignmentEvent, TtsAlignmentUnit, TtsEvent, TtsFailoverContext, TtsFailoverPhase, TtsFailoverProviderOptions, TtsFlushAcknowledgement, TtsFlushCompletedEvent, TtsFlushId, TtsFlushResult, TtsProviderConfig, TtsSession, TtsSessionOpenRequest, TtsStream, TtsSynthesisRequest, Turn, TurnCancellationReason, TurnCommitRequestedEvent, TurnDetectionMode, TurnId, TurnInput, TurnLatency, TurnLatencyRecord, TurnOutput, TurnRuntimeMetadata, TurnStatus, TurnStore, TvicErrorName, TwilioFlatParams, TwilioMediaStreamCallHandleOptions, TwilioMediaStreamSocket, TwilioParamValue, TwilioParams, UpgradeAuthorization, UserId, VerifyTwilioOptions, VerifyVoiceSessionTokenOptions, VoiceAgent, VoiceAgentCallHandleContext, VoiceAgentCallHandleFactory, VoiceAgentModels, VoiceAgentProviderNames, VoiceAgentProviders, VoiceAgentRun, VoiceAgentRunOptions, VoiceAgentSession, VoiceEvent, VoiceRuntimeFailureMetadata, WebClientAudioCallHandleOptions, WebClientAudioConnectionEvent, WebClientAudioProviderOptions, WebClientAudioSocket, WorkflowId };
|