voice-router-dev 0.1.7 → 0.1.8

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/dist/index.d.mts CHANGED
@@ -40,6 +40,18 @@ type AudioChannels = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
40
40
  * Supported transcription providers
41
41
  */
42
42
  type TranscriptionProvider = "gladia" | "assemblyai" | "deepgram" | "azure-stt" | "openai-whisper" | "speechmatics";
43
+ /**
44
+ * Providers that support real-time streaming transcription
45
+ */
46
+ type StreamingProvider = "gladia" | "deepgram" | "assemblyai";
47
+ /**
48
+ * Providers that only support batch/async transcription
49
+ */
50
+ type BatchOnlyProvider = "azure-stt" | "openai-whisper" | "speechmatics";
51
+ /**
52
+ * WebSocket session status for streaming transcription
53
+ */
54
+ type SessionStatus = "connecting" | "open" | "closing" | "closed";
43
55
  /**
44
56
  * Provider capabilities - indicates which features each provider supports
45
57
  */
@@ -327,6 +339,39 @@ interface StreamingSession {
327
339
  createdAt: Date;
328
340
  }
329
341
 
342
+ /**
343
+ * Standardized error handling utilities for Voice Router SDK
344
+ *
345
+ * Provides consistent error codes, messages, and formatting across all adapters.
346
+ */
347
+ /**
348
+ * Standard error codes used across all providers
349
+ *
350
+ * These codes provide a consistent error taxonomy regardless of which
351
+ * provider is being used.
352
+ */
353
+ declare const ERROR_CODES: {
354
+ /** Failed to parse API response or WebSocket message */
355
+ readonly PARSE_ERROR: "PARSE_ERROR";
356
+ /** WebSocket connection error */
357
+ readonly WEBSOCKET_ERROR: "WEBSOCKET_ERROR";
358
+ /** Async transcription job did not complete within timeout */
359
+ readonly POLLING_TIMEOUT: "POLLING_TIMEOUT";
360
+ /** Transcription processing failed on provider side */
361
+ readonly TRANSCRIPTION_ERROR: "TRANSCRIPTION_ERROR";
362
+ /** Connection attempt timed out */
363
+ readonly CONNECTION_TIMEOUT: "CONNECTION_TIMEOUT";
364
+ /** Invalid input provided to API */
365
+ readonly INVALID_INPUT: "INVALID_INPUT";
366
+ /** Requested operation not supported by provider */
367
+ readonly NOT_SUPPORTED: "NOT_SUPPORTED";
368
+ /** No transcription results available */
369
+ readonly NO_RESULTS: "NO_RESULTS";
370
+ /** Unspecified or unknown error */
371
+ readonly UNKNOWN_ERROR: "UNKNOWN_ERROR";
372
+ };
373
+ type ErrorCode = (typeof ERROR_CODES)[keyof typeof ERROR_CODES];
374
+
330
375
  /**
331
376
  * Base adapter interface for transcription providers
332
377
  * All provider adapters must implement this interface
@@ -444,18 +489,51 @@ interface TranscriptionAdapter {
444
489
  declare abstract class BaseAdapter implements TranscriptionAdapter {
445
490
  abstract readonly name: TranscriptionProvider;
446
491
  abstract readonly capabilities: ProviderCapabilities;
492
+ /**
493
+ * Base URL for provider API (must be defined by subclass)
494
+ */
495
+ protected abstract baseUrl: string;
447
496
  protected config?: ProviderConfig;
448
497
  initialize(config: ProviderConfig): void;
449
498
  abstract transcribe(audio: AudioInput, options?: TranscribeOptions): Promise<UnifiedTranscriptResponse>;
450
499
  abstract getTranscript(transcriptId: string): Promise<UnifiedTranscriptResponse>;
451
500
  /**
452
- * Helper method to create error responses
501
+ * Helper method to create error responses with stack traces
502
+ *
503
+ * @param error - Error object or unknown error
504
+ * @param statusCode - Optional HTTP status code
505
+ * @param code - Optional error code (defaults to extracted or UNKNOWN_ERROR)
453
506
  */
454
- protected createErrorResponse(error: Error | unknown, statusCode?: number): UnifiedTranscriptResponse;
507
+ protected createErrorResponse(error: Error | unknown, statusCode?: number, code?: ErrorCode): UnifiedTranscriptResponse;
455
508
  /**
456
509
  * Helper method to validate configuration
457
510
  */
458
511
  protected validateConfig(): void;
512
+ /**
513
+ * Build axios config for generated API client functions
514
+ *
515
+ * @param authHeaderName - Header name for API key (e.g., "Authorization", "x-gladia-key")
516
+ * @param authHeaderValue - Optional function to format auth header value (defaults to raw API key)
517
+ * @returns Axios config object
518
+ */
519
+ protected getAxiosConfig(authHeaderName?: string, authHeaderValue?: (apiKey: string) => string): {
520
+ baseURL: string;
521
+ timeout: number;
522
+ headers: Record<string, string>;
523
+ };
524
+ /**
525
+ * Generic polling helper for async transcription jobs
526
+ *
527
+ * Polls getTranscript() until job completes or times out.
528
+ *
529
+ * @param transcriptId - Job/transcript ID to poll
530
+ * @param options - Polling configuration
531
+ * @returns Final transcription result
532
+ */
533
+ protected pollForCompletion(transcriptId: string, options?: {
534
+ maxAttempts?: number;
535
+ intervalMs?: number;
536
+ }): Promise<UnifiedTranscriptResponse>;
459
537
  }
460
538
 
461
539
  /**
@@ -648,13 +726,23 @@ interface LanguageConfig {
648
726
 
649
727
  * OpenAPI spec version: 1.0.0
650
728
  */
651
- type ListenV1EncodingParameter = (typeof ListenV1EncodingParameter)[keyof typeof ListenV1EncodingParameter];
729
+ /**
730
+ * ListenV1EncodingParameter type definition
731
+ */
732
+ /**
733
+ * ListenV1EncodingParameter type definition
734
+ */
735
+ /**
736
+ * ListenV1EncodingParameter type definition
737
+ */
738
+ /**
739
+ * ListenV1EncodingParameter type definition
740
+ */
741
+ type ListenV1EncodingParameter = typeof ListenV1EncodingParameter[keyof typeof ListenV1EncodingParameter];
652
742
  declare const ListenV1EncodingParameter: {
653
743
  readonly linear16: "linear16";
654
744
  readonly flac: "flac";
655
745
  readonly mulaw: "mulaw";
656
- readonly "amr-nb": "amr-nb";
657
- readonly "amr-wb": "amr-wb";
658
746
  readonly opus: "opus";
659
747
  readonly speex: "speex";
660
748
  readonly g729: "g729";
@@ -757,11 +845,11 @@ type ProviderStreamingOptions = ({
757
845
  /**
758
846
  * Type-safe streaming options for a specific provider
759
847
  */
760
- type StreamingOptionsForProvider<P extends "gladia" | "deepgram" | "assemblyai"> = P extends "gladia" ? GladiaStreamingOptions : P extends "deepgram" ? DeepgramStreamingOptions : P extends "assemblyai" ? AssemblyAIStreamingOptions : never;
848
+ type StreamingOptionsForProvider<P extends StreamingProvider> = P extends "gladia" ? GladiaStreamingOptions : P extends "deepgram" ? DeepgramStreamingOptions : P extends "assemblyai" ? AssemblyAIStreamingOptions : never;
761
849
  /**
762
850
  * Type-safe transcribeStream parameters for a specific provider
763
851
  */
764
- interface TranscribeStreamParams<P extends "gladia" | "deepgram" | "assemblyai"> {
852
+ interface TranscribeStreamParams<P extends StreamingProvider> {
765
853
  /** Streaming options specific to this provider */
766
854
  options?: StreamingOptionsForProvider<P> & {
767
855
  provider: P;
@@ -1084,12 +1172,16 @@ declare function createVoiceRouter(config: VoiceRouterConfig, adapters?: Transcr
1084
1172
  declare class GladiaAdapter extends BaseAdapter {
1085
1173
  readonly name: "gladia";
1086
1174
  readonly capabilities: ProviderCapabilities;
1087
- private baseUrl;
1175
+ protected baseUrl: string;
1088
1176
  /**
1089
1177
  * Get axios config for generated API client functions
1090
- * Configures headers and base URL
1178
+ * Configures headers and base URL using Gladia's x-gladia-key header
1091
1179
  */
1092
- private getAxiosConfig;
1180
+ protected getAxiosConfig(): {
1181
+ baseURL: string;
1182
+ timeout: number;
1183
+ headers: Record<string, string>;
1184
+ };
1093
1185
  /**
1094
1186
  * Submit audio for transcription
1095
1187
  *
@@ -1181,7 +1273,6 @@ declare class GladiaAdapter extends BaseAdapter {
1181
1273
  /**
1182
1274
  * Poll for transcription completion
1183
1275
  */
1184
- private pollForCompletion;
1185
1276
  /**
1186
1277
  * Stream audio for real-time transcription
1187
1278
  *
@@ -1287,13 +1378,17 @@ declare function createGladiaAdapter(config: ProviderConfig): GladiaAdapter;
1287
1378
  declare class AssemblyAIAdapter extends BaseAdapter {
1288
1379
  readonly name: "assemblyai";
1289
1380
  readonly capabilities: ProviderCapabilities;
1290
- private baseUrl;
1381
+ protected baseUrl: string;
1291
1382
  private wsBaseUrl;
1292
1383
  /**
1293
1384
  * Get axios config for generated API client functions
1294
- * Configures headers and base URL
1385
+ * Configures headers and base URL using authorization header
1295
1386
  */
1296
- private getAxiosConfig;
1387
+ protected getAxiosConfig(): {
1388
+ baseURL: string;
1389
+ timeout: number;
1390
+ headers: Record<string, string>;
1391
+ };
1297
1392
  /**
1298
1393
  * Submit audio for transcription
1299
1394
  *
@@ -1386,10 +1481,6 @@ declare class AssemblyAIAdapter extends BaseAdapter {
1386
1481
  * Extract utterances from AssemblyAI response
1387
1482
  */
1388
1483
  private extractUtterances;
1389
- /**
1390
- * Poll for transcription completion
1391
- */
1392
- private pollForCompletion;
1393
1484
  /**
1394
1485
  * Stream audio for real-time transcription
1395
1486
  *
@@ -1496,7 +1587,7 @@ declare class DeepgramAdapter extends BaseAdapter {
1496
1587
  readonly name: "deepgram";
1497
1588
  readonly capabilities: ProviderCapabilities;
1498
1589
  private client?;
1499
- private baseUrl;
1590
+ protected baseUrl: string;
1500
1591
  private wsBaseUrl;
1501
1592
  initialize(config: ProviderConfig): void;
1502
1593
  /**
@@ -1706,12 +1797,20 @@ declare function createDeepgramAdapter(config: ProviderConfig): DeepgramAdapter;
1706
1797
  declare class AzureSTTAdapter extends BaseAdapter {
1707
1798
  readonly name: "azure-stt";
1708
1799
  readonly capabilities: ProviderCapabilities;
1709
- private client?;
1710
1800
  private region?;
1711
- private baseUrl?;
1801
+ protected baseUrl: string;
1712
1802
  initialize(config: ProviderConfig & {
1713
1803
  region?: string;
1714
1804
  }): void;
1805
+ /**
1806
+ * Get axios config for generated API client functions
1807
+ * Configures headers and base URL using Azure subscription key
1808
+ */
1809
+ protected getAxiosConfig(): {
1810
+ baseURL: string;
1811
+ timeout: number;
1812
+ headers: Record<string, string>;
1813
+ };
1715
1814
  /**
1716
1815
  * Submit audio for transcription
1717
1816
  *
@@ -1845,9 +1944,16 @@ declare function createAzureSTTAdapter(config: ProviderConfig & {
1845
1944
  declare class OpenAIWhisperAdapter extends BaseAdapter {
1846
1945
  readonly name: "openai-whisper";
1847
1946
  readonly capabilities: ProviderCapabilities;
1848
- private client?;
1849
- private baseUrl;
1850
- initialize(config: ProviderConfig): void;
1947
+ protected baseUrl: string;
1948
+ /**
1949
+ * Get axios config for generated API client functions
1950
+ * Configures headers and base URL using Bearer token authorization
1951
+ */
1952
+ protected getAxiosConfig(): {
1953
+ baseURL: string;
1954
+ timeout: number;
1955
+ headers: Record<string, string>;
1956
+ };
1851
1957
  /**
1852
1958
  * Submit audio for transcription
1853
1959
  *
@@ -1972,7 +2078,7 @@ declare class SpeechmaticsAdapter extends BaseAdapter {
1972
2078
  readonly name: "speechmatics";
1973
2079
  readonly capabilities: ProviderCapabilities;
1974
2080
  private client?;
1975
- private baseUrl;
2081
+ protected baseUrl: string;
1976
2082
  initialize(config: ProviderConfig): void;
1977
2083
  /**
1978
2084
  * Submit audio for transcription
@@ -11082,4 +11188,4 @@ declare namespace index {
11082
11188
  export { index_AudioIntelligenceModelStatus as AudioIntelligenceModelStatus, type index_AutoHighlightResult as AutoHighlightResult, type index_AutoHighlightsResult as AutoHighlightsResult, type index_BadRequestResponse as BadRequestResponse, type index_CannotAccessUploadedFileResponse as CannotAccessUploadedFileResponse, type index_Chapter as Chapter, type index_ContentSafetyLabel as ContentSafetyLabel, type index_ContentSafetyLabelResult as ContentSafetyLabelResult, type index_ContentSafetyLabelsResult as ContentSafetyLabelsResult, type index_ContentSafetyLabelsResultSeverityScoreSummary as ContentSafetyLabelsResultSeverityScoreSummary, type index_ContentSafetyLabelsResultSummary as ContentSafetyLabelsResultSummary, type index_CreateRealtimeTemporaryTokenParams as CreateRealtimeTemporaryTokenParams, type index_Entity as Entity, index_EntityType as EntityType, type Error$1 as Error, type index_GatewayTimeoutResponse as GatewayTimeoutResponse, type index_GetSubtitlesParams as GetSubtitlesParams, type index_InternalServerErrorResponse as InternalServerErrorResponse, type index_LemurActionItemsParams as LemurActionItemsParams, type index_LemurActionItemsParamsAllOf as LemurActionItemsParamsAllOf, type index_LemurActionItemsResponse as LemurActionItemsResponse, type index_LemurBaseParams as LemurBaseParams, type index_LemurBaseParamsContext as LemurBaseParamsContext, type index_LemurBaseParamsContextOneOf as LemurBaseParamsContextOneOf, type index_LemurBaseParamsFinalModel as LemurBaseParamsFinalModel, type index_LemurBaseResponse as LemurBaseResponse, index_LemurModel as LemurModel, type index_LemurQuestion as LemurQuestion, type index_LemurQuestionAnswer as LemurQuestionAnswer, type index_LemurQuestionAnswerParams as LemurQuestionAnswerParams, type index_LemurQuestionAnswerParamsAllOf as LemurQuestionAnswerParamsAllOf, type index_LemurQuestionAnswerResponse as LemurQuestionAnswerResponse, type index_LemurQuestionAnswerResponseAllOf as LemurQuestionAnswerResponseAllOf, type index_LemurQuestionContext as LemurQuestionContext, type index_LemurQuestionContextOneOf as LemurQuestionContextOneOf, type index_LemurResponse as LemurResponse, type index_LemurStringResponse as LemurStringResponse, type index_LemurStringResponseAllOf as LemurStringResponseAllOf, type index_LemurSummaryParams as LemurSummaryParams, type index_LemurSummaryParamsAllOf as LemurSummaryParamsAllOf, type index_LemurSummaryResponse as LemurSummaryResponse, type index_LemurTaskParams as LemurTaskParams, type index_LemurTaskParamsAllOf as LemurTaskParamsAllOf, type index_LemurTaskResponse as LemurTaskResponse, type index_LemurUsage as LemurUsage, type index_ListTranscriptParams as ListTranscriptParams, type index_ListTranscriptsParams as ListTranscriptsParams, type index_NotFoundResponse as NotFoundResponse, type index_PageDetails as PageDetails, type index_PageDetailsNextUrl as PageDetailsNextUrl, type index_PageDetailsPrevUrl as PageDetailsPrevUrl, type index_ParagraphsResponse as ParagraphsResponse, index_PiiPolicy as PiiPolicy, type index_PurgeLemurRequestDataResponse as PurgeLemurRequestDataResponse, type index_RealtimeTemporaryTokenResponse as RealtimeTemporaryTokenResponse, index_RedactPiiAudioQuality as RedactPiiAudioQuality, type index_RedactedAudioNotification as RedactedAudioNotification, type index_RedactedAudioResponse as RedactedAudioResponse, index_RedactedAudioStatus as RedactedAudioStatus, type index_SentencesResponse as SentencesResponse, index_Sentiment as Sentiment, type index_SentimentAnalysisResult as SentimentAnalysisResult, type index_SentimentAnalysisResultChannel as SentimentAnalysisResultChannel, type index_SentimentAnalysisResultSpeaker as SentimentAnalysisResultSpeaker, type index_ServiceUnavailableResponse as ServiceUnavailableResponse, type index_SeverityScoreSummary as SeverityScoreSummary, index_SpeechModel as SpeechModel, index_SubstitutionPolicy as SubstitutionPolicy, index_SubtitleFormat as SubtitleFormat, index_SummaryModel as SummaryModel, index_SummaryType as SummaryType, type index_Timestamp as Timestamp, type index_TooManyRequestsResponse as TooManyRequestsResponse, type index_TopicDetectionModelResult as TopicDetectionModelResult, type index_TopicDetectionModelResultSummary as TopicDetectionModelResultSummary, type index_TopicDetectionResult as TopicDetectionResult, type index_TopicDetectionResultLabelsItem as TopicDetectionResultLabelsItem, type index_Transcript as Transcript, type index_TranscriptAudioDuration as TranscriptAudioDuration, type index_TranscriptAudioEndAt as TranscriptAudioEndAt, type index_TranscriptAudioStartFrom as TranscriptAudioStartFrom, type index_TranscriptAutoChapters as TranscriptAutoChapters, type index_TranscriptAutoHighlightsResult as TranscriptAutoHighlightsResult, index_TranscriptBoostParam as TranscriptBoostParam, type index_TranscriptBoostParamProperty as TranscriptBoostParamProperty, type index_TranscriptChapters as TranscriptChapters, type index_TranscriptConfidence as TranscriptConfidence, type index_TranscriptContentSafety as TranscriptContentSafety, type index_TranscriptContentSafetyLabels as TranscriptContentSafetyLabels, type index_TranscriptCustomSpelling as TranscriptCustomSpelling, type index_TranscriptCustomSpellingProperty as TranscriptCustomSpellingProperty, type index_TranscriptCustomTopics as TranscriptCustomTopics, type index_TranscriptDisfluencies as TranscriptDisfluencies, type index_TranscriptEntities as TranscriptEntities, type index_TranscriptEntityDetection as TranscriptEntityDetection, type index_TranscriptFilterProfanity as TranscriptFilterProfanity, type index_TranscriptFormatText as TranscriptFormatText, type index_TranscriptIabCategories as TranscriptIabCategories, type index_TranscriptIabCategoriesResult as TranscriptIabCategoriesResult, index_TranscriptLanguageCode as TranscriptLanguageCode, type index_TranscriptLanguageCodeProperty as TranscriptLanguageCodeProperty, type index_TranscriptLanguageConfidence as TranscriptLanguageConfidence, type index_TranscriptLanguageConfidenceThreshold as TranscriptLanguageConfidenceThreshold, type index_TranscriptLanguageDetection as TranscriptLanguageDetection, type index_TranscriptList as TranscriptList, type index_TranscriptListItem as TranscriptListItem, type index_TranscriptListItemCompleted as TranscriptListItemCompleted, type index_TranscriptListItemError as TranscriptListItemError, type index_TranscriptMultichannel as TranscriptMultichannel, type index_TranscriptOptionalParams as TranscriptOptionalParams, type index_TranscriptOptionalParamsLanguageCode as TranscriptOptionalParamsLanguageCode, type index_TranscriptOptionalParamsLanguageCodeOneOf as TranscriptOptionalParamsLanguageCodeOneOf, type index_TranscriptOptionalParamsRedactPiiSub as TranscriptOptionalParamsRedactPiiSub, type index_TranscriptOptionalParamsSpeakersExpected as TranscriptOptionalParamsSpeakersExpected, type index_TranscriptOptionalParamsSpeechModel as TranscriptOptionalParamsSpeechModel, type index_TranscriptOptionalParamsSpeechThreshold as TranscriptOptionalParamsSpeechThreshold, type index_TranscriptOptionalParamsWebhookAuthHeaderName as TranscriptOptionalParamsWebhookAuthHeaderName, type index_TranscriptOptionalParamsWebhookAuthHeaderValue as TranscriptOptionalParamsWebhookAuthHeaderValue, type index_TranscriptParagraph as TranscriptParagraph, type index_TranscriptParams as TranscriptParams, type index_TranscriptParamsAllOf as TranscriptParamsAllOf, type index_TranscriptPunctuate as TranscriptPunctuate, type index_TranscriptReadyNotification as TranscriptReadyNotification, index_TranscriptReadyStatus as TranscriptReadyStatus, type index_TranscriptRedactPiiAudio as TranscriptRedactPiiAudio, type index_TranscriptRedactPiiAudioQuality as TranscriptRedactPiiAudioQuality, type index_TranscriptRedactPiiPolicies as TranscriptRedactPiiPolicies, type index_TranscriptSentence as TranscriptSentence, type index_TranscriptSentenceChannel as TranscriptSentenceChannel, type index_TranscriptSentenceSpeaker as TranscriptSentenceSpeaker, type index_TranscriptSentimentAnalysis as TranscriptSentimentAnalysis, type index_TranscriptSentimentAnalysisResults as TranscriptSentimentAnalysisResults, type index_TranscriptSpeakerLabels as TranscriptSpeakerLabels, type index_TranscriptSpeakersExpected as TranscriptSpeakersExpected, type index_TranscriptSpeechModel as TranscriptSpeechModel, type index_TranscriptSpeechThreshold as TranscriptSpeechThreshold, type index_TranscriptSpeedBoost as TranscriptSpeedBoost, index_TranscriptStatus as TranscriptStatus, type index_TranscriptSummary as TranscriptSummary, type index_TranscriptSummaryModel as TranscriptSummaryModel, type index_TranscriptSummaryType as TranscriptSummaryType, type index_TranscriptText as TranscriptText, type index_TranscriptThrottled as TranscriptThrottled, type index_TranscriptUtterance as TranscriptUtterance, type index_TranscriptUtteranceChannel as TranscriptUtteranceChannel, type index_TranscriptUtterances as TranscriptUtterances, type index_TranscriptWebhookAuthHeaderName as TranscriptWebhookAuthHeaderName, type index_TranscriptWebhookNotification as TranscriptWebhookNotification, type index_TranscriptWebhookStatusCode as TranscriptWebhookStatusCode, type index_TranscriptWebhookUrl as TranscriptWebhookUrl, type index_TranscriptWord as TranscriptWord, type index_TranscriptWordChannel as TranscriptWordChannel, type index_TranscriptWordSpeaker as TranscriptWordSpeaker, type index_TranscriptWords as TranscriptWords, type index_UnauthorizedResponse as UnauthorizedResponse, type index_UploadedFile as UploadedFile, type index_WordSearchMatch as WordSearchMatch, type index_WordSearchParams as WordSearchParams, type index_WordSearchResponse as WordSearchResponse, type index_WordSearchTimestamp as WordSearchTimestamp };
11083
11189
  }
11084
11190
 
11085
- export { AssemblyAIAdapter, type AssemblyAIStreamingOptions, index as AssemblyAITypes, AssemblyAIWebhookHandler, type AudioChunk, type AudioInput, AzureSTTAdapter, AzureWebhookHandler, BaseAdapter, BaseWebhookHandler, DeepgramAdapter, type DeepgramStreamingOptions, DeepgramWebhookHandler, GladiaAdapter, type GladiaStreamingOptions, index$1 as GladiaTypes, GladiaWebhookHandler, OpenAIWhisperAdapter, type ProviderCapabilities, type ProviderConfig, type ProviderStreamingOptions, type Speaker, SpeechmaticsAdapter, SpeechmaticsWebhookHandler, type StreamEvent, type StreamEventType, type StreamingCallbacks, type StreamingOptions, type StreamingOptionsForProvider, type StreamingSession, type TranscribeOptions, type TranscribeStreamParams, type TranscriptionAdapter, type TranscriptionProvider, type TranscriptionStatus, type UnifiedTranscriptResponse, type UnifiedWebhookEvent, type Utterance, VoiceRouter, type VoiceRouterConfig, type WebhookEventType, WebhookRouter, type WebhookRouterOptions, type WebhookRouterResult, type WebhookValidation, type WebhookVerificationOptions, type Word, createAssemblyAIAdapter, createAssemblyAIWebhookHandler, createAzureSTTAdapter, createAzureWebhookHandler, createDeepgramAdapter, createDeepgramWebhookHandler, createGladiaAdapter, createGladiaWebhookHandler, createOpenAIWhisperAdapter, createSpeechmaticsAdapter, createVoiceRouter, createWebhookRouter };
11191
+ export { AssemblyAIAdapter, type AssemblyAIStreamingOptions, index as AssemblyAITypes, AssemblyAIWebhookHandler, type AudioChunk, type AudioInput, AzureSTTAdapter, AzureWebhookHandler, BaseAdapter, BaseWebhookHandler, type BatchOnlyProvider, DeepgramAdapter, type DeepgramStreamingOptions, DeepgramWebhookHandler, GladiaAdapter, type GladiaStreamingOptions, index$1 as GladiaTypes, GladiaWebhookHandler, OpenAIWhisperAdapter, type ProviderCapabilities, type ProviderConfig, type ProviderStreamingOptions, type SessionStatus, type Speaker, SpeechmaticsAdapter, SpeechmaticsWebhookHandler, type StreamEvent, type StreamEventType, type StreamingCallbacks, type StreamingOptions, type StreamingOptionsForProvider, type StreamingProvider, type StreamingSession, type TranscribeOptions, type TranscribeStreamParams, type TranscriptionAdapter, type TranscriptionProvider, type TranscriptionStatus, type UnifiedTranscriptResponse, type UnifiedWebhookEvent, type Utterance, VoiceRouter, type VoiceRouterConfig, type WebhookEventType, WebhookRouter, type WebhookRouterOptions, type WebhookRouterResult, type WebhookValidation, type WebhookVerificationOptions, type Word, createAssemblyAIAdapter, createAssemblyAIWebhookHandler, createAzureSTTAdapter, createAzureWebhookHandler, createDeepgramAdapter, createDeepgramWebhookHandler, createGladiaAdapter, createGladiaWebhookHandler, createOpenAIWhisperAdapter, createSpeechmaticsAdapter, createVoiceRouter, createWebhookRouter };
package/dist/index.d.ts CHANGED
@@ -40,6 +40,18 @@ type AudioChannels = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
40
40
  * Supported transcription providers
41
41
  */
42
42
  type TranscriptionProvider = "gladia" | "assemblyai" | "deepgram" | "azure-stt" | "openai-whisper" | "speechmatics";
43
+ /**
44
+ * Providers that support real-time streaming transcription
45
+ */
46
+ type StreamingProvider = "gladia" | "deepgram" | "assemblyai";
47
+ /**
48
+ * Providers that only support batch/async transcription
49
+ */
50
+ type BatchOnlyProvider = "azure-stt" | "openai-whisper" | "speechmatics";
51
+ /**
52
+ * WebSocket session status for streaming transcription
53
+ */
54
+ type SessionStatus = "connecting" | "open" | "closing" | "closed";
43
55
  /**
44
56
  * Provider capabilities - indicates which features each provider supports
45
57
  */
@@ -327,6 +339,39 @@ interface StreamingSession {
327
339
  createdAt: Date;
328
340
  }
329
341
 
342
+ /**
343
+ * Standardized error handling utilities for Voice Router SDK
344
+ *
345
+ * Provides consistent error codes, messages, and formatting across all adapters.
346
+ */
347
+ /**
348
+ * Standard error codes used across all providers
349
+ *
350
+ * These codes provide a consistent error taxonomy regardless of which
351
+ * provider is being used.
352
+ */
353
+ declare const ERROR_CODES: {
354
+ /** Failed to parse API response or WebSocket message */
355
+ readonly PARSE_ERROR: "PARSE_ERROR";
356
+ /** WebSocket connection error */
357
+ readonly WEBSOCKET_ERROR: "WEBSOCKET_ERROR";
358
+ /** Async transcription job did not complete within timeout */
359
+ readonly POLLING_TIMEOUT: "POLLING_TIMEOUT";
360
+ /** Transcription processing failed on provider side */
361
+ readonly TRANSCRIPTION_ERROR: "TRANSCRIPTION_ERROR";
362
+ /** Connection attempt timed out */
363
+ readonly CONNECTION_TIMEOUT: "CONNECTION_TIMEOUT";
364
+ /** Invalid input provided to API */
365
+ readonly INVALID_INPUT: "INVALID_INPUT";
366
+ /** Requested operation not supported by provider */
367
+ readonly NOT_SUPPORTED: "NOT_SUPPORTED";
368
+ /** No transcription results available */
369
+ readonly NO_RESULTS: "NO_RESULTS";
370
+ /** Unspecified or unknown error */
371
+ readonly UNKNOWN_ERROR: "UNKNOWN_ERROR";
372
+ };
373
+ type ErrorCode = (typeof ERROR_CODES)[keyof typeof ERROR_CODES];
374
+
330
375
  /**
331
376
  * Base adapter interface for transcription providers
332
377
  * All provider adapters must implement this interface
@@ -444,18 +489,51 @@ interface TranscriptionAdapter {
444
489
  declare abstract class BaseAdapter implements TranscriptionAdapter {
445
490
  abstract readonly name: TranscriptionProvider;
446
491
  abstract readonly capabilities: ProviderCapabilities;
492
+ /**
493
+ * Base URL for provider API (must be defined by subclass)
494
+ */
495
+ protected abstract baseUrl: string;
447
496
  protected config?: ProviderConfig;
448
497
  initialize(config: ProviderConfig): void;
449
498
  abstract transcribe(audio: AudioInput, options?: TranscribeOptions): Promise<UnifiedTranscriptResponse>;
450
499
  abstract getTranscript(transcriptId: string): Promise<UnifiedTranscriptResponse>;
451
500
  /**
452
- * Helper method to create error responses
501
+ * Helper method to create error responses with stack traces
502
+ *
503
+ * @param error - Error object or unknown error
504
+ * @param statusCode - Optional HTTP status code
505
+ * @param code - Optional error code (defaults to extracted or UNKNOWN_ERROR)
453
506
  */
454
- protected createErrorResponse(error: Error | unknown, statusCode?: number): UnifiedTranscriptResponse;
507
+ protected createErrorResponse(error: Error | unknown, statusCode?: number, code?: ErrorCode): UnifiedTranscriptResponse;
455
508
  /**
456
509
  * Helper method to validate configuration
457
510
  */
458
511
  protected validateConfig(): void;
512
+ /**
513
+ * Build axios config for generated API client functions
514
+ *
515
+ * @param authHeaderName - Header name for API key (e.g., "Authorization", "x-gladia-key")
516
+ * @param authHeaderValue - Optional function to format auth header value (defaults to raw API key)
517
+ * @returns Axios config object
518
+ */
519
+ protected getAxiosConfig(authHeaderName?: string, authHeaderValue?: (apiKey: string) => string): {
520
+ baseURL: string;
521
+ timeout: number;
522
+ headers: Record<string, string>;
523
+ };
524
+ /**
525
+ * Generic polling helper for async transcription jobs
526
+ *
527
+ * Polls getTranscript() until job completes or times out.
528
+ *
529
+ * @param transcriptId - Job/transcript ID to poll
530
+ * @param options - Polling configuration
531
+ * @returns Final transcription result
532
+ */
533
+ protected pollForCompletion(transcriptId: string, options?: {
534
+ maxAttempts?: number;
535
+ intervalMs?: number;
536
+ }): Promise<UnifiedTranscriptResponse>;
459
537
  }
460
538
 
461
539
  /**
@@ -648,13 +726,23 @@ interface LanguageConfig {
648
726
 
649
727
  * OpenAPI spec version: 1.0.0
650
728
  */
651
- type ListenV1EncodingParameter = (typeof ListenV1EncodingParameter)[keyof typeof ListenV1EncodingParameter];
729
+ /**
730
+ * ListenV1EncodingParameter type definition
731
+ */
732
+ /**
733
+ * ListenV1EncodingParameter type definition
734
+ */
735
+ /**
736
+ * ListenV1EncodingParameter type definition
737
+ */
738
+ /**
739
+ * ListenV1EncodingParameter type definition
740
+ */
741
+ type ListenV1EncodingParameter = typeof ListenV1EncodingParameter[keyof typeof ListenV1EncodingParameter];
652
742
  declare const ListenV1EncodingParameter: {
653
743
  readonly linear16: "linear16";
654
744
  readonly flac: "flac";
655
745
  readonly mulaw: "mulaw";
656
- readonly "amr-nb": "amr-nb";
657
- readonly "amr-wb": "amr-wb";
658
746
  readonly opus: "opus";
659
747
  readonly speex: "speex";
660
748
  readonly g729: "g729";
@@ -757,11 +845,11 @@ type ProviderStreamingOptions = ({
757
845
  /**
758
846
  * Type-safe streaming options for a specific provider
759
847
  */
760
- type StreamingOptionsForProvider<P extends "gladia" | "deepgram" | "assemblyai"> = P extends "gladia" ? GladiaStreamingOptions : P extends "deepgram" ? DeepgramStreamingOptions : P extends "assemblyai" ? AssemblyAIStreamingOptions : never;
848
+ type StreamingOptionsForProvider<P extends StreamingProvider> = P extends "gladia" ? GladiaStreamingOptions : P extends "deepgram" ? DeepgramStreamingOptions : P extends "assemblyai" ? AssemblyAIStreamingOptions : never;
761
849
  /**
762
850
  * Type-safe transcribeStream parameters for a specific provider
763
851
  */
764
- interface TranscribeStreamParams<P extends "gladia" | "deepgram" | "assemblyai"> {
852
+ interface TranscribeStreamParams<P extends StreamingProvider> {
765
853
  /** Streaming options specific to this provider */
766
854
  options?: StreamingOptionsForProvider<P> & {
767
855
  provider: P;
@@ -1084,12 +1172,16 @@ declare function createVoiceRouter(config: VoiceRouterConfig, adapters?: Transcr
1084
1172
  declare class GladiaAdapter extends BaseAdapter {
1085
1173
  readonly name: "gladia";
1086
1174
  readonly capabilities: ProviderCapabilities;
1087
- private baseUrl;
1175
+ protected baseUrl: string;
1088
1176
  /**
1089
1177
  * Get axios config for generated API client functions
1090
- * Configures headers and base URL
1178
+ * Configures headers and base URL using Gladia's x-gladia-key header
1091
1179
  */
1092
- private getAxiosConfig;
1180
+ protected getAxiosConfig(): {
1181
+ baseURL: string;
1182
+ timeout: number;
1183
+ headers: Record<string, string>;
1184
+ };
1093
1185
  /**
1094
1186
  * Submit audio for transcription
1095
1187
  *
@@ -1181,7 +1273,6 @@ declare class GladiaAdapter extends BaseAdapter {
1181
1273
  /**
1182
1274
  * Poll for transcription completion
1183
1275
  */
1184
- private pollForCompletion;
1185
1276
  /**
1186
1277
  * Stream audio for real-time transcription
1187
1278
  *
@@ -1287,13 +1378,17 @@ declare function createGladiaAdapter(config: ProviderConfig): GladiaAdapter;
1287
1378
  declare class AssemblyAIAdapter extends BaseAdapter {
1288
1379
  readonly name: "assemblyai";
1289
1380
  readonly capabilities: ProviderCapabilities;
1290
- private baseUrl;
1381
+ protected baseUrl: string;
1291
1382
  private wsBaseUrl;
1292
1383
  /**
1293
1384
  * Get axios config for generated API client functions
1294
- * Configures headers and base URL
1385
+ * Configures headers and base URL using authorization header
1295
1386
  */
1296
- private getAxiosConfig;
1387
+ protected getAxiosConfig(): {
1388
+ baseURL: string;
1389
+ timeout: number;
1390
+ headers: Record<string, string>;
1391
+ };
1297
1392
  /**
1298
1393
  * Submit audio for transcription
1299
1394
  *
@@ -1386,10 +1481,6 @@ declare class AssemblyAIAdapter extends BaseAdapter {
1386
1481
  * Extract utterances from AssemblyAI response
1387
1482
  */
1388
1483
  private extractUtterances;
1389
- /**
1390
- * Poll for transcription completion
1391
- */
1392
- private pollForCompletion;
1393
1484
  /**
1394
1485
  * Stream audio for real-time transcription
1395
1486
  *
@@ -1496,7 +1587,7 @@ declare class DeepgramAdapter extends BaseAdapter {
1496
1587
  readonly name: "deepgram";
1497
1588
  readonly capabilities: ProviderCapabilities;
1498
1589
  private client?;
1499
- private baseUrl;
1590
+ protected baseUrl: string;
1500
1591
  private wsBaseUrl;
1501
1592
  initialize(config: ProviderConfig): void;
1502
1593
  /**
@@ -1706,12 +1797,20 @@ declare function createDeepgramAdapter(config: ProviderConfig): DeepgramAdapter;
1706
1797
  declare class AzureSTTAdapter extends BaseAdapter {
1707
1798
  readonly name: "azure-stt";
1708
1799
  readonly capabilities: ProviderCapabilities;
1709
- private client?;
1710
1800
  private region?;
1711
- private baseUrl?;
1801
+ protected baseUrl: string;
1712
1802
  initialize(config: ProviderConfig & {
1713
1803
  region?: string;
1714
1804
  }): void;
1805
+ /**
1806
+ * Get axios config for generated API client functions
1807
+ * Configures headers and base URL using Azure subscription key
1808
+ */
1809
+ protected getAxiosConfig(): {
1810
+ baseURL: string;
1811
+ timeout: number;
1812
+ headers: Record<string, string>;
1813
+ };
1715
1814
  /**
1716
1815
  * Submit audio for transcription
1717
1816
  *
@@ -1845,9 +1944,16 @@ declare function createAzureSTTAdapter(config: ProviderConfig & {
1845
1944
  declare class OpenAIWhisperAdapter extends BaseAdapter {
1846
1945
  readonly name: "openai-whisper";
1847
1946
  readonly capabilities: ProviderCapabilities;
1848
- private client?;
1849
- private baseUrl;
1850
- initialize(config: ProviderConfig): void;
1947
+ protected baseUrl: string;
1948
+ /**
1949
+ * Get axios config for generated API client functions
1950
+ * Configures headers and base URL using Bearer token authorization
1951
+ */
1952
+ protected getAxiosConfig(): {
1953
+ baseURL: string;
1954
+ timeout: number;
1955
+ headers: Record<string, string>;
1956
+ };
1851
1957
  /**
1852
1958
  * Submit audio for transcription
1853
1959
  *
@@ -1972,7 +2078,7 @@ declare class SpeechmaticsAdapter extends BaseAdapter {
1972
2078
  readonly name: "speechmatics";
1973
2079
  readonly capabilities: ProviderCapabilities;
1974
2080
  private client?;
1975
- private baseUrl;
2081
+ protected baseUrl: string;
1976
2082
  initialize(config: ProviderConfig): void;
1977
2083
  /**
1978
2084
  * Submit audio for transcription
@@ -11082,4 +11188,4 @@ declare namespace index {
11082
11188
  export { index_AudioIntelligenceModelStatus as AudioIntelligenceModelStatus, type index_AutoHighlightResult as AutoHighlightResult, type index_AutoHighlightsResult as AutoHighlightsResult, type index_BadRequestResponse as BadRequestResponse, type index_CannotAccessUploadedFileResponse as CannotAccessUploadedFileResponse, type index_Chapter as Chapter, type index_ContentSafetyLabel as ContentSafetyLabel, type index_ContentSafetyLabelResult as ContentSafetyLabelResult, type index_ContentSafetyLabelsResult as ContentSafetyLabelsResult, type index_ContentSafetyLabelsResultSeverityScoreSummary as ContentSafetyLabelsResultSeverityScoreSummary, type index_ContentSafetyLabelsResultSummary as ContentSafetyLabelsResultSummary, type index_CreateRealtimeTemporaryTokenParams as CreateRealtimeTemporaryTokenParams, type index_Entity as Entity, index_EntityType as EntityType, type Error$1 as Error, type index_GatewayTimeoutResponse as GatewayTimeoutResponse, type index_GetSubtitlesParams as GetSubtitlesParams, type index_InternalServerErrorResponse as InternalServerErrorResponse, type index_LemurActionItemsParams as LemurActionItemsParams, type index_LemurActionItemsParamsAllOf as LemurActionItemsParamsAllOf, type index_LemurActionItemsResponse as LemurActionItemsResponse, type index_LemurBaseParams as LemurBaseParams, type index_LemurBaseParamsContext as LemurBaseParamsContext, type index_LemurBaseParamsContextOneOf as LemurBaseParamsContextOneOf, type index_LemurBaseParamsFinalModel as LemurBaseParamsFinalModel, type index_LemurBaseResponse as LemurBaseResponse, index_LemurModel as LemurModel, type index_LemurQuestion as LemurQuestion, type index_LemurQuestionAnswer as LemurQuestionAnswer, type index_LemurQuestionAnswerParams as LemurQuestionAnswerParams, type index_LemurQuestionAnswerParamsAllOf as LemurQuestionAnswerParamsAllOf, type index_LemurQuestionAnswerResponse as LemurQuestionAnswerResponse, type index_LemurQuestionAnswerResponseAllOf as LemurQuestionAnswerResponseAllOf, type index_LemurQuestionContext as LemurQuestionContext, type index_LemurQuestionContextOneOf as LemurQuestionContextOneOf, type index_LemurResponse as LemurResponse, type index_LemurStringResponse as LemurStringResponse, type index_LemurStringResponseAllOf as LemurStringResponseAllOf, type index_LemurSummaryParams as LemurSummaryParams, type index_LemurSummaryParamsAllOf as LemurSummaryParamsAllOf, type index_LemurSummaryResponse as LemurSummaryResponse, type index_LemurTaskParams as LemurTaskParams, type index_LemurTaskParamsAllOf as LemurTaskParamsAllOf, type index_LemurTaskResponse as LemurTaskResponse, type index_LemurUsage as LemurUsage, type index_ListTranscriptParams as ListTranscriptParams, type index_ListTranscriptsParams as ListTranscriptsParams, type index_NotFoundResponse as NotFoundResponse, type index_PageDetails as PageDetails, type index_PageDetailsNextUrl as PageDetailsNextUrl, type index_PageDetailsPrevUrl as PageDetailsPrevUrl, type index_ParagraphsResponse as ParagraphsResponse, index_PiiPolicy as PiiPolicy, type index_PurgeLemurRequestDataResponse as PurgeLemurRequestDataResponse, type index_RealtimeTemporaryTokenResponse as RealtimeTemporaryTokenResponse, index_RedactPiiAudioQuality as RedactPiiAudioQuality, type index_RedactedAudioNotification as RedactedAudioNotification, type index_RedactedAudioResponse as RedactedAudioResponse, index_RedactedAudioStatus as RedactedAudioStatus, type index_SentencesResponse as SentencesResponse, index_Sentiment as Sentiment, type index_SentimentAnalysisResult as SentimentAnalysisResult, type index_SentimentAnalysisResultChannel as SentimentAnalysisResultChannel, type index_SentimentAnalysisResultSpeaker as SentimentAnalysisResultSpeaker, type index_ServiceUnavailableResponse as ServiceUnavailableResponse, type index_SeverityScoreSummary as SeverityScoreSummary, index_SpeechModel as SpeechModel, index_SubstitutionPolicy as SubstitutionPolicy, index_SubtitleFormat as SubtitleFormat, index_SummaryModel as SummaryModel, index_SummaryType as SummaryType, type index_Timestamp as Timestamp, type index_TooManyRequestsResponse as TooManyRequestsResponse, type index_TopicDetectionModelResult as TopicDetectionModelResult, type index_TopicDetectionModelResultSummary as TopicDetectionModelResultSummary, type index_TopicDetectionResult as TopicDetectionResult, type index_TopicDetectionResultLabelsItem as TopicDetectionResultLabelsItem, type index_Transcript as Transcript, type index_TranscriptAudioDuration as TranscriptAudioDuration, type index_TranscriptAudioEndAt as TranscriptAudioEndAt, type index_TranscriptAudioStartFrom as TranscriptAudioStartFrom, type index_TranscriptAutoChapters as TranscriptAutoChapters, type index_TranscriptAutoHighlightsResult as TranscriptAutoHighlightsResult, index_TranscriptBoostParam as TranscriptBoostParam, type index_TranscriptBoostParamProperty as TranscriptBoostParamProperty, type index_TranscriptChapters as TranscriptChapters, type index_TranscriptConfidence as TranscriptConfidence, type index_TranscriptContentSafety as TranscriptContentSafety, type index_TranscriptContentSafetyLabels as TranscriptContentSafetyLabels, type index_TranscriptCustomSpelling as TranscriptCustomSpelling, type index_TranscriptCustomSpellingProperty as TranscriptCustomSpellingProperty, type index_TranscriptCustomTopics as TranscriptCustomTopics, type index_TranscriptDisfluencies as TranscriptDisfluencies, type index_TranscriptEntities as TranscriptEntities, type index_TranscriptEntityDetection as TranscriptEntityDetection, type index_TranscriptFilterProfanity as TranscriptFilterProfanity, type index_TranscriptFormatText as TranscriptFormatText, type index_TranscriptIabCategories as TranscriptIabCategories, type index_TranscriptIabCategoriesResult as TranscriptIabCategoriesResult, index_TranscriptLanguageCode as TranscriptLanguageCode, type index_TranscriptLanguageCodeProperty as TranscriptLanguageCodeProperty, type index_TranscriptLanguageConfidence as TranscriptLanguageConfidence, type index_TranscriptLanguageConfidenceThreshold as TranscriptLanguageConfidenceThreshold, type index_TranscriptLanguageDetection as TranscriptLanguageDetection, type index_TranscriptList as TranscriptList, type index_TranscriptListItem as TranscriptListItem, type index_TranscriptListItemCompleted as TranscriptListItemCompleted, type index_TranscriptListItemError as TranscriptListItemError, type index_TranscriptMultichannel as TranscriptMultichannel, type index_TranscriptOptionalParams as TranscriptOptionalParams, type index_TranscriptOptionalParamsLanguageCode as TranscriptOptionalParamsLanguageCode, type index_TranscriptOptionalParamsLanguageCodeOneOf as TranscriptOptionalParamsLanguageCodeOneOf, type index_TranscriptOptionalParamsRedactPiiSub as TranscriptOptionalParamsRedactPiiSub, type index_TranscriptOptionalParamsSpeakersExpected as TranscriptOptionalParamsSpeakersExpected, type index_TranscriptOptionalParamsSpeechModel as TranscriptOptionalParamsSpeechModel, type index_TranscriptOptionalParamsSpeechThreshold as TranscriptOptionalParamsSpeechThreshold, type index_TranscriptOptionalParamsWebhookAuthHeaderName as TranscriptOptionalParamsWebhookAuthHeaderName, type index_TranscriptOptionalParamsWebhookAuthHeaderValue as TranscriptOptionalParamsWebhookAuthHeaderValue, type index_TranscriptParagraph as TranscriptParagraph, type index_TranscriptParams as TranscriptParams, type index_TranscriptParamsAllOf as TranscriptParamsAllOf, type index_TranscriptPunctuate as TranscriptPunctuate, type index_TranscriptReadyNotification as TranscriptReadyNotification, index_TranscriptReadyStatus as TranscriptReadyStatus, type index_TranscriptRedactPiiAudio as TranscriptRedactPiiAudio, type index_TranscriptRedactPiiAudioQuality as TranscriptRedactPiiAudioQuality, type index_TranscriptRedactPiiPolicies as TranscriptRedactPiiPolicies, type index_TranscriptSentence as TranscriptSentence, type index_TranscriptSentenceChannel as TranscriptSentenceChannel, type index_TranscriptSentenceSpeaker as TranscriptSentenceSpeaker, type index_TranscriptSentimentAnalysis as TranscriptSentimentAnalysis, type index_TranscriptSentimentAnalysisResults as TranscriptSentimentAnalysisResults, type index_TranscriptSpeakerLabels as TranscriptSpeakerLabels, type index_TranscriptSpeakersExpected as TranscriptSpeakersExpected, type index_TranscriptSpeechModel as TranscriptSpeechModel, type index_TranscriptSpeechThreshold as TranscriptSpeechThreshold, type index_TranscriptSpeedBoost as TranscriptSpeedBoost, index_TranscriptStatus as TranscriptStatus, type index_TranscriptSummary as TranscriptSummary, type index_TranscriptSummaryModel as TranscriptSummaryModel, type index_TranscriptSummaryType as TranscriptSummaryType, type index_TranscriptText as TranscriptText, type index_TranscriptThrottled as TranscriptThrottled, type index_TranscriptUtterance as TranscriptUtterance, type index_TranscriptUtteranceChannel as TranscriptUtteranceChannel, type index_TranscriptUtterances as TranscriptUtterances, type index_TranscriptWebhookAuthHeaderName as TranscriptWebhookAuthHeaderName, type index_TranscriptWebhookNotification as TranscriptWebhookNotification, type index_TranscriptWebhookStatusCode as TranscriptWebhookStatusCode, type index_TranscriptWebhookUrl as TranscriptWebhookUrl, type index_TranscriptWord as TranscriptWord, type index_TranscriptWordChannel as TranscriptWordChannel, type index_TranscriptWordSpeaker as TranscriptWordSpeaker, type index_TranscriptWords as TranscriptWords, type index_UnauthorizedResponse as UnauthorizedResponse, type index_UploadedFile as UploadedFile, type index_WordSearchMatch as WordSearchMatch, type index_WordSearchParams as WordSearchParams, type index_WordSearchResponse as WordSearchResponse, type index_WordSearchTimestamp as WordSearchTimestamp };
11083
11189
  }
11084
11190
 
11085
- export { AssemblyAIAdapter, type AssemblyAIStreamingOptions, index as AssemblyAITypes, AssemblyAIWebhookHandler, type AudioChunk, type AudioInput, AzureSTTAdapter, AzureWebhookHandler, BaseAdapter, BaseWebhookHandler, DeepgramAdapter, type DeepgramStreamingOptions, DeepgramWebhookHandler, GladiaAdapter, type GladiaStreamingOptions, index$1 as GladiaTypes, GladiaWebhookHandler, OpenAIWhisperAdapter, type ProviderCapabilities, type ProviderConfig, type ProviderStreamingOptions, type Speaker, SpeechmaticsAdapter, SpeechmaticsWebhookHandler, type StreamEvent, type StreamEventType, type StreamingCallbacks, type StreamingOptions, type StreamingOptionsForProvider, type StreamingSession, type TranscribeOptions, type TranscribeStreamParams, type TranscriptionAdapter, type TranscriptionProvider, type TranscriptionStatus, type UnifiedTranscriptResponse, type UnifiedWebhookEvent, type Utterance, VoiceRouter, type VoiceRouterConfig, type WebhookEventType, WebhookRouter, type WebhookRouterOptions, type WebhookRouterResult, type WebhookValidation, type WebhookVerificationOptions, type Word, createAssemblyAIAdapter, createAssemblyAIWebhookHandler, createAzureSTTAdapter, createAzureWebhookHandler, createDeepgramAdapter, createDeepgramWebhookHandler, createGladiaAdapter, createGladiaWebhookHandler, createOpenAIWhisperAdapter, createSpeechmaticsAdapter, createVoiceRouter, createWebhookRouter };
11191
+ export { AssemblyAIAdapter, type AssemblyAIStreamingOptions, index as AssemblyAITypes, AssemblyAIWebhookHandler, type AudioChunk, type AudioInput, AzureSTTAdapter, AzureWebhookHandler, BaseAdapter, BaseWebhookHandler, type BatchOnlyProvider, DeepgramAdapter, type DeepgramStreamingOptions, DeepgramWebhookHandler, GladiaAdapter, type GladiaStreamingOptions, index$1 as GladiaTypes, GladiaWebhookHandler, OpenAIWhisperAdapter, type ProviderCapabilities, type ProviderConfig, type ProviderStreamingOptions, type SessionStatus, type Speaker, SpeechmaticsAdapter, SpeechmaticsWebhookHandler, type StreamEvent, type StreamEventType, type StreamingCallbacks, type StreamingOptions, type StreamingOptionsForProvider, type StreamingProvider, type StreamingSession, type TranscribeOptions, type TranscribeStreamParams, type TranscriptionAdapter, type TranscriptionProvider, type TranscriptionStatus, type UnifiedTranscriptResponse, type UnifiedWebhookEvent, type Utterance, VoiceRouter, type VoiceRouterConfig, type WebhookEventType, WebhookRouter, type WebhookRouterOptions, type WebhookRouterResult, type WebhookValidation, type WebhookVerificationOptions, type Word, createAssemblyAIAdapter, createAssemblyAIWebhookHandler, createAzureSTTAdapter, createAzureWebhookHandler, createDeepgramAdapter, createDeepgramWebhookHandler, createGladiaAdapter, createGladiaWebhookHandler, createOpenAIWhisperAdapter, createSpeechmaticsAdapter, createVoiceRouter, createWebhookRouter };