@speeq/core 0.3.0 → 0.5.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.
Files changed (42) hide show
  1. package/dist/chunk-CELQUH6A.js +166 -0
  2. package/dist/chunk-CELQUH6A.js.map +1 -0
  3. package/dist/{chunk-JA2L35IQ.js → chunk-FRW2OUQL.js} +8 -2
  4. package/dist/chunk-FRW2OUQL.js.map +1 -0
  5. package/dist/chunk-PU7PGHHO.js +421 -0
  6. package/dist/chunk-PU7PGHHO.js.map +1 -0
  7. package/dist/errors.cjs +6 -0
  8. package/dist/errors.cjs.map +1 -1
  9. package/dist/errors.d.cts +1 -1
  10. package/dist/errors.d.ts +1 -1
  11. package/dist/errors.js +1 -1
  12. package/dist/index-DPp4Fwdy.d.cts +236 -0
  13. package/dist/index-I0oTxGMf.d.ts +236 -0
  14. package/dist/index.cjs +365 -0
  15. package/dist/index.cjs.map +1 -1
  16. package/dist/index.d.cts +176 -3
  17. package/dist/index.d.ts +176 -3
  18. package/dist/index.js +87 -4
  19. package/dist/index.js.map +1 -1
  20. package/dist/manifest.cjs +230 -0
  21. package/dist/manifest.cjs.map +1 -0
  22. package/dist/manifest.d.cts +2523 -0
  23. package/dist/manifest.d.ts +2523 -0
  24. package/dist/manifest.js +218 -0
  25. package/dist/manifest.js.map +1 -0
  26. package/dist/speech-http.cjs +346 -0
  27. package/dist/speech-http.cjs.map +1 -0
  28. package/dist/speech-http.d.cts +41 -0
  29. package/dist/speech-http.d.ts +41 -0
  30. package/dist/speech-http.js +264 -0
  31. package/dist/speech-http.js.map +1 -0
  32. package/dist/speech-provider-D0YChUSt.d.cts +103 -0
  33. package/dist/speech-provider-D0YChUSt.d.ts +103 -0
  34. package/dist/utils.cjs +237 -0
  35. package/dist/utils.cjs.map +1 -1
  36. package/dist/utils.d.cts +2 -156
  37. package/dist/utils.d.ts +2 -156
  38. package/dist/utils.js +3 -2
  39. package/package.json +24 -2
  40. package/dist/chunk-JA2L35IQ.js.map +0 -1
  41. package/dist/chunk-JOTEKM5R.js +0 -318
  42. package/dist/chunk-JOTEKM5R.js.map +0 -1
package/dist/index.d.cts CHANGED
@@ -1,6 +1,9 @@
1
1
  export { DEFAULT_ERROR_MESSAGES, ERROR_CODES, ERROR_HTTP_STATUS, ErrorCode, PublicError, SpeeqError, SpeeqErrorOptions, isAbortError, isErrorCode, isSpeeqError, toPublicError, toSpeeqError } from './errors.cjs';
2
2
  import { z } from 'zod';
3
- export { DEFAULT_SECRET_KEYS, Listener, REDACTED, SafeJsonResult, SentenceChunker, SentenceChunkerOptions, SseMessage, SseParser, TruncateResult, TypedEmitter, combineSignals, createId, encodeSse, mapProviderHttpError, parseRetryAfter, providerFetch, readSseData, redactKeys, redactText, safeJsonParse, safeJsonStringify, sleep, truncate } from './utils.cjs';
3
+ import { a as StreamingMode, V as VoiceInfo } from './speech-provider-D0YChUSt.cjs';
4
+ export { A as AudioFormat, P as ProviderKind, b as SttCapabilities, c as SttHints, S as SttProvider, d as SttRequest, e as SttResult, f as TtsCapabilities, T as TtsProvider, g as TtsRequest, h as TtsResult, i as VoiceParam } from './speech-provider-D0YChUSt.cjs';
5
+ import { V as Vocabulary } from './index-DPp4Fwdy.cjs';
6
+ export { C as CorrectionChange, a as CorrectionOptions, b as CorrectionResult, D as DEFAULT_SECRET_KEYS, L as Listener, R as REDACTED, S as SafeJsonResult, c as ScriptName, d as SentenceChunker, e as SentenceChunkerOptions, f as SseMessage, g as SseParser, T as TruncateResult, h as TypedEmitter, i as VocabularyTerm, j as autoVocabulary, k as baseLanguage, l as combineSignals, m as correctWithVocabulary, n as createId, o as detectScripts, p as encodeSse, q as guessLanguageFromScript, r as mapProviderHttpError, s as parseRetryAfter, t as providerFetch, u as readSseData, v as redactKeys, w as redactText, x as safeJsonParse, y as safeJsonStringify, z as sleep, A as sttPromptFromVocabulary, B as toIso639_1, E as truncate, F as vocabularyHints } from './index-DPp4Fwdy.cjs';
4
7
 
5
8
  /** Version of the HTTP + SSE protocol. Every protocol event carries it. */
6
9
  declare const PROTOCOL_VERSION: 1;
@@ -25,6 +28,8 @@ declare const ErrorCodeSchema: z.ZodEnum<{
25
28
  NOT_FOUND: "NOT_FOUND";
26
29
  CONFLICT: "CONFLICT";
27
30
  RATE_LIMITED: "RATE_LIMITED";
31
+ SPEECH_UNAVAILABLE: "SPEECH_UNAVAILABLE";
32
+ PAYLOAD_TOO_LARGE: "PAYLOAD_TOO_LARGE";
28
33
  PROVIDER_ERROR: "PROVIDER_ERROR";
29
34
  TOOL_ERROR: "TOOL_ERROR";
30
35
  TOOL_TIMEOUT: "TOOL_TIMEOUT";
@@ -201,6 +206,13 @@ interface LLMProvider {
201
206
  stream(request: LLMRequest): AsyncIterable<LLMStreamChunk>;
202
207
  }
203
208
 
209
+ /** Recognition features exposed by a client input. */
210
+ interface SpeechInputCapabilities {
211
+ streaming: StreamingMode;
212
+ detectsLanguage: boolean;
213
+ processing: "local" | "remote";
214
+ providerId?: string;
215
+ }
204
216
  /** Callbacks for a {@link SpeechInput} recognition session. */
205
217
  interface SpeechInputHandlers {
206
218
  /** Partial transcript while the user is speaking. */
@@ -235,6 +247,7 @@ interface SpeechInputOptions {
235
247
  }
236
248
  /** Speech-to-text. The default implementation uses the browser Web Speech API. */
237
249
  interface SpeechInput {
250
+ readonly capabilities?: SpeechInputCapabilities;
238
251
  /** Whether speech recognition can work in this environment. */
239
252
  readonly supported: boolean;
240
253
  start(options: SpeechInputOptions, handlers: SpeechInputHandlers): void;
@@ -245,11 +258,18 @@ interface SpeechInput {
245
258
  }
246
259
  /** Options for {@link SpeechOutput.speak}. */
247
260
  interface SpeakOptions {
261
+ voiceId?: string;
262
+ rate?: number;
263
+ pitch?: number;
264
+ volume?: number;
265
+ style?: string;
248
266
  language: string;
249
267
  signal?: AbortSignal;
250
268
  }
251
269
  /** Text-to-speech. The default implementation uses the browser `speechSynthesis` API. */
252
270
  interface SpeechOutput {
271
+ prepare?(text: string, options: SpeakOptions): void;
272
+ listVoices?(language?: string): Promise<readonly VoiceInfo[]>;
253
273
  /** Whether speech synthesis exists in this environment. */
254
274
  readonly supported: boolean;
255
275
  /** Whether a voice exists for `language` on this device. */
@@ -330,6 +350,8 @@ declare const ConversationEventBodySchema: z.ZodDiscriminatedUnion<[z.ZodObject<
330
350
  NOT_FOUND: "NOT_FOUND";
331
351
  CONFLICT: "CONFLICT";
332
352
  RATE_LIMITED: "RATE_LIMITED";
353
+ SPEECH_UNAVAILABLE: "SPEECH_UNAVAILABLE";
354
+ PAYLOAD_TOO_LARGE: "PAYLOAD_TOO_LARGE";
333
355
  PROVIDER_ERROR: "PROVIDER_ERROR";
334
356
  TOOL_ERROR: "TOOL_ERROR";
335
357
  TOOL_TIMEOUT: "TOOL_TIMEOUT";
@@ -374,6 +396,8 @@ declare const ConversationEventBodySchema: z.ZodDiscriminatedUnion<[z.ZodObject<
374
396
  NOT_FOUND: "NOT_FOUND";
375
397
  CONFLICT: "CONFLICT";
376
398
  RATE_LIMITED: "RATE_LIMITED";
399
+ SPEECH_UNAVAILABLE: "SPEECH_UNAVAILABLE";
400
+ PAYLOAD_TOO_LARGE: "PAYLOAD_TOO_LARGE";
377
401
  PROVIDER_ERROR: "PROVIDER_ERROR";
378
402
  TOOL_ERROR: "TOOL_ERROR";
379
403
  TOOL_TIMEOUT: "TOOL_TIMEOUT";
@@ -468,6 +492,8 @@ declare const NewConversationEventSchema: z.ZodIntersection<z.ZodObject<{
468
492
  NOT_FOUND: "NOT_FOUND";
469
493
  CONFLICT: "CONFLICT";
470
494
  RATE_LIMITED: "RATE_LIMITED";
495
+ SPEECH_UNAVAILABLE: "SPEECH_UNAVAILABLE";
496
+ PAYLOAD_TOO_LARGE: "PAYLOAD_TOO_LARGE";
471
497
  PROVIDER_ERROR: "PROVIDER_ERROR";
472
498
  TOOL_ERROR: "TOOL_ERROR";
473
499
  TOOL_TIMEOUT: "TOOL_TIMEOUT";
@@ -512,6 +538,8 @@ declare const NewConversationEventSchema: z.ZodIntersection<z.ZodObject<{
512
538
  NOT_FOUND: "NOT_FOUND";
513
539
  CONFLICT: "CONFLICT";
514
540
  RATE_LIMITED: "RATE_LIMITED";
541
+ SPEECH_UNAVAILABLE: "SPEECH_UNAVAILABLE";
542
+ PAYLOAD_TOO_LARGE: "PAYLOAD_TOO_LARGE";
515
543
  PROVIDER_ERROR: "PROVIDER_ERROR";
516
544
  TOOL_ERROR: "TOOL_ERROR";
517
545
  TOOL_TIMEOUT: "TOOL_TIMEOUT";
@@ -609,6 +637,8 @@ declare const ConversationEventSchema: z.ZodIntersection<z.ZodObject<{
609
637
  NOT_FOUND: "NOT_FOUND";
610
638
  CONFLICT: "CONFLICT";
611
639
  RATE_LIMITED: "RATE_LIMITED";
640
+ SPEECH_UNAVAILABLE: "SPEECH_UNAVAILABLE";
641
+ PAYLOAD_TOO_LARGE: "PAYLOAD_TOO_LARGE";
612
642
  PROVIDER_ERROR: "PROVIDER_ERROR";
613
643
  TOOL_ERROR: "TOOL_ERROR";
614
644
  TOOL_TIMEOUT: "TOOL_TIMEOUT";
@@ -653,6 +683,8 @@ declare const ConversationEventSchema: z.ZodIntersection<z.ZodObject<{
653
683
  NOT_FOUND: "NOT_FOUND";
654
684
  CONFLICT: "CONFLICT";
655
685
  RATE_LIMITED: "RATE_LIMITED";
686
+ SPEECH_UNAVAILABLE: "SPEECH_UNAVAILABLE";
687
+ PAYLOAD_TOO_LARGE: "PAYLOAD_TOO_LARGE";
656
688
  PROVIDER_ERROR: "PROVIDER_ERROR";
657
689
  TOOL_ERROR: "TOOL_ERROR";
658
690
  TOOL_TIMEOUT: "TOOL_TIMEOUT";
@@ -827,6 +859,8 @@ declare const SessionDetailResponseSchema: z.ZodObject<{
827
859
  NOT_FOUND: "NOT_FOUND";
828
860
  CONFLICT: "CONFLICT";
829
861
  RATE_LIMITED: "RATE_LIMITED";
862
+ SPEECH_UNAVAILABLE: "SPEECH_UNAVAILABLE";
863
+ PAYLOAD_TOO_LARGE: "PAYLOAD_TOO_LARGE";
830
864
  PROVIDER_ERROR: "PROVIDER_ERROR";
831
865
  TOOL_ERROR: "TOOL_ERROR";
832
866
  TOOL_TIMEOUT: "TOOL_TIMEOUT";
@@ -871,6 +905,8 @@ declare const SessionDetailResponseSchema: z.ZodObject<{
871
905
  NOT_FOUND: "NOT_FOUND";
872
906
  CONFLICT: "CONFLICT";
873
907
  RATE_LIMITED: "RATE_LIMITED";
908
+ SPEECH_UNAVAILABLE: "SPEECH_UNAVAILABLE";
909
+ PAYLOAD_TOO_LARGE: "PAYLOAD_TOO_LARGE";
874
910
  PROVIDER_ERROR: "PROVIDER_ERROR";
875
911
  TOOL_ERROR: "TOOL_ERROR";
876
912
  TOOL_TIMEOUT: "TOOL_TIMEOUT";
@@ -1037,6 +1073,8 @@ declare const ErrorRollupEventSchema: z.ZodObject<{
1037
1073
  NOT_FOUND: "NOT_FOUND";
1038
1074
  CONFLICT: "CONFLICT";
1039
1075
  RATE_LIMITED: "RATE_LIMITED";
1076
+ SPEECH_UNAVAILABLE: "SPEECH_UNAVAILABLE";
1077
+ PAYLOAD_TOO_LARGE: "PAYLOAD_TOO_LARGE";
1040
1078
  PROVIDER_ERROR: "PROVIDER_ERROR";
1041
1079
  TOOL_ERROR: "TOOL_ERROR";
1042
1080
  TOOL_TIMEOUT: "TOOL_TIMEOUT";
@@ -1114,6 +1152,8 @@ declare const TelemetryEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1114
1152
  NOT_FOUND: "NOT_FOUND";
1115
1153
  CONFLICT: "CONFLICT";
1116
1154
  RATE_LIMITED: "RATE_LIMITED";
1155
+ SPEECH_UNAVAILABLE: "SPEECH_UNAVAILABLE";
1156
+ PAYLOAD_TOO_LARGE: "PAYLOAD_TOO_LARGE";
1117
1157
  PROVIDER_ERROR: "PROVIDER_ERROR";
1118
1158
  TOOL_ERROR: "TOOL_ERROR";
1119
1159
  TOOL_TIMEOUT: "TOOL_TIMEOUT";
@@ -1202,6 +1242,8 @@ declare const TelemetryBatchSchema: z.ZodObject<{
1202
1242
  NOT_FOUND: "NOT_FOUND";
1203
1243
  CONFLICT: "CONFLICT";
1204
1244
  RATE_LIMITED: "RATE_LIMITED";
1245
+ SPEECH_UNAVAILABLE: "SPEECH_UNAVAILABLE";
1246
+ PAYLOAD_TOO_LARGE: "PAYLOAD_TOO_LARGE";
1205
1247
  PROVIDER_ERROR: "PROVIDER_ERROR";
1206
1248
  TOOL_ERROR: "TOOL_ERROR";
1207
1249
  TOOL_TIMEOUT: "TOOL_TIMEOUT";
@@ -1240,6 +1282,11 @@ declare const CreateSessionRequestSchema: z.ZodObject<{
1240
1282
  type CreateSessionRequest = z.infer<typeof CreateSessionRequestSchema>;
1241
1283
  /** Public configuration the client receives when a session starts. */
1242
1284
  declare const ClientConfigSchema: z.ZodObject<{
1285
+ speech: z.ZodOptional<z.ZodObject<{
1286
+ stt: z.ZodBoolean;
1287
+ tts: z.ZodBoolean;
1288
+ detectsLanguage: z.ZodOptional<z.ZodBoolean>;
1289
+ }, z.core.$strip>>;
1243
1290
  agentName: z.ZodString;
1244
1291
  languages: z.ZodArray<z.ZodString>;
1245
1292
  defaultLanguage: z.ZodString;
@@ -1263,6 +1310,11 @@ declare const CreateSessionResponseSchema: z.ZodObject<{
1263
1310
  sessionToken: z.ZodString;
1264
1311
  expiresAt: z.ZodString;
1265
1312
  config: z.ZodObject<{
1313
+ speech: z.ZodOptional<z.ZodObject<{
1314
+ stt: z.ZodBoolean;
1315
+ tts: z.ZodBoolean;
1316
+ detectsLanguage: z.ZodOptional<z.ZodBoolean>;
1317
+ }, z.core.$strip>>;
1266
1318
  agentName: z.ZodString;
1267
1319
  languages: z.ZodArray<z.ZodString>;
1268
1320
  defaultLanguage: z.ZodString;
@@ -1282,6 +1334,14 @@ declare const CreateSessionResponseSchema: z.ZodObject<{
1282
1334
  type CreateSessionResponse = z.infer<typeof CreateSessionResponseSchema>;
1283
1335
  /** Body of `POST /session/:id/turn`. */
1284
1336
  declare const TurnRequestSchema: z.ZodObject<{
1337
+ inputLanguage: z.ZodOptional<z.ZodString>;
1338
+ transcript: z.ZodOptional<z.ZodObject<{
1339
+ raw: z.ZodString;
1340
+ confidence: z.ZodOptional<z.ZodNumber>;
1341
+ provider: z.ZodOptional<z.ZodString>;
1342
+ corrected: z.ZodOptional<z.ZodBoolean>;
1343
+ ambiguous: z.ZodOptional<z.ZodArray<z.ZodString>>;
1344
+ }, z.core.$strip>>;
1285
1345
  text: z.ZodString;
1286
1346
  language: z.ZodString;
1287
1347
  context: z.ZodOptional<z.ZodObject<{
@@ -1313,6 +1373,8 @@ declare const ErrorResponseSchema: z.ZodObject<{
1313
1373
  NOT_FOUND: "NOT_FOUND";
1314
1374
  CONFLICT: "CONFLICT";
1315
1375
  RATE_LIMITED: "RATE_LIMITED";
1376
+ SPEECH_UNAVAILABLE: "SPEECH_UNAVAILABLE";
1377
+ PAYLOAD_TOO_LARGE: "PAYLOAD_TOO_LARGE";
1316
1378
  PROVIDER_ERROR: "PROVIDER_ERROR";
1317
1379
  TOOL_ERROR: "TOOL_ERROR";
1318
1380
  TOOL_TIMEOUT: "TOOL_TIMEOUT";
@@ -1340,6 +1402,7 @@ type HealthResponse = z.infer<typeof HealthResponseSchema>;
1340
1402
  /** First event of every stream. */
1341
1403
  declare const TurnStartedEventSchema: z.ZodObject<{
1342
1404
  type: z.ZodLiteral<"turn.started">;
1405
+ inputLanguage: z.ZodOptional<z.ZodString>;
1343
1406
  sessionId: z.ZodString;
1344
1407
  language: z.ZodString;
1345
1408
  protocolVersion: z.ZodLiteral<1>;
@@ -1386,6 +1449,8 @@ declare const ToolFinishedEventSchema: z.ZodObject<{
1386
1449
  NOT_FOUND: "NOT_FOUND";
1387
1450
  CONFLICT: "CONFLICT";
1388
1451
  RATE_LIMITED: "RATE_LIMITED";
1452
+ SPEECH_UNAVAILABLE: "SPEECH_UNAVAILABLE";
1453
+ PAYLOAD_TOO_LARGE: "PAYLOAD_TOO_LARGE";
1389
1454
  PROVIDER_ERROR: "PROVIDER_ERROR";
1390
1455
  TOOL_ERROR: "TOOL_ERROR";
1391
1456
  TOOL_TIMEOUT: "TOOL_TIMEOUT";
@@ -1426,6 +1491,8 @@ declare const ErrorEventSchema: z.ZodObject<{
1426
1491
  NOT_FOUND: "NOT_FOUND";
1427
1492
  CONFLICT: "CONFLICT";
1428
1493
  RATE_LIMITED: "RATE_LIMITED";
1494
+ SPEECH_UNAVAILABLE: "SPEECH_UNAVAILABLE";
1495
+ PAYLOAD_TOO_LARGE: "PAYLOAD_TOO_LARGE";
1429
1496
  PROVIDER_ERROR: "PROVIDER_ERROR";
1430
1497
  TOOL_ERROR: "TOOL_ERROR";
1431
1498
  TOOL_TIMEOUT: "TOOL_TIMEOUT";
@@ -1463,6 +1530,7 @@ declare const TurnFinishedEventSchema: z.ZodObject<{
1463
1530
  /** Every event the server may stream to the client (SSE `event:` = `type`). */
1464
1531
  declare const ProtocolEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1465
1532
  type: z.ZodLiteral<"turn.started">;
1533
+ inputLanguage: z.ZodOptional<z.ZodString>;
1466
1534
  sessionId: z.ZodString;
1467
1535
  language: z.ZodString;
1468
1536
  protocolVersion: z.ZodLiteral<1>;
@@ -1501,6 +1569,8 @@ declare const ProtocolEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1501
1569
  NOT_FOUND: "NOT_FOUND";
1502
1570
  CONFLICT: "CONFLICT";
1503
1571
  RATE_LIMITED: "RATE_LIMITED";
1572
+ SPEECH_UNAVAILABLE: "SPEECH_UNAVAILABLE";
1573
+ PAYLOAD_TOO_LARGE: "PAYLOAD_TOO_LARGE";
1504
1574
  PROVIDER_ERROR: "PROVIDER_ERROR";
1505
1575
  TOOL_ERROR: "TOOL_ERROR";
1506
1576
  TOOL_TIMEOUT: "TOOL_TIMEOUT";
@@ -1535,6 +1605,8 @@ declare const ProtocolEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1535
1605
  NOT_FOUND: "NOT_FOUND";
1536
1606
  CONFLICT: "CONFLICT";
1537
1607
  RATE_LIMITED: "RATE_LIMITED";
1608
+ SPEECH_UNAVAILABLE: "SPEECH_UNAVAILABLE";
1609
+ PAYLOAD_TOO_LARGE: "PAYLOAD_TOO_LARGE";
1538
1610
  PROVIDER_ERROR: "PROVIDER_ERROR";
1539
1611
  TOOL_ERROR: "TOOL_ERROR";
1540
1612
  TOOL_TIMEOUT: "TOOL_TIMEOUT";
@@ -1580,6 +1652,104 @@ type ProtocolEventInput = ProtocolEvent extends infer E ? E extends ProtocolEven
1580
1652
  /** All protocol event types, in a stable order. */
1581
1653
  declare const PROTOCOL_EVENT_TYPES: readonly ["turn.started", "assistant.delta", "assistant.message", "tool.started", "tool.finished", "navigate", "confirmation.required", "error", "turn.finished"];
1582
1654
 
1655
+ /** Voice metadata returned by configured synthesizers. */
1656
+ declare const VoiceInfoSchema: z.ZodObject<{
1657
+ id: z.ZodString;
1658
+ name: z.ZodString;
1659
+ languages: z.ZodArray<z.ZodString>;
1660
+ locale: z.ZodOptional<z.ZodString>;
1661
+ gender: z.ZodOptional<z.ZodEnum<{
1662
+ female: "female";
1663
+ male: "male";
1664
+ neutral: "neutral";
1665
+ }>>;
1666
+ accent: z.ZodOptional<z.ZodString>;
1667
+ styles: z.ZodOptional<z.ZodArray<z.ZodString>>;
1668
+ provider: z.ZodString;
1669
+ processing: z.ZodEnum<{
1670
+ local: "local";
1671
+ remote: "remote";
1672
+ }>;
1673
+ streaming: z.ZodBoolean;
1674
+ supports: z.ZodObject<{
1675
+ rate: z.ZodBoolean;
1676
+ pitch: z.ZodBoolean;
1677
+ volume: z.ZodBoolean;
1678
+ style: z.ZodBoolean;
1679
+ }, z.core.$strip>;
1680
+ }, z.core.$strip>;
1681
+ /** Wire schema for TranscribeQuery. */
1682
+ declare const TranscribeQuerySchema: z.ZodObject<{
1683
+ language: z.ZodOptional<z.ZodString>;
1684
+ utteranceId: z.ZodOptional<z.ZodString>;
1685
+ }, z.core.$strip>;
1686
+ /** Validated TranscribeQuery payload. */
1687
+ type TranscribeQuery = z.infer<typeof TranscribeQuerySchema>;
1688
+ /** Wire schema for TranscribeResponse. */
1689
+ declare const TranscribeResponseSchema: z.ZodObject<{
1690
+ raw: z.ZodOptional<z.ZodString>;
1691
+ corrected: z.ZodOptional<z.ZodBoolean>;
1692
+ ambiguous: z.ZodOptional<z.ZodArray<z.ZodString>>;
1693
+ text: z.ZodString;
1694
+ silent: z.ZodOptional<z.ZodBoolean>;
1695
+ language: z.ZodOptional<z.ZodString>;
1696
+ languageConfidence: z.ZodOptional<z.ZodNumber>;
1697
+ confidence: z.ZodOptional<z.ZodNumber>;
1698
+ providerId: z.ZodOptional<z.ZodString>;
1699
+ providerMs: z.ZodOptional<z.ZodNumber>;
1700
+ audioMs: z.ZodOptional<z.ZodNumber>;
1701
+ }, z.core.$strip>;
1702
+ /** Validated TranscribeResponse payload. */
1703
+ type TranscribeResponse = z.infer<typeof TranscribeResponseSchema>;
1704
+ /** Wire schema for SynthesizeRequest. */
1705
+ declare const SynthesizeRequestSchema: z.ZodObject<{
1706
+ text: z.ZodString;
1707
+ language: z.ZodString;
1708
+ voiceId: z.ZodOptional<z.ZodString>;
1709
+ rate: z.ZodOptional<z.ZodNumber>;
1710
+ pitch: z.ZodOptional<z.ZodNumber>;
1711
+ volume: z.ZodOptional<z.ZodNumber>;
1712
+ style: z.ZodOptional<z.ZodString>;
1713
+ format: z.ZodOptional<z.ZodEnum<{
1714
+ mp3: "mp3";
1715
+ wav: "wav";
1716
+ opus: "opus";
1717
+ pcm16: "pcm16";
1718
+ }>>;
1719
+ }, z.core.$strip>;
1720
+ /** Validated SynthesizeRequest payload. */
1721
+ type SynthesizeRequest = z.infer<typeof SynthesizeRequestSchema>;
1722
+ /** Wire schema for VoicesResponse. */
1723
+ declare const VoicesResponseSchema: z.ZodObject<{
1724
+ voices: z.ZodArray<z.ZodObject<{
1725
+ id: z.ZodString;
1726
+ name: z.ZodString;
1727
+ languages: z.ZodArray<z.ZodString>;
1728
+ locale: z.ZodOptional<z.ZodString>;
1729
+ gender: z.ZodOptional<z.ZodEnum<{
1730
+ female: "female";
1731
+ male: "male";
1732
+ neutral: "neutral";
1733
+ }>>;
1734
+ accent: z.ZodOptional<z.ZodString>;
1735
+ styles: z.ZodOptional<z.ZodArray<z.ZodString>>;
1736
+ provider: z.ZodString;
1737
+ processing: z.ZodEnum<{
1738
+ local: "local";
1739
+ remote: "remote";
1740
+ }>;
1741
+ streaming: z.ZodBoolean;
1742
+ supports: z.ZodObject<{
1743
+ rate: z.ZodBoolean;
1744
+ pitch: z.ZodBoolean;
1745
+ volume: z.ZodBoolean;
1746
+ style: z.ZodBoolean;
1747
+ }, z.core.$strip>;
1748
+ }, z.core.$strip>>;
1749
+ }, z.core.$strip>;
1750
+ /** Validated VoicesResponse payload. */
1751
+ type VoicesResponse = z.infer<typeof VoicesResponseSchema>;
1752
+
1583
1753
  /** Creates an empty {@link SessionSummary} for a new session. For store adapters. */
1584
1754
  declare function emptySummary(session: NewSession): SessionSummary;
1585
1755
  /**
@@ -1603,5 +1773,8 @@ declare function isAfterCursor(session: {
1603
1773
  id: string;
1604
1774
  }): boolean;
1605
1775
 
1606
- export { AssistantDeltaEventSchema, AssistantMessageEventSchema, ClientConfigSchema, ConfirmRequestSchema, ConfirmationRequiredEventSchema, ConversationEventBodySchema, ConversationEventSchema, CreateSessionRequestSchema, CreateSessionResponseSchema, DEFAULT_LANGUAGES, ErrorCodeSchema, ErrorEventSchema, ErrorResponseSchema, ErrorRollupEventSchema, HealthResponseSchema, InputModeSchema, LANGUAGE_LABELS, LATENCY_BUCKETS_MS, LanguageSchema, LatencyHistogramSchema, MAX_TURN_TEXT_CHARS, NavigateEventSchema, NewConversationEventSchema, NewSessionSchema, PROTOCOL_EVENT_TYPES, PROTOCOL_VERSION, PageContextSchema, ProtocolEventSchema, RecordedToolCallSchema, SdkInitEventSchema, SessionDetailResponseSchema, SessionFilterSchema, SessionListResponseSchema, SessionSummarySchema, TELEMETRY_SCHEMA_VERSION, TelemetryBatchSchema, TelemetryEventSchema, TelemetryFeaturesSchema, ToolFinishedEventSchema, ToolKindSchema, ToolStartedEventSchema, TurnEndReasonSchema, TurnFinishedEventSchema, TurnRequestSchema, TurnStartedEventSchema, UsageRollupEventSchema, UsageSchema, applyEventToSummary, decodeCursor, emptySummary, encodeCursor, isAfterCursor };
1607
- export type { AgentContext, AgentUser, ClientConfig, ConfirmRequest, ConversationEvent, ConversationEventOf, ConversationEventType, ConversationStore, CreateSessionRequest, CreateSessionResponse, ErrorResponse, HealthResponse, InputMode, JsonSchema, KnowledgeResult, KnowledgeSource, LLMFinishReason, LLMMessage, LLMProvider, LLMRequest, LLMStreamChunk, LLMToolCall, LLMToolDefinition, Language, LatencyHistogram, ListEventsOptions, NewConversationEvent, NewConversationEventOf, NewSession, PageContext, ProtocolEvent, ProtocolEventInput, ProtocolEventOf, ProtocolEventType, RecordedToolCall, RetentionResult, SessionDetailResponse, SessionFilter, SessionListResponse, SessionPage, SessionSummary, SpeakOptions, SpeechInput, SpeechInputHandlers, SpeechInputOptions, SpeechOutput, TelemetryBatch, TelemetryEvent, TelemetryEventOf, TelemetryFeatures, TelemetryTransport, ToolKind, TurnEndReason, TurnRequest, Usage };
1776
+ /** Validate, copy and deeply freeze a vocabulary for repeated recognition. */
1777
+ declare function defineVocabulary(v: Vocabulary): Vocabulary;
1778
+
1779
+ export { AssistantDeltaEventSchema, AssistantMessageEventSchema, ClientConfigSchema, ConfirmRequestSchema, ConfirmationRequiredEventSchema, ConversationEventBodySchema, ConversationEventSchema, CreateSessionRequestSchema, CreateSessionResponseSchema, DEFAULT_LANGUAGES, ErrorCodeSchema, ErrorEventSchema, ErrorResponseSchema, ErrorRollupEventSchema, HealthResponseSchema, InputModeSchema, LANGUAGE_LABELS, LATENCY_BUCKETS_MS, LanguageSchema, LatencyHistogramSchema, MAX_TURN_TEXT_CHARS, NavigateEventSchema, NewConversationEventSchema, NewSessionSchema, PROTOCOL_EVENT_TYPES, PROTOCOL_VERSION, PageContextSchema, ProtocolEventSchema, RecordedToolCallSchema, SdkInitEventSchema, SessionDetailResponseSchema, SessionFilterSchema, SessionListResponseSchema, SessionSummarySchema, StreamingMode, SynthesizeRequestSchema, TELEMETRY_SCHEMA_VERSION, TelemetryBatchSchema, TelemetryEventSchema, TelemetryFeaturesSchema, ToolFinishedEventSchema, ToolKindSchema, ToolStartedEventSchema, TranscribeQuerySchema, TranscribeResponseSchema, TurnEndReasonSchema, TurnFinishedEventSchema, TurnRequestSchema, TurnStartedEventSchema, UsageRollupEventSchema, UsageSchema, Vocabulary, VoiceInfo, VoiceInfoSchema, VoicesResponseSchema, applyEventToSummary, decodeCursor, defineVocabulary, emptySummary, encodeCursor, isAfterCursor };
1780
+ export type { AgentContext, AgentUser, ClientConfig, ConfirmRequest, ConversationEvent, ConversationEventOf, ConversationEventType, ConversationStore, CreateSessionRequest, CreateSessionResponse, ErrorResponse, HealthResponse, InputMode, JsonSchema, KnowledgeResult, KnowledgeSource, LLMFinishReason, LLMMessage, LLMProvider, LLMRequest, LLMStreamChunk, LLMToolCall, LLMToolDefinition, Language, LatencyHistogram, ListEventsOptions, NewConversationEvent, NewConversationEventOf, NewSession, PageContext, ProtocolEvent, ProtocolEventInput, ProtocolEventOf, ProtocolEventType, RecordedToolCall, RetentionResult, SessionDetailResponse, SessionFilter, SessionListResponse, SessionPage, SessionSummary, SpeakOptions, SpeechInput, SpeechInputCapabilities, SpeechInputHandlers, SpeechInputOptions, SpeechOutput, SynthesizeRequest, TelemetryBatch, TelemetryEvent, TelemetryEventOf, TelemetryFeatures, TelemetryTransport, ToolKind, TranscribeQuery, TranscribeResponse, TurnEndReason, TurnRequest, Usage, VoicesResponse };