voice-router-dev 0.6.5 → 0.6.7

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/CHANGELOG.md CHANGED
@@ -5,6 +5,127 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.6.6] - 2026-01-14
9
+
10
+ ### Added
11
+
12
+ #### OpenAI Realtime Streaming Transcription
13
+
14
+ New `transcribeStream()` method for OpenAI adapter using the Realtime API:
15
+
16
+ ```typescript
17
+ import { createOpenAIWhisperAdapter, OpenAIRealtimeModel, OpenAIRealtimeAudioFormat } from 'voice-router-dev'
18
+
19
+ const adapter = createOpenAIWhisperAdapter({ apiKey: process.env.OPENAI_API_KEY })
20
+
21
+ const session = await adapter.transcribeStream({
22
+ openaiStreaming: {
23
+ model: OpenAIRealtimeModel["gpt-4o-realtime-preview"],
24
+ inputAudioFormat: OpenAIRealtimeAudioFormat.pcm16,
25
+ turnDetection: {
26
+ type: "server_vad",
27
+ threshold: 0.5,
28
+ silenceDurationMs: 500
29
+ }
30
+ }
31
+ }, {
32
+ onTranscript: (event) => console.log(event.text),
33
+ onSpeechStart: (event) => console.log('Speech detected'),
34
+ onSpeechEnd: (event) => console.log('Speech ended')
35
+ })
36
+
37
+ // Send audio (base64-encoded PCM16 at 24kHz)
38
+ session.sendAudio(audioChunk)
39
+ session.close()
40
+ ```
41
+
42
+ **New constants from generated OpenAPI types:**
43
+ - `OpenAIRealtimeModel` - Realtime API models (`gpt-4o-realtime-preview`, etc.)
44
+ - `OpenAIRealtimeAudioFormat` - Input formats (`pcm16`, `g711_ulaw`, `g711_alaw`)
45
+ - `OpenAIRealtimeTurnDetection` - VAD type (`server_vad`)
46
+ - `OpenAIRealtimeTranscriptionModel` - Transcription models (`whisper-1`, etc.)
47
+
48
+ #### Type-Safe StreamingProvider Derivation
49
+
50
+ `StreamingProvider` type is now automatically derived from `ProviderCapabilitiesMap`:
51
+
52
+ ```typescript
53
+ // No more manual sync needed!
54
+ // If you set streaming: true in a provider's capabilities,
55
+ // it's automatically included in StreamingProvider type
56
+
57
+ type StreamingProvider = "gladia" | "deepgram" | "assemblyai" | "soniox" | "openai-whisper"
58
+ // ↑ Auto-derived from providers where streaming: true
59
+ ```
60
+
61
+ **How it works:**
62
+ - Capabilities use `as const satisfies` to preserve literal `true`/`false` types
63
+ - `ProvidersWithCapability<"streaming">` extracts providers where capability is `true`
64
+ - Works at compile-time - no runtime overhead, full browser compatibility
65
+
66
+ #### Lightweight Field Metadata Export (solves 2.8MB type bundle OOM issue)
67
+
68
+ ### Fixed
69
+
70
+ #### Encoding Format Documentation Clarification
71
+
72
+ Fixed misleading documentation that showed provider-specific encoding formats instead of unified SDK format:
73
+
74
+ | Provider | SDK Unified Format | Provider API Format |
75
+ |----------|-------------------|---------------------|
76
+ | Gladia | `linear16` | `wav/pcm` |
77
+ | Gladia | `mulaw` | `wav/ulaw` |
78
+ | Gladia | `alaw` | `wav/alaw` |
79
+ | AssemblyAI | `linear16` | `pcm_s16le` |
80
+ | Deepgram | `linear16` | `linear16` |
81
+
82
+ **When using VoiceRouter or adapters**, always use the unified format (`linear16`, `mulaw`, `alaw`). The SDK handles translation to provider-specific formats automatically.
83
+
84
+ **Field-configs** show provider-native values (what the API expects). These are correct for direct API usage but different from VoiceRouter unified format.
85
+
86
+ ---
87
+
88
+ #### Lightweight Field Metadata Export (solves 2.8MB type bundle OOM issue)
89
+
90
+ New `voice-router-dev/field-metadata` export provides pre-computed field metadata **without** the heavy Zod schema types:
91
+
92
+ - **156 KB** types vs **2.8 MB** for `field-configs`
93
+ - **18x reduction** in type declaration size
94
+ - **No Zod dependency** - plain TypeScript const arrays
95
+ - Same field information: name, type, required, description, options, min/max, etc.
96
+
97
+ ```typescript
98
+ // Lightweight import - 156KB types (was 2.8MB OOM-inducing)
99
+ import {
100
+ GLADIA_STREAMING_FIELDS,
101
+ GladiaStreamingFieldName,
102
+ PROVIDER_FIELDS,
103
+ FieldMetadata
104
+ } from 'voice-router-dev/field-metadata'
105
+
106
+ // Use for UI rendering without loading heavy Zod schemas
107
+ GLADIA_STREAMING_FIELDS.forEach(field => {
108
+ if (field.type === 'select' && field.options) {
109
+ renderDropdown(field.name, field.options)
110
+ }
111
+ })
112
+
113
+ // Type-safe field names still work
114
+ const fieldName: GladiaStreamingFieldName = 'encoding' // ✓
115
+ // const bad: GladiaStreamingFieldName = 'typo' // ✗ TypeScript error
116
+ ```
117
+
118
+ **When to use which:**
119
+
120
+ | Use Case | Import |
121
+ |----------|--------|
122
+ | UI form generation (no validation) | `voice-router-dev/field-metadata` (156KB) |
123
+ | Runtime Zod validation needed | `voice-router-dev/field-configs` (2.8MB) |
124
+
125
+ Generated by new build script: `pnpm openapi:generate-field-metadata`
126
+
127
+ ---
128
+
8
129
  ## [0.6.5] - 2026-01-13
9
130
 
10
131
  ### Added
package/README.md CHANGED
@@ -484,11 +484,11 @@ const session = await router.transcribeStream({
484
484
  sampleRate: 16000
485
485
  });
486
486
 
487
- // Type-safe Gladia encoding
487
+ // Type-safe Gladia encoding - use unified format
488
488
  const gladiaSession = await router.transcribeStream({
489
489
  provider: 'gladia',
490
- encoding: StreamingSupportedEncodingEnum['wav/pcm'],
491
- sampleRate: StreamingSupportedSampleRateEnum['16000']
490
+ encoding: 'linear16', // Unified format - mapped to Gladia's 'wav/pcm'
491
+ sampleRate: 16000
492
492
  });
493
493
  ```
494
494
 
@@ -509,7 +509,7 @@ const deepgramSession = await router.transcribeStream({
509
509
  // Gladia streaming - with typed gladiaStreaming options
510
510
  const gladiaSession = await router.transcribeStream({
511
511
  provider: 'gladia',
512
- encoding: 'wav/pcm',
512
+ encoding: 'linear16', // Unified format - mapped to Gladia's 'wav/pcm'
513
513
  sampleRate: 16000,
514
514
  gladiaStreaming: {
515
515
  realtime_processing: { words_accurate_timestamps: true },
@@ -567,6 +567,34 @@ type EncodingOptions = GladiaStreamingConfig['encoding']
567
567
  - `GladiaStreamingConfig`, `DeepgramTranscriptionConfig`, `AzureTranscriptionConfig`, etc.
568
568
  - `GladiaStreamingSchema`, `DeepgramTranscriptionSchema`, etc. (Zod schemas for advanced extraction)
569
569
 
570
+ ### Lightweight Field Metadata (Performance-Optimized)
571
+
572
+ For UI form generation without heavy Zod schema types (156KB vs 2.8MB):
573
+
574
+ ```typescript
575
+ // Lightweight import - 156KB types instead of 2.8MB
576
+ import {
577
+ GLADIA_STREAMING_FIELDS,
578
+ GladiaStreamingFieldName,
579
+ PROVIDER_FIELDS,
580
+ FieldMetadata
581
+ } from 'voice-router-dev/field-metadata'
582
+
583
+ // Pre-computed field metadata - no Zod at runtime
584
+ GLADIA_STREAMING_FIELDS.forEach(field => {
585
+ if (field.type === 'select' && field.options) {
586
+ renderDropdown(field.name, field.options)
587
+ }
588
+ })
589
+ ```
590
+
591
+ **When to use which:**
592
+
593
+ | Use Case | Import | Types Size |
594
+ |----------|--------|------------|
595
+ | UI form generation (no validation) | `field-metadata` | 156 KB |
596
+ | Runtime Zod validation needed | `field-configs` | 2.8 MB |
597
+
570
598
  ## Requirements
571
599
 
572
600
  - **Node.js**: 20.0.0 or higher
@@ -500,6 +500,154 @@ declare const AssemblyAIEncoding: {
500
500
  /** μ-law (telephony) */
501
501
  readonly pcmMulaw: "pcm_mulaw";
502
502
  };
503
+ /**
504
+ * AssemblyAI batch transcription models
505
+ *
506
+ * Values: `best`, `slam-1`, `universal`
507
+ *
508
+ * - `best`: Highest accuracy, best for most use cases (default)
509
+ * - `slam-1`: Speech-Language Aligned Model, optimized for specific domains
510
+ * - `universal`: General-purpose model with broad language support
511
+ *
512
+ * @example
513
+ * ```typescript
514
+ * import { AssemblyAITranscriptionModel } from 'voice-router-dev/constants'
515
+ *
516
+ * await router.transcribe('assemblyai', audioUrl, {
517
+ * speechModel: AssemblyAITranscriptionModel.best
518
+ * })
519
+ * ```
520
+ */
521
+ declare const AssemblyAITranscriptionModel: {
522
+ readonly best: "best";
523
+ readonly "slam-1": "slam-1";
524
+ readonly universal: "universal";
525
+ };
526
+ /**
527
+ * AssemblyAI language codes for transcription
528
+ *
529
+ * Common values: `en`, `en_us`, `en_uk`, `es`, `fr`, `de`, `it`, `pt`, `nl`, `ja`, `ko`, `zh`
530
+ *
531
+ * Default: `en_us`
532
+ *
533
+ * Full list at: https://www.assemblyai.com/docs/concepts/supported-languages
534
+ *
535
+ * @example
536
+ * ```typescript
537
+ * import { AssemblyAILanguage } from 'voice-router-dev/constants'
538
+ *
539
+ * await router.transcribe('assemblyai', audioUrl, {
540
+ * languageCode: AssemblyAILanguage.en_us
541
+ * })
542
+ * await router.transcribe('assemblyai', audioUrl, {
543
+ * languageCode: AssemblyAILanguage.es
544
+ * })
545
+ * ```
546
+ */
547
+ declare const AssemblyAILanguage: {
548
+ readonly en: "en";
549
+ readonly en_au: "en_au";
550
+ readonly en_uk: "en_uk";
551
+ readonly en_us: "en_us";
552
+ readonly es: "es";
553
+ readonly fr: "fr";
554
+ readonly de: "de";
555
+ readonly it: "it";
556
+ readonly pt: "pt";
557
+ readonly nl: "nl";
558
+ readonly af: "af";
559
+ readonly sq: "sq";
560
+ readonly am: "am";
561
+ readonly ar: "ar";
562
+ readonly hy: "hy";
563
+ readonly as: "as";
564
+ readonly az: "az";
565
+ readonly ba: "ba";
566
+ readonly eu: "eu";
567
+ readonly be: "be";
568
+ readonly bn: "bn";
569
+ readonly bs: "bs";
570
+ readonly br: "br";
571
+ readonly bg: "bg";
572
+ readonly my: "my";
573
+ readonly ca: "ca";
574
+ readonly zh: "zh";
575
+ readonly hr: "hr";
576
+ readonly cs: "cs";
577
+ readonly da: "da";
578
+ readonly et: "et";
579
+ readonly fo: "fo";
580
+ readonly fi: "fi";
581
+ readonly gl: "gl";
582
+ readonly ka: "ka";
583
+ readonly el: "el";
584
+ readonly gu: "gu";
585
+ readonly ht: "ht";
586
+ readonly ha: "ha";
587
+ readonly haw: "haw";
588
+ readonly he: "he";
589
+ readonly hi: "hi";
590
+ readonly hu: "hu";
591
+ readonly is: "is";
592
+ readonly id: "id";
593
+ readonly ja: "ja";
594
+ readonly jw: "jw";
595
+ readonly kn: "kn";
596
+ readonly kk: "kk";
597
+ readonly km: "km";
598
+ readonly ko: "ko";
599
+ readonly lo: "lo";
600
+ readonly la: "la";
601
+ readonly lv: "lv";
602
+ readonly ln: "ln";
603
+ readonly lt: "lt";
604
+ readonly lb: "lb";
605
+ readonly mk: "mk";
606
+ readonly mg: "mg";
607
+ readonly ms: "ms";
608
+ readonly ml: "ml";
609
+ readonly mt: "mt";
610
+ readonly mi: "mi";
611
+ readonly mr: "mr";
612
+ readonly mn: "mn";
613
+ readonly ne: "ne";
614
+ readonly no: "no";
615
+ readonly nn: "nn";
616
+ readonly oc: "oc";
617
+ readonly pa: "pa";
618
+ readonly ps: "ps";
619
+ readonly fa: "fa";
620
+ readonly pl: "pl";
621
+ readonly ro: "ro";
622
+ readonly ru: "ru";
623
+ readonly sa: "sa";
624
+ readonly sr: "sr";
625
+ readonly sn: "sn";
626
+ readonly sd: "sd";
627
+ readonly si: "si";
628
+ readonly sk: "sk";
629
+ readonly sl: "sl";
630
+ readonly so: "so";
631
+ readonly su: "su";
632
+ readonly sw: "sw";
633
+ readonly sv: "sv";
634
+ readonly tl: "tl";
635
+ readonly tg: "tg";
636
+ readonly ta: "ta";
637
+ readonly tt: "tt";
638
+ readonly te: "te";
639
+ readonly th: "th";
640
+ readonly bo: "bo";
641
+ readonly tr: "tr";
642
+ readonly tk: "tk";
643
+ readonly uk: "uk";
644
+ readonly ur: "ur";
645
+ readonly uz: "uz";
646
+ readonly vi: "vi";
647
+ readonly cy: "cy";
648
+ readonly yi: "yi";
649
+ readonly yo: "yo";
650
+ };
503
651
  /**
504
652
  * AssemblyAI streaming speech models
505
653
  *
@@ -652,7 +800,11 @@ type GladiaTranslationLanguageType = (typeof GladiaTranslationLanguage)[keyof ty
652
800
  type GladiaRegionType = (typeof GladiaRegion)[keyof typeof GladiaRegion];
653
801
  /** AssemblyAI encoding type derived from const object */
654
802
  type AssemblyAIEncodingType = (typeof AssemblyAIEncoding)[keyof typeof AssemblyAIEncoding];
655
- /** AssemblyAI speech model type derived from const object */
803
+ /** AssemblyAI batch transcription model type derived from const object */
804
+ type AssemblyAITranscriptionModelType = (typeof AssemblyAITranscriptionModel)[keyof typeof AssemblyAITranscriptionModel];
805
+ /** AssemblyAI language code type derived from const object */
806
+ type AssemblyAILanguageType = (typeof AssemblyAILanguage)[keyof typeof AssemblyAILanguage];
807
+ /** AssemblyAI streaming speech model type derived from const object */
656
808
  type AssemblyAISpeechModelType = (typeof AssemblyAISpeechModel)[keyof typeof AssemblyAISpeechModel];
657
809
  /** AssemblyAI sample rate type derived from const object */
658
810
  type AssemblyAISampleRateType = (typeof AssemblyAISampleRate)[keyof typeof AssemblyAISampleRate];
@@ -1086,4 +1238,4 @@ type OpenAIRealtimeTurnDetectionType = (typeof OpenAIRealtimeTurnDetection)[keyo
1086
1238
  /** OpenAI Realtime transcription model type */
1087
1239
  type OpenAIRealtimeTranscriptionModelType = (typeof OpenAIRealtimeTranscriptionModel)[keyof typeof OpenAIRealtimeTranscriptionModel];
1088
1240
 
1089
- export { AssemblyAIEncoding, type AssemblyAIEncodingType, AssemblyAISampleRate, type AssemblyAISampleRateType, AssemblyAISpeechModel, type AssemblyAISpeechModelType, AssemblyAIStatus, type AssemblyAIStatusType, AzureStatus, type AzureStatusType, DeepgramCallbackMethod, type DeepgramCallbackMethodType, DeepgramEncoding, type DeepgramEncodingType, DeepgramIntentMode, type DeepgramIntentModeType, DeepgramModel, type DeepgramModelType, DeepgramRedact, type DeepgramRedactType, DeepgramRegion, type DeepgramRegionType, DeepgramSampleRate, type DeepgramSampleRateType, DeepgramStatus, type DeepgramStatusType, DeepgramTTSContainer, type DeepgramTTSContainerType, DeepgramTTSEncoding, type DeepgramTTSEncodingType, DeepgramTTSModel, type DeepgramTTSModelType, DeepgramTTSSampleRate, type DeepgramTTSSampleRateType, DeepgramTopicMode, type DeepgramTopicModeType, GladiaBitDepth, type GladiaBitDepthType, GladiaEncoding, type GladiaEncodingType, GladiaLanguage, type GladiaLanguageType, GladiaModel, type GladiaModelType, GladiaRegion, type GladiaRegionType, GladiaSampleRate, type GladiaSampleRateType, GladiaStatus, type GladiaStatusType, GladiaTranslationLanguage, type GladiaTranslationLanguageType, OpenAIModel, type OpenAIModelType, OpenAIRealtimeAudioFormat, type OpenAIRealtimeAudioFormatType, OpenAIRealtimeModel, type OpenAIRealtimeModelType, OpenAIRealtimeTranscriptionModel, type OpenAIRealtimeTranscriptionModelType, OpenAIRealtimeTurnDetection, type OpenAIRealtimeTurnDetectionType, OpenAIResponseFormat, type OpenAIResponseFormatType, SonioxRegion, type SonioxRegionType, SpeechmaticsRegion, type SpeechmaticsRegionType };
1241
+ export { AssemblyAIEncoding, type AssemblyAIEncodingType, AssemblyAILanguage, type AssemblyAILanguageType, AssemblyAISampleRate, type AssemblyAISampleRateType, AssemblyAISpeechModel, type AssemblyAISpeechModelType, AssemblyAIStatus, type AssemblyAIStatusType, AssemblyAITranscriptionModel, type AssemblyAITranscriptionModelType, AzureStatus, type AzureStatusType, DeepgramCallbackMethod, type DeepgramCallbackMethodType, DeepgramEncoding, type DeepgramEncodingType, DeepgramIntentMode, type DeepgramIntentModeType, DeepgramModel, type DeepgramModelType, DeepgramRedact, type DeepgramRedactType, DeepgramRegion, type DeepgramRegionType, DeepgramSampleRate, type DeepgramSampleRateType, DeepgramStatus, type DeepgramStatusType, DeepgramTTSContainer, type DeepgramTTSContainerType, DeepgramTTSEncoding, type DeepgramTTSEncodingType, DeepgramTTSModel, type DeepgramTTSModelType, DeepgramTTSSampleRate, type DeepgramTTSSampleRateType, DeepgramTopicMode, type DeepgramTopicModeType, GladiaBitDepth, type GladiaBitDepthType, GladiaEncoding, type GladiaEncodingType, GladiaLanguage, type GladiaLanguageType, GladiaModel, type GladiaModelType, GladiaRegion, type GladiaRegionType, GladiaSampleRate, type GladiaSampleRateType, GladiaStatus, type GladiaStatusType, GladiaTranslationLanguage, type GladiaTranslationLanguageType, OpenAIModel, type OpenAIModelType, OpenAIRealtimeAudioFormat, type OpenAIRealtimeAudioFormatType, OpenAIRealtimeModel, type OpenAIRealtimeModelType, OpenAIRealtimeTranscriptionModel, type OpenAIRealtimeTranscriptionModelType, OpenAIRealtimeTurnDetection, type OpenAIRealtimeTurnDetectionType, OpenAIResponseFormat, type OpenAIResponseFormatType, SonioxRegion, type SonioxRegionType, SpeechmaticsRegion, type SpeechmaticsRegionType };
@@ -500,6 +500,154 @@ declare const AssemblyAIEncoding: {
500
500
  /** μ-law (telephony) */
501
501
  readonly pcmMulaw: "pcm_mulaw";
502
502
  };
503
+ /**
504
+ * AssemblyAI batch transcription models
505
+ *
506
+ * Values: `best`, `slam-1`, `universal`
507
+ *
508
+ * - `best`: Highest accuracy, best for most use cases (default)
509
+ * - `slam-1`: Speech-Language Aligned Model, optimized for specific domains
510
+ * - `universal`: General-purpose model with broad language support
511
+ *
512
+ * @example
513
+ * ```typescript
514
+ * import { AssemblyAITranscriptionModel } from 'voice-router-dev/constants'
515
+ *
516
+ * await router.transcribe('assemblyai', audioUrl, {
517
+ * speechModel: AssemblyAITranscriptionModel.best
518
+ * })
519
+ * ```
520
+ */
521
+ declare const AssemblyAITranscriptionModel: {
522
+ readonly best: "best";
523
+ readonly "slam-1": "slam-1";
524
+ readonly universal: "universal";
525
+ };
526
+ /**
527
+ * AssemblyAI language codes for transcription
528
+ *
529
+ * Common values: `en`, `en_us`, `en_uk`, `es`, `fr`, `de`, `it`, `pt`, `nl`, `ja`, `ko`, `zh`
530
+ *
531
+ * Default: `en_us`
532
+ *
533
+ * Full list at: https://www.assemblyai.com/docs/concepts/supported-languages
534
+ *
535
+ * @example
536
+ * ```typescript
537
+ * import { AssemblyAILanguage } from 'voice-router-dev/constants'
538
+ *
539
+ * await router.transcribe('assemblyai', audioUrl, {
540
+ * languageCode: AssemblyAILanguage.en_us
541
+ * })
542
+ * await router.transcribe('assemblyai', audioUrl, {
543
+ * languageCode: AssemblyAILanguage.es
544
+ * })
545
+ * ```
546
+ */
547
+ declare const AssemblyAILanguage: {
548
+ readonly en: "en";
549
+ readonly en_au: "en_au";
550
+ readonly en_uk: "en_uk";
551
+ readonly en_us: "en_us";
552
+ readonly es: "es";
553
+ readonly fr: "fr";
554
+ readonly de: "de";
555
+ readonly it: "it";
556
+ readonly pt: "pt";
557
+ readonly nl: "nl";
558
+ readonly af: "af";
559
+ readonly sq: "sq";
560
+ readonly am: "am";
561
+ readonly ar: "ar";
562
+ readonly hy: "hy";
563
+ readonly as: "as";
564
+ readonly az: "az";
565
+ readonly ba: "ba";
566
+ readonly eu: "eu";
567
+ readonly be: "be";
568
+ readonly bn: "bn";
569
+ readonly bs: "bs";
570
+ readonly br: "br";
571
+ readonly bg: "bg";
572
+ readonly my: "my";
573
+ readonly ca: "ca";
574
+ readonly zh: "zh";
575
+ readonly hr: "hr";
576
+ readonly cs: "cs";
577
+ readonly da: "da";
578
+ readonly et: "et";
579
+ readonly fo: "fo";
580
+ readonly fi: "fi";
581
+ readonly gl: "gl";
582
+ readonly ka: "ka";
583
+ readonly el: "el";
584
+ readonly gu: "gu";
585
+ readonly ht: "ht";
586
+ readonly ha: "ha";
587
+ readonly haw: "haw";
588
+ readonly he: "he";
589
+ readonly hi: "hi";
590
+ readonly hu: "hu";
591
+ readonly is: "is";
592
+ readonly id: "id";
593
+ readonly ja: "ja";
594
+ readonly jw: "jw";
595
+ readonly kn: "kn";
596
+ readonly kk: "kk";
597
+ readonly km: "km";
598
+ readonly ko: "ko";
599
+ readonly lo: "lo";
600
+ readonly la: "la";
601
+ readonly lv: "lv";
602
+ readonly ln: "ln";
603
+ readonly lt: "lt";
604
+ readonly lb: "lb";
605
+ readonly mk: "mk";
606
+ readonly mg: "mg";
607
+ readonly ms: "ms";
608
+ readonly ml: "ml";
609
+ readonly mt: "mt";
610
+ readonly mi: "mi";
611
+ readonly mr: "mr";
612
+ readonly mn: "mn";
613
+ readonly ne: "ne";
614
+ readonly no: "no";
615
+ readonly nn: "nn";
616
+ readonly oc: "oc";
617
+ readonly pa: "pa";
618
+ readonly ps: "ps";
619
+ readonly fa: "fa";
620
+ readonly pl: "pl";
621
+ readonly ro: "ro";
622
+ readonly ru: "ru";
623
+ readonly sa: "sa";
624
+ readonly sr: "sr";
625
+ readonly sn: "sn";
626
+ readonly sd: "sd";
627
+ readonly si: "si";
628
+ readonly sk: "sk";
629
+ readonly sl: "sl";
630
+ readonly so: "so";
631
+ readonly su: "su";
632
+ readonly sw: "sw";
633
+ readonly sv: "sv";
634
+ readonly tl: "tl";
635
+ readonly tg: "tg";
636
+ readonly ta: "ta";
637
+ readonly tt: "tt";
638
+ readonly te: "te";
639
+ readonly th: "th";
640
+ readonly bo: "bo";
641
+ readonly tr: "tr";
642
+ readonly tk: "tk";
643
+ readonly uk: "uk";
644
+ readonly ur: "ur";
645
+ readonly uz: "uz";
646
+ readonly vi: "vi";
647
+ readonly cy: "cy";
648
+ readonly yi: "yi";
649
+ readonly yo: "yo";
650
+ };
503
651
  /**
504
652
  * AssemblyAI streaming speech models
505
653
  *
@@ -652,7 +800,11 @@ type GladiaTranslationLanguageType = (typeof GladiaTranslationLanguage)[keyof ty
652
800
  type GladiaRegionType = (typeof GladiaRegion)[keyof typeof GladiaRegion];
653
801
  /** AssemblyAI encoding type derived from const object */
654
802
  type AssemblyAIEncodingType = (typeof AssemblyAIEncoding)[keyof typeof AssemblyAIEncoding];
655
- /** AssemblyAI speech model type derived from const object */
803
+ /** AssemblyAI batch transcription model type derived from const object */
804
+ type AssemblyAITranscriptionModelType = (typeof AssemblyAITranscriptionModel)[keyof typeof AssemblyAITranscriptionModel];
805
+ /** AssemblyAI language code type derived from const object */
806
+ type AssemblyAILanguageType = (typeof AssemblyAILanguage)[keyof typeof AssemblyAILanguage];
807
+ /** AssemblyAI streaming speech model type derived from const object */
656
808
  type AssemblyAISpeechModelType = (typeof AssemblyAISpeechModel)[keyof typeof AssemblyAISpeechModel];
657
809
  /** AssemblyAI sample rate type derived from const object */
658
810
  type AssemblyAISampleRateType = (typeof AssemblyAISampleRate)[keyof typeof AssemblyAISampleRate];
@@ -1086,4 +1238,4 @@ type OpenAIRealtimeTurnDetectionType = (typeof OpenAIRealtimeTurnDetection)[keyo
1086
1238
  /** OpenAI Realtime transcription model type */
1087
1239
  type OpenAIRealtimeTranscriptionModelType = (typeof OpenAIRealtimeTranscriptionModel)[keyof typeof OpenAIRealtimeTranscriptionModel];
1088
1240
 
1089
- export { AssemblyAIEncoding, type AssemblyAIEncodingType, AssemblyAISampleRate, type AssemblyAISampleRateType, AssemblyAISpeechModel, type AssemblyAISpeechModelType, AssemblyAIStatus, type AssemblyAIStatusType, AzureStatus, type AzureStatusType, DeepgramCallbackMethod, type DeepgramCallbackMethodType, DeepgramEncoding, type DeepgramEncodingType, DeepgramIntentMode, type DeepgramIntentModeType, DeepgramModel, type DeepgramModelType, DeepgramRedact, type DeepgramRedactType, DeepgramRegion, type DeepgramRegionType, DeepgramSampleRate, type DeepgramSampleRateType, DeepgramStatus, type DeepgramStatusType, DeepgramTTSContainer, type DeepgramTTSContainerType, DeepgramTTSEncoding, type DeepgramTTSEncodingType, DeepgramTTSModel, type DeepgramTTSModelType, DeepgramTTSSampleRate, type DeepgramTTSSampleRateType, DeepgramTopicMode, type DeepgramTopicModeType, GladiaBitDepth, type GladiaBitDepthType, GladiaEncoding, type GladiaEncodingType, GladiaLanguage, type GladiaLanguageType, GladiaModel, type GladiaModelType, GladiaRegion, type GladiaRegionType, GladiaSampleRate, type GladiaSampleRateType, GladiaStatus, type GladiaStatusType, GladiaTranslationLanguage, type GladiaTranslationLanguageType, OpenAIModel, type OpenAIModelType, OpenAIRealtimeAudioFormat, type OpenAIRealtimeAudioFormatType, OpenAIRealtimeModel, type OpenAIRealtimeModelType, OpenAIRealtimeTranscriptionModel, type OpenAIRealtimeTranscriptionModelType, OpenAIRealtimeTurnDetection, type OpenAIRealtimeTurnDetectionType, OpenAIResponseFormat, type OpenAIResponseFormatType, SonioxRegion, type SonioxRegionType, SpeechmaticsRegion, type SpeechmaticsRegionType };
1241
+ export { AssemblyAIEncoding, type AssemblyAIEncodingType, AssemblyAILanguage, type AssemblyAILanguageType, AssemblyAISampleRate, type AssemblyAISampleRateType, AssemblyAISpeechModel, type AssemblyAISpeechModelType, AssemblyAIStatus, type AssemblyAIStatusType, AssemblyAITranscriptionModel, type AssemblyAITranscriptionModelType, AzureStatus, type AzureStatusType, DeepgramCallbackMethod, type DeepgramCallbackMethodType, DeepgramEncoding, type DeepgramEncodingType, DeepgramIntentMode, type DeepgramIntentModeType, DeepgramModel, type DeepgramModelType, DeepgramRedact, type DeepgramRedactType, DeepgramRegion, type DeepgramRegionType, DeepgramSampleRate, type DeepgramSampleRateType, DeepgramStatus, type DeepgramStatusType, DeepgramTTSContainer, type DeepgramTTSContainerType, DeepgramTTSEncoding, type DeepgramTTSEncodingType, DeepgramTTSModel, type DeepgramTTSModelType, DeepgramTTSSampleRate, type DeepgramTTSSampleRateType, DeepgramTopicMode, type DeepgramTopicModeType, GladiaBitDepth, type GladiaBitDepthType, GladiaEncoding, type GladiaEncodingType, GladiaLanguage, type GladiaLanguageType, GladiaModel, type GladiaModelType, GladiaRegion, type GladiaRegionType, GladiaSampleRate, type GladiaSampleRateType, GladiaStatus, type GladiaStatusType, GladiaTranslationLanguage, type GladiaTranslationLanguageType, OpenAIModel, type OpenAIModelType, OpenAIRealtimeAudioFormat, type OpenAIRealtimeAudioFormatType, OpenAIRealtimeModel, type OpenAIRealtimeModelType, OpenAIRealtimeTranscriptionModel, type OpenAIRealtimeTranscriptionModelType, OpenAIRealtimeTurnDetection, type OpenAIRealtimeTurnDetectionType, OpenAIResponseFormat, type OpenAIResponseFormatType, SonioxRegion, type SonioxRegionType, SpeechmaticsRegion, type SpeechmaticsRegionType };
package/dist/constants.js CHANGED
@@ -22,9 +22,11 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
22
22
  var constants_exports = {};
23
23
  __export(constants_exports, {
24
24
  AssemblyAIEncoding: () => AssemblyAIEncoding,
25
+ AssemblyAILanguage: () => AssemblyAILanguage,
25
26
  AssemblyAISampleRate: () => AssemblyAISampleRate,
26
27
  AssemblyAISpeechModel: () => AssemblyAISpeechModel,
27
28
  AssemblyAIStatus: () => AssemblyAIStatus,
29
+ AssemblyAITranscriptionModel: () => AssemblyAITranscriptionModel,
28
30
  AzureStatus: () => AzureStatus,
29
31
  DeepgramCallbackMethod: () => DeepgramCallbackMethod,
30
32
  DeepgramEncoding: () => DeepgramEncoding,
@@ -335,6 +337,119 @@ var TranslationLanguageCodeEnum = {
335
337
  zh: "zh"
336
338
  };
337
339
 
340
+ // src/generated/assemblyai/schema/speechModel.ts
341
+ var SpeechModel = {
342
+ best: "best",
343
+ "slam-1": "slam-1",
344
+ universal: "universal"
345
+ };
346
+
347
+ // src/generated/assemblyai/schema/transcriptLanguageCode.ts
348
+ var TranscriptLanguageCode = {
349
+ en: "en",
350
+ en_au: "en_au",
351
+ en_uk: "en_uk",
352
+ en_us: "en_us",
353
+ es: "es",
354
+ fr: "fr",
355
+ de: "de",
356
+ it: "it",
357
+ pt: "pt",
358
+ nl: "nl",
359
+ af: "af",
360
+ sq: "sq",
361
+ am: "am",
362
+ ar: "ar",
363
+ hy: "hy",
364
+ as: "as",
365
+ az: "az",
366
+ ba: "ba",
367
+ eu: "eu",
368
+ be: "be",
369
+ bn: "bn",
370
+ bs: "bs",
371
+ br: "br",
372
+ bg: "bg",
373
+ my: "my",
374
+ ca: "ca",
375
+ zh: "zh",
376
+ hr: "hr",
377
+ cs: "cs",
378
+ da: "da",
379
+ et: "et",
380
+ fo: "fo",
381
+ fi: "fi",
382
+ gl: "gl",
383
+ ka: "ka",
384
+ el: "el",
385
+ gu: "gu",
386
+ ht: "ht",
387
+ ha: "ha",
388
+ haw: "haw",
389
+ he: "he",
390
+ hi: "hi",
391
+ hu: "hu",
392
+ is: "is",
393
+ id: "id",
394
+ ja: "ja",
395
+ jw: "jw",
396
+ kn: "kn",
397
+ kk: "kk",
398
+ km: "km",
399
+ ko: "ko",
400
+ lo: "lo",
401
+ la: "la",
402
+ lv: "lv",
403
+ ln: "ln",
404
+ lt: "lt",
405
+ lb: "lb",
406
+ mk: "mk",
407
+ mg: "mg",
408
+ ms: "ms",
409
+ ml: "ml",
410
+ mt: "mt",
411
+ mi: "mi",
412
+ mr: "mr",
413
+ mn: "mn",
414
+ ne: "ne",
415
+ no: "no",
416
+ nn: "nn",
417
+ oc: "oc",
418
+ pa: "pa",
419
+ ps: "ps",
420
+ fa: "fa",
421
+ pl: "pl",
422
+ ro: "ro",
423
+ ru: "ru",
424
+ sa: "sa",
425
+ sr: "sr",
426
+ sn: "sn",
427
+ sd: "sd",
428
+ si: "si",
429
+ sk: "sk",
430
+ sl: "sl",
431
+ so: "so",
432
+ su: "su",
433
+ sw: "sw",
434
+ sv: "sv",
435
+ tl: "tl",
436
+ tg: "tg",
437
+ ta: "ta",
438
+ tt: "tt",
439
+ te: "te",
440
+ th: "th",
441
+ bo: "bo",
442
+ tr: "tr",
443
+ tk: "tk",
444
+ uk: "uk",
445
+ ur: "ur",
446
+ uz: "uz",
447
+ vi: "vi",
448
+ cy: "cy",
449
+ yi: "yi",
450
+ yo: "yo"
451
+ };
452
+
338
453
  // src/generated/assemblyai/schema/transcriptStatus.ts
339
454
  var TranscriptStatus = {
340
455
  queued: "queued",
@@ -545,6 +660,8 @@ var AssemblyAIEncoding = {
545
660
  /** μ-law (telephony) */
546
661
  pcmMulaw: "pcm_mulaw"
547
662
  };
663
+ var AssemblyAITranscriptionModel = SpeechModel;
664
+ var AssemblyAILanguage = TranscriptLanguageCode;
548
665
  var AssemblyAISpeechModel = {
549
666
  /** Optimized for English */
550
667
  english: "universal-streaming-english",
@@ -620,9 +737,11 @@ var OpenAIRealtimeTranscriptionModel = {
620
737
  // Annotate the CommonJS export names for ESM import in node:
621
738
  0 && (module.exports = {
622
739
  AssemblyAIEncoding,
740
+ AssemblyAILanguage,
623
741
  AssemblyAISampleRate,
624
742
  AssemblyAISpeechModel,
625
743
  AssemblyAIStatus,
744
+ AssemblyAITranscriptionModel,
626
745
  AzureStatus,
627
746
  DeepgramCallbackMethod,
628
747
  DeepgramEncoding,