voice-router-dev 0.2.4 → 0.2.5
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 +119 -3
- package/dist/index.d.ts +119 -3
- package/dist/index.js +166 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +166 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -3
package/dist/index.d.mts
CHANGED
|
@@ -4378,16 +4378,23 @@ declare const StreamingSupportedModels: {
|
|
|
4378
4378
|
* These types provide a provider-agnostic interface for transcription services
|
|
4379
4379
|
*/
|
|
4380
4380
|
|
|
4381
|
+
/**
|
|
4382
|
+
* Speechmatics operating point (model) type
|
|
4383
|
+
* Manually defined as Speechmatics OpenAPI spec doesn't export this cleanly
|
|
4384
|
+
*/
|
|
4385
|
+
type SpeechmaticsOperatingPoint = "standard" | "enhanced";
|
|
4381
4386
|
/**
|
|
4382
4387
|
* Unified transcription model type with autocomplete for all providers
|
|
4383
4388
|
*
|
|
4384
4389
|
* Includes all known models from:
|
|
4385
4390
|
* - Deepgram: nova-3, nova-2, enhanced, base, whisper, etc.
|
|
4391
|
+
* - AssemblyAI: best, slam-1, universal
|
|
4386
4392
|
* - Gladia: solaria-1
|
|
4393
|
+
* - Speechmatics: standard, enhanced
|
|
4387
4394
|
*
|
|
4388
4395
|
* Also accepts any string for future/custom models.
|
|
4389
4396
|
*/
|
|
4390
|
-
type TranscriptionModel = ListenV1ModelParameter | StreamingSupportedModels;
|
|
4397
|
+
type TranscriptionModel = ListenV1ModelParameter | StreamingSupportedModels | SpeechModel | SpeechmaticsOperatingPoint;
|
|
4391
4398
|
/**
|
|
4392
4399
|
* Supported transcription providers
|
|
4393
4400
|
*/
|
|
@@ -4445,6 +4452,18 @@ type AudioInput = {
|
|
|
4445
4452
|
* Common transcription options across all providers
|
|
4446
4453
|
*/
|
|
4447
4454
|
interface TranscribeOptions {
|
|
4455
|
+
/**
|
|
4456
|
+
* Model to use for transcription (provider-specific)
|
|
4457
|
+
*
|
|
4458
|
+
* Type-safe model selection derived from OpenAPI specs:
|
|
4459
|
+
* - Deepgram: 'nova-3', 'nova-2', 'enhanced', 'base', etc.
|
|
4460
|
+
* - AssemblyAI: 'best', 'slam-1', 'universal'
|
|
4461
|
+
* - Speechmatics: 'standard', 'enhanced' (operating point)
|
|
4462
|
+
* - Gladia: 'solaria-1' (streaming only)
|
|
4463
|
+
*
|
|
4464
|
+
* @see TranscriptionModel for full list of available models
|
|
4465
|
+
*/
|
|
4466
|
+
model?: TranscriptionModel;
|
|
4448
4467
|
/** Language code (e.g., 'en', 'en-US', 'es') */
|
|
4449
4468
|
language?: string;
|
|
4450
4469
|
/** Enable automatic language detection */
|
|
@@ -5734,8 +5753,33 @@ declare class GladiaAdapter extends BaseAdapter {
|
|
|
5734
5753
|
*/
|
|
5735
5754
|
private extractUtterances;
|
|
5736
5755
|
/**
|
|
5737
|
-
*
|
|
5756
|
+
* Delete a transcription job and its associated data
|
|
5757
|
+
*
|
|
5758
|
+
* Removes the transcription data from Gladia's servers. This action is
|
|
5759
|
+
* irreversible. Supports both pre-recorded and streaming job IDs.
|
|
5760
|
+
*
|
|
5761
|
+
* @param transcriptId - The ID of the transcript/job to delete
|
|
5762
|
+
* @param jobType - Type of job: 'pre-recorded' or 'streaming' (defaults to 'pre-recorded')
|
|
5763
|
+
* @returns Promise with success status
|
|
5764
|
+
*
|
|
5765
|
+
* @example Delete a pre-recorded transcript
|
|
5766
|
+
* ```typescript
|
|
5767
|
+
* const result = await adapter.deleteTranscript('abc123');
|
|
5768
|
+
* if (result.success) {
|
|
5769
|
+
* console.log('Transcript deleted successfully');
|
|
5770
|
+
* }
|
|
5771
|
+
* ```
|
|
5772
|
+
*
|
|
5773
|
+
* @example Delete a streaming job
|
|
5774
|
+
* ```typescript
|
|
5775
|
+
* const result = await adapter.deleteTranscript('stream-456', 'streaming');
|
|
5776
|
+
* ```
|
|
5777
|
+
*
|
|
5778
|
+
* @see https://docs.gladia.io/
|
|
5738
5779
|
*/
|
|
5780
|
+
deleteTranscript(transcriptId: string, jobType?: "pre-recorded" | "streaming"): Promise<{
|
|
5781
|
+
success: boolean;
|
|
5782
|
+
}>;
|
|
5739
5783
|
/**
|
|
5740
5784
|
* Stream audio for real-time transcription
|
|
5741
5785
|
*
|
|
@@ -5924,6 +5968,29 @@ declare class AssemblyAIAdapter extends BaseAdapter {
|
|
|
5924
5968
|
* Get transcription result by ID
|
|
5925
5969
|
*/
|
|
5926
5970
|
getTranscript(transcriptId: string): Promise<UnifiedTranscriptResponse>;
|
|
5971
|
+
/**
|
|
5972
|
+
* Delete a transcription and its associated data
|
|
5973
|
+
*
|
|
5974
|
+
* Removes the transcription data from AssemblyAI's servers. This action
|
|
5975
|
+
* is irreversible. The transcript will be marked as deleted and its
|
|
5976
|
+
* content will no longer be accessible.
|
|
5977
|
+
*
|
|
5978
|
+
* @param transcriptId - The ID of the transcript to delete
|
|
5979
|
+
* @returns Promise with success status
|
|
5980
|
+
*
|
|
5981
|
+
* @example Delete a transcript
|
|
5982
|
+
* ```typescript
|
|
5983
|
+
* const result = await adapter.deleteTranscript('abc123');
|
|
5984
|
+
* if (result.success) {
|
|
5985
|
+
* console.log('Transcript deleted successfully');
|
|
5986
|
+
* }
|
|
5987
|
+
* ```
|
|
5988
|
+
*
|
|
5989
|
+
* @see https://www.assemblyai.com/docs/api-reference/transcripts/delete
|
|
5990
|
+
*/
|
|
5991
|
+
deleteTranscript(transcriptId: string): Promise<{
|
|
5992
|
+
success: boolean;
|
|
5993
|
+
}>;
|
|
5927
5994
|
/**
|
|
5928
5995
|
* Build AssemblyAI transcription request from unified options
|
|
5929
5996
|
*/
|
|
@@ -6294,6 +6361,27 @@ declare class AzureSTTAdapter extends BaseAdapter {
|
|
|
6294
6361
|
* @returns Transcription response with status and results
|
|
6295
6362
|
*/
|
|
6296
6363
|
getTranscript(transcriptId: string): Promise<UnifiedTranscriptResponse>;
|
|
6364
|
+
/**
|
|
6365
|
+
* Delete a transcription and its associated data
|
|
6366
|
+
*
|
|
6367
|
+
* Removes the transcription from Azure's servers. This action is irreversible.
|
|
6368
|
+
*
|
|
6369
|
+
* @param transcriptId - The ID of the transcription to delete
|
|
6370
|
+
* @returns Promise with success status
|
|
6371
|
+
*
|
|
6372
|
+
* @example Delete a transcription
|
|
6373
|
+
* ```typescript
|
|
6374
|
+
* const result = await adapter.deleteTranscript('abc123-def456');
|
|
6375
|
+
* if (result.success) {
|
|
6376
|
+
* console.log('Transcription deleted successfully');
|
|
6377
|
+
* }
|
|
6378
|
+
* ```
|
|
6379
|
+
*
|
|
6380
|
+
* @see https://learn.microsoft.com/azure/cognitive-services/speech-service/batch-transcription
|
|
6381
|
+
*/
|
|
6382
|
+
deleteTranscript(transcriptId: string): Promise<{
|
|
6383
|
+
success: boolean;
|
|
6384
|
+
}>;
|
|
6297
6385
|
/**
|
|
6298
6386
|
* Build Azure-specific transcription properties
|
|
6299
6387
|
*/
|
|
@@ -6563,6 +6651,34 @@ declare class SpeechmaticsAdapter extends BaseAdapter {
|
|
|
6563
6651
|
* @returns Transcription response with status and results
|
|
6564
6652
|
*/
|
|
6565
6653
|
getTranscript(transcriptId: string): Promise<UnifiedTranscriptResponse>;
|
|
6654
|
+
/**
|
|
6655
|
+
* Delete a transcription job and its associated data
|
|
6656
|
+
*
|
|
6657
|
+
* Removes the job and all associated resources from Speechmatics' servers.
|
|
6658
|
+
* This action is irreversible.
|
|
6659
|
+
*
|
|
6660
|
+
* @param transcriptId - The job ID to delete
|
|
6661
|
+
* @param force - Force delete even if job is still running (default: false)
|
|
6662
|
+
* @returns Promise with success status
|
|
6663
|
+
*
|
|
6664
|
+
* @example Delete a completed job
|
|
6665
|
+
* ```typescript
|
|
6666
|
+
* const result = await adapter.deleteTranscript('job-abc123');
|
|
6667
|
+
* if (result.success) {
|
|
6668
|
+
* console.log('Job deleted successfully');
|
|
6669
|
+
* }
|
|
6670
|
+
* ```
|
|
6671
|
+
*
|
|
6672
|
+
* @example Force delete a running job
|
|
6673
|
+
* ```typescript
|
|
6674
|
+
* const result = await adapter.deleteTranscript('job-abc123', true);
|
|
6675
|
+
* ```
|
|
6676
|
+
*
|
|
6677
|
+
* @see https://docs.speechmatics.com/
|
|
6678
|
+
*/
|
|
6679
|
+
deleteTranscript(transcriptId: string, force?: boolean): Promise<{
|
|
6680
|
+
success: boolean;
|
|
6681
|
+
}>;
|
|
6566
6682
|
/**
|
|
6567
6683
|
* Normalize Speechmatics status to unified status
|
|
6568
6684
|
*/
|
|
@@ -12593,4 +12709,4 @@ declare namespace index {
|
|
|
12593
12709
|
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 SentimentAnalysisResult$1 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 };
|
|
12594
12710
|
}
|
|
12595
12711
|
|
|
12596
|
-
export { AssemblyAIAdapter, type AssemblyAIStreamingOptions, index as AssemblyAITypes, AssemblyAIWebhookHandler, type AudioChunk, type AudioInput, AudioResponseFormat, AudioTranscriptionModel, AzureSTTAdapter, AzureWebhookHandler, BaseAdapter, BaseWebhookHandler, type BatchOnlyProvider, DeepgramAdapter, type DeepgramStreamingOptions, DeepgramWebhookHandler, GladiaAdapter, type GladiaStreamingOptions, index$1 as GladiaTypes, GladiaWebhookHandler, ListenV1EncodingParameter, type ListenV1LanguageParameter, type ListenV1ModelParameter, type ListenV1VersionParameter, OpenAIWhisperAdapter, type ProviderCapabilities, type ProviderConfig, type ProviderRawResponseMap, type ProviderStreamingOptions, type SessionStatus, SpeakV1ContainerParameter, SpeakV1EncodingParameter, SpeakV1SampleRateParameter, type Speaker, SpeechmaticsAdapter, SpeechmaticsWebhookHandler, type StreamEvent, type StreamEventType, type StreamingCallbacks, type StreamingOptions, type StreamingOptionsForProvider, type StreamingProvider, type StreamingSession, StreamingSupportedBitDepthEnum, StreamingSupportedEncodingEnum, StreamingSupportedSampleRateEnum, type TranscribeOptions, type TranscribeStreamParams, type TranscriptionAdapter, type TranscriptionModel, 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 };
|
|
12712
|
+
export { AssemblyAIAdapter, type AssemblyAIStreamingOptions, index as AssemblyAITypes, AssemblyAIWebhookHandler, type AudioChunk, type AudioInput, AudioResponseFormat, AudioTranscriptionModel, AzureSTTAdapter, AzureWebhookHandler, BaseAdapter, BaseWebhookHandler, type BatchOnlyProvider, DeepgramAdapter, type DeepgramStreamingOptions, DeepgramWebhookHandler, GladiaAdapter, type GladiaStreamingOptions, index$1 as GladiaTypes, GladiaWebhookHandler, ListenV1EncodingParameter, type ListenV1LanguageParameter, type ListenV1ModelParameter, type ListenV1VersionParameter, OpenAIWhisperAdapter, type ProviderCapabilities, type ProviderConfig, type ProviderRawResponseMap, type ProviderStreamingOptions, type SessionStatus, SpeakV1ContainerParameter, SpeakV1EncodingParameter, SpeakV1SampleRateParameter, type Speaker, SpeechmaticsAdapter, type SpeechmaticsOperatingPoint, SpeechmaticsWebhookHandler, type StreamEvent, type StreamEventType, type StreamingCallbacks, type StreamingOptions, type StreamingOptionsForProvider, type StreamingProvider, type StreamingSession, StreamingSupportedBitDepthEnum, StreamingSupportedEncodingEnum, StreamingSupportedSampleRateEnum, type TranscribeOptions, type TranscribeStreamParams, type TranscriptionAdapter, type TranscriptionModel, 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
|
@@ -4378,16 +4378,23 @@ declare const StreamingSupportedModels: {
|
|
|
4378
4378
|
* These types provide a provider-agnostic interface for transcription services
|
|
4379
4379
|
*/
|
|
4380
4380
|
|
|
4381
|
+
/**
|
|
4382
|
+
* Speechmatics operating point (model) type
|
|
4383
|
+
* Manually defined as Speechmatics OpenAPI spec doesn't export this cleanly
|
|
4384
|
+
*/
|
|
4385
|
+
type SpeechmaticsOperatingPoint = "standard" | "enhanced";
|
|
4381
4386
|
/**
|
|
4382
4387
|
* Unified transcription model type with autocomplete for all providers
|
|
4383
4388
|
*
|
|
4384
4389
|
* Includes all known models from:
|
|
4385
4390
|
* - Deepgram: nova-3, nova-2, enhanced, base, whisper, etc.
|
|
4391
|
+
* - AssemblyAI: best, slam-1, universal
|
|
4386
4392
|
* - Gladia: solaria-1
|
|
4393
|
+
* - Speechmatics: standard, enhanced
|
|
4387
4394
|
*
|
|
4388
4395
|
* Also accepts any string for future/custom models.
|
|
4389
4396
|
*/
|
|
4390
|
-
type TranscriptionModel = ListenV1ModelParameter | StreamingSupportedModels;
|
|
4397
|
+
type TranscriptionModel = ListenV1ModelParameter | StreamingSupportedModels | SpeechModel | SpeechmaticsOperatingPoint;
|
|
4391
4398
|
/**
|
|
4392
4399
|
* Supported transcription providers
|
|
4393
4400
|
*/
|
|
@@ -4445,6 +4452,18 @@ type AudioInput = {
|
|
|
4445
4452
|
* Common transcription options across all providers
|
|
4446
4453
|
*/
|
|
4447
4454
|
interface TranscribeOptions {
|
|
4455
|
+
/**
|
|
4456
|
+
* Model to use for transcription (provider-specific)
|
|
4457
|
+
*
|
|
4458
|
+
* Type-safe model selection derived from OpenAPI specs:
|
|
4459
|
+
* - Deepgram: 'nova-3', 'nova-2', 'enhanced', 'base', etc.
|
|
4460
|
+
* - AssemblyAI: 'best', 'slam-1', 'universal'
|
|
4461
|
+
* - Speechmatics: 'standard', 'enhanced' (operating point)
|
|
4462
|
+
* - Gladia: 'solaria-1' (streaming only)
|
|
4463
|
+
*
|
|
4464
|
+
* @see TranscriptionModel for full list of available models
|
|
4465
|
+
*/
|
|
4466
|
+
model?: TranscriptionModel;
|
|
4448
4467
|
/** Language code (e.g., 'en', 'en-US', 'es') */
|
|
4449
4468
|
language?: string;
|
|
4450
4469
|
/** Enable automatic language detection */
|
|
@@ -5734,8 +5753,33 @@ declare class GladiaAdapter extends BaseAdapter {
|
|
|
5734
5753
|
*/
|
|
5735
5754
|
private extractUtterances;
|
|
5736
5755
|
/**
|
|
5737
|
-
*
|
|
5756
|
+
* Delete a transcription job and its associated data
|
|
5757
|
+
*
|
|
5758
|
+
* Removes the transcription data from Gladia's servers. This action is
|
|
5759
|
+
* irreversible. Supports both pre-recorded and streaming job IDs.
|
|
5760
|
+
*
|
|
5761
|
+
* @param transcriptId - The ID of the transcript/job to delete
|
|
5762
|
+
* @param jobType - Type of job: 'pre-recorded' or 'streaming' (defaults to 'pre-recorded')
|
|
5763
|
+
* @returns Promise with success status
|
|
5764
|
+
*
|
|
5765
|
+
* @example Delete a pre-recorded transcript
|
|
5766
|
+
* ```typescript
|
|
5767
|
+
* const result = await adapter.deleteTranscript('abc123');
|
|
5768
|
+
* if (result.success) {
|
|
5769
|
+
* console.log('Transcript deleted successfully');
|
|
5770
|
+
* }
|
|
5771
|
+
* ```
|
|
5772
|
+
*
|
|
5773
|
+
* @example Delete a streaming job
|
|
5774
|
+
* ```typescript
|
|
5775
|
+
* const result = await adapter.deleteTranscript('stream-456', 'streaming');
|
|
5776
|
+
* ```
|
|
5777
|
+
*
|
|
5778
|
+
* @see https://docs.gladia.io/
|
|
5738
5779
|
*/
|
|
5780
|
+
deleteTranscript(transcriptId: string, jobType?: "pre-recorded" | "streaming"): Promise<{
|
|
5781
|
+
success: boolean;
|
|
5782
|
+
}>;
|
|
5739
5783
|
/**
|
|
5740
5784
|
* Stream audio for real-time transcription
|
|
5741
5785
|
*
|
|
@@ -5924,6 +5968,29 @@ declare class AssemblyAIAdapter extends BaseAdapter {
|
|
|
5924
5968
|
* Get transcription result by ID
|
|
5925
5969
|
*/
|
|
5926
5970
|
getTranscript(transcriptId: string): Promise<UnifiedTranscriptResponse>;
|
|
5971
|
+
/**
|
|
5972
|
+
* Delete a transcription and its associated data
|
|
5973
|
+
*
|
|
5974
|
+
* Removes the transcription data from AssemblyAI's servers. This action
|
|
5975
|
+
* is irreversible. The transcript will be marked as deleted and its
|
|
5976
|
+
* content will no longer be accessible.
|
|
5977
|
+
*
|
|
5978
|
+
* @param transcriptId - The ID of the transcript to delete
|
|
5979
|
+
* @returns Promise with success status
|
|
5980
|
+
*
|
|
5981
|
+
* @example Delete a transcript
|
|
5982
|
+
* ```typescript
|
|
5983
|
+
* const result = await adapter.deleteTranscript('abc123');
|
|
5984
|
+
* if (result.success) {
|
|
5985
|
+
* console.log('Transcript deleted successfully');
|
|
5986
|
+
* }
|
|
5987
|
+
* ```
|
|
5988
|
+
*
|
|
5989
|
+
* @see https://www.assemblyai.com/docs/api-reference/transcripts/delete
|
|
5990
|
+
*/
|
|
5991
|
+
deleteTranscript(transcriptId: string): Promise<{
|
|
5992
|
+
success: boolean;
|
|
5993
|
+
}>;
|
|
5927
5994
|
/**
|
|
5928
5995
|
* Build AssemblyAI transcription request from unified options
|
|
5929
5996
|
*/
|
|
@@ -6294,6 +6361,27 @@ declare class AzureSTTAdapter extends BaseAdapter {
|
|
|
6294
6361
|
* @returns Transcription response with status and results
|
|
6295
6362
|
*/
|
|
6296
6363
|
getTranscript(transcriptId: string): Promise<UnifiedTranscriptResponse>;
|
|
6364
|
+
/**
|
|
6365
|
+
* Delete a transcription and its associated data
|
|
6366
|
+
*
|
|
6367
|
+
* Removes the transcription from Azure's servers. This action is irreversible.
|
|
6368
|
+
*
|
|
6369
|
+
* @param transcriptId - The ID of the transcription to delete
|
|
6370
|
+
* @returns Promise with success status
|
|
6371
|
+
*
|
|
6372
|
+
* @example Delete a transcription
|
|
6373
|
+
* ```typescript
|
|
6374
|
+
* const result = await adapter.deleteTranscript('abc123-def456');
|
|
6375
|
+
* if (result.success) {
|
|
6376
|
+
* console.log('Transcription deleted successfully');
|
|
6377
|
+
* }
|
|
6378
|
+
* ```
|
|
6379
|
+
*
|
|
6380
|
+
* @see https://learn.microsoft.com/azure/cognitive-services/speech-service/batch-transcription
|
|
6381
|
+
*/
|
|
6382
|
+
deleteTranscript(transcriptId: string): Promise<{
|
|
6383
|
+
success: boolean;
|
|
6384
|
+
}>;
|
|
6297
6385
|
/**
|
|
6298
6386
|
* Build Azure-specific transcription properties
|
|
6299
6387
|
*/
|
|
@@ -6563,6 +6651,34 @@ declare class SpeechmaticsAdapter extends BaseAdapter {
|
|
|
6563
6651
|
* @returns Transcription response with status and results
|
|
6564
6652
|
*/
|
|
6565
6653
|
getTranscript(transcriptId: string): Promise<UnifiedTranscriptResponse>;
|
|
6654
|
+
/**
|
|
6655
|
+
* Delete a transcription job and its associated data
|
|
6656
|
+
*
|
|
6657
|
+
* Removes the job and all associated resources from Speechmatics' servers.
|
|
6658
|
+
* This action is irreversible.
|
|
6659
|
+
*
|
|
6660
|
+
* @param transcriptId - The job ID to delete
|
|
6661
|
+
* @param force - Force delete even if job is still running (default: false)
|
|
6662
|
+
* @returns Promise with success status
|
|
6663
|
+
*
|
|
6664
|
+
* @example Delete a completed job
|
|
6665
|
+
* ```typescript
|
|
6666
|
+
* const result = await adapter.deleteTranscript('job-abc123');
|
|
6667
|
+
* if (result.success) {
|
|
6668
|
+
* console.log('Job deleted successfully');
|
|
6669
|
+
* }
|
|
6670
|
+
* ```
|
|
6671
|
+
*
|
|
6672
|
+
* @example Force delete a running job
|
|
6673
|
+
* ```typescript
|
|
6674
|
+
* const result = await adapter.deleteTranscript('job-abc123', true);
|
|
6675
|
+
* ```
|
|
6676
|
+
*
|
|
6677
|
+
* @see https://docs.speechmatics.com/
|
|
6678
|
+
*/
|
|
6679
|
+
deleteTranscript(transcriptId: string, force?: boolean): Promise<{
|
|
6680
|
+
success: boolean;
|
|
6681
|
+
}>;
|
|
6566
6682
|
/**
|
|
6567
6683
|
* Normalize Speechmatics status to unified status
|
|
6568
6684
|
*/
|
|
@@ -12593,4 +12709,4 @@ declare namespace index {
|
|
|
12593
12709
|
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 SentimentAnalysisResult$1 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 };
|
|
12594
12710
|
}
|
|
12595
12711
|
|
|
12596
|
-
export { AssemblyAIAdapter, type AssemblyAIStreamingOptions, index as AssemblyAITypes, AssemblyAIWebhookHandler, type AudioChunk, type AudioInput, AudioResponseFormat, AudioTranscriptionModel, AzureSTTAdapter, AzureWebhookHandler, BaseAdapter, BaseWebhookHandler, type BatchOnlyProvider, DeepgramAdapter, type DeepgramStreamingOptions, DeepgramWebhookHandler, GladiaAdapter, type GladiaStreamingOptions, index$1 as GladiaTypes, GladiaWebhookHandler, ListenV1EncodingParameter, type ListenV1LanguageParameter, type ListenV1ModelParameter, type ListenV1VersionParameter, OpenAIWhisperAdapter, type ProviderCapabilities, type ProviderConfig, type ProviderRawResponseMap, type ProviderStreamingOptions, type SessionStatus, SpeakV1ContainerParameter, SpeakV1EncodingParameter, SpeakV1SampleRateParameter, type Speaker, SpeechmaticsAdapter, SpeechmaticsWebhookHandler, type StreamEvent, type StreamEventType, type StreamingCallbacks, type StreamingOptions, type StreamingOptionsForProvider, type StreamingProvider, type StreamingSession, StreamingSupportedBitDepthEnum, StreamingSupportedEncodingEnum, StreamingSupportedSampleRateEnum, type TranscribeOptions, type TranscribeStreamParams, type TranscriptionAdapter, type TranscriptionModel, 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 };
|
|
12712
|
+
export { AssemblyAIAdapter, type AssemblyAIStreamingOptions, index as AssemblyAITypes, AssemblyAIWebhookHandler, type AudioChunk, type AudioInput, AudioResponseFormat, AudioTranscriptionModel, AzureSTTAdapter, AzureWebhookHandler, BaseAdapter, BaseWebhookHandler, type BatchOnlyProvider, DeepgramAdapter, type DeepgramStreamingOptions, DeepgramWebhookHandler, GladiaAdapter, type GladiaStreamingOptions, index$1 as GladiaTypes, GladiaWebhookHandler, ListenV1EncodingParameter, type ListenV1LanguageParameter, type ListenV1ModelParameter, type ListenV1VersionParameter, OpenAIWhisperAdapter, type ProviderCapabilities, type ProviderConfig, type ProviderRawResponseMap, type ProviderStreamingOptions, type SessionStatus, SpeakV1ContainerParameter, SpeakV1EncodingParameter, SpeakV1SampleRateParameter, type Speaker, SpeechmaticsAdapter, type SpeechmaticsOperatingPoint, SpeechmaticsWebhookHandler, type StreamEvent, type StreamEventType, type StreamingCallbacks, type StreamingOptions, type StreamingOptionsForProvider, type StreamingProvider, type StreamingSession, StreamingSupportedBitDepthEnum, StreamingSupportedEncodingEnum, StreamingSupportedSampleRateEnum, type TranscribeOptions, type TranscribeStreamParams, type TranscriptionAdapter, type TranscriptionModel, 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.js
CHANGED
|
@@ -1757,12 +1757,18 @@ var preRecordedControllerInitPreRecordedJobV2 = (initTranscriptionRequest, optio
|
|
|
1757
1757
|
var preRecordedControllerGetPreRecordedJobV2 = (id, options) => {
|
|
1758
1758
|
return import_axios.default.get(`/v2/pre-recorded/${id}`, options);
|
|
1759
1759
|
};
|
|
1760
|
+
var preRecordedControllerDeletePreRecordedJobV2 = (id, options) => {
|
|
1761
|
+
return import_axios.default.delete(`/v2/pre-recorded/${id}`, options);
|
|
1762
|
+
};
|
|
1760
1763
|
var streamingControllerInitStreamingSessionV2 = (streamingRequest, params, options) => {
|
|
1761
1764
|
return import_axios.default.post("/v2/live", streamingRequest, {
|
|
1762
1765
|
...options,
|
|
1763
1766
|
params: { ...params, ...options?.params }
|
|
1764
1767
|
});
|
|
1765
1768
|
};
|
|
1769
|
+
var streamingControllerDeleteStreamingJobV2 = (id, options) => {
|
|
1770
|
+
return import_axios.default.delete(`/v2/live/${id}`, options);
|
|
1771
|
+
};
|
|
1766
1772
|
|
|
1767
1773
|
// src/adapters/gladia-adapter.ts
|
|
1768
1774
|
var GladiaAdapter = class extends BaseAdapter {
|
|
@@ -2050,8 +2056,47 @@ var GladiaAdapter = class extends BaseAdapter {
|
|
|
2050
2056
|
}));
|
|
2051
2057
|
}
|
|
2052
2058
|
/**
|
|
2053
|
-
*
|
|
2059
|
+
* Delete a transcription job and its associated data
|
|
2060
|
+
*
|
|
2061
|
+
* Removes the transcription data from Gladia's servers. This action is
|
|
2062
|
+
* irreversible. Supports both pre-recorded and streaming job IDs.
|
|
2063
|
+
*
|
|
2064
|
+
* @param transcriptId - The ID of the transcript/job to delete
|
|
2065
|
+
* @param jobType - Type of job: 'pre-recorded' or 'streaming' (defaults to 'pre-recorded')
|
|
2066
|
+
* @returns Promise with success status
|
|
2067
|
+
*
|
|
2068
|
+
* @example Delete a pre-recorded transcript
|
|
2069
|
+
* ```typescript
|
|
2070
|
+
* const result = await adapter.deleteTranscript('abc123');
|
|
2071
|
+
* if (result.success) {
|
|
2072
|
+
* console.log('Transcript deleted successfully');
|
|
2073
|
+
* }
|
|
2074
|
+
* ```
|
|
2075
|
+
*
|
|
2076
|
+
* @example Delete a streaming job
|
|
2077
|
+
* ```typescript
|
|
2078
|
+
* const result = await adapter.deleteTranscript('stream-456', 'streaming');
|
|
2079
|
+
* ```
|
|
2080
|
+
*
|
|
2081
|
+
* @see https://docs.gladia.io/
|
|
2054
2082
|
*/
|
|
2083
|
+
async deleteTranscript(transcriptId, jobType = "pre-recorded") {
|
|
2084
|
+
this.validateConfig();
|
|
2085
|
+
try {
|
|
2086
|
+
if (jobType === "streaming") {
|
|
2087
|
+
await streamingControllerDeleteStreamingJobV2(transcriptId, this.getAxiosConfig());
|
|
2088
|
+
} else {
|
|
2089
|
+
await preRecordedControllerDeletePreRecordedJobV2(transcriptId, this.getAxiosConfig());
|
|
2090
|
+
}
|
|
2091
|
+
return { success: true };
|
|
2092
|
+
} catch (error) {
|
|
2093
|
+
const err = error;
|
|
2094
|
+
if (err.response?.status === 404) {
|
|
2095
|
+
return { success: true };
|
|
2096
|
+
}
|
|
2097
|
+
throw error;
|
|
2098
|
+
}
|
|
2099
|
+
}
|
|
2055
2100
|
/**
|
|
2056
2101
|
* Stream audio for real-time transcription
|
|
2057
2102
|
*
|
|
@@ -2539,6 +2584,9 @@ var createTranscript = (transcriptParams, options) => {
|
|
|
2539
2584
|
var getTranscript = (transcriptId, options) => {
|
|
2540
2585
|
return import_axios2.default.get(`/v2/transcript/${transcriptId}`, options);
|
|
2541
2586
|
};
|
|
2587
|
+
var deleteTranscript = (transcriptId, options) => {
|
|
2588
|
+
return import_axios2.default.delete(`/v2/transcript/${transcriptId}`, options);
|
|
2589
|
+
};
|
|
2542
2590
|
|
|
2543
2591
|
// src/adapters/assemblyai-adapter.ts
|
|
2544
2592
|
var AssemblyAIAdapter = class extends BaseAdapter {
|
|
@@ -2670,6 +2718,41 @@ var AssemblyAIAdapter = class extends BaseAdapter {
|
|
|
2670
2718
|
return this.createErrorResponse(error);
|
|
2671
2719
|
}
|
|
2672
2720
|
}
|
|
2721
|
+
/**
|
|
2722
|
+
* Delete a transcription and its associated data
|
|
2723
|
+
*
|
|
2724
|
+
* Removes the transcription data from AssemblyAI's servers. This action
|
|
2725
|
+
* is irreversible. The transcript will be marked as deleted and its
|
|
2726
|
+
* content will no longer be accessible.
|
|
2727
|
+
*
|
|
2728
|
+
* @param transcriptId - The ID of the transcript to delete
|
|
2729
|
+
* @returns Promise with success status
|
|
2730
|
+
*
|
|
2731
|
+
* @example Delete a transcript
|
|
2732
|
+
* ```typescript
|
|
2733
|
+
* const result = await adapter.deleteTranscript('abc123');
|
|
2734
|
+
* if (result.success) {
|
|
2735
|
+
* console.log('Transcript deleted successfully');
|
|
2736
|
+
* }
|
|
2737
|
+
* ```
|
|
2738
|
+
*
|
|
2739
|
+
* @see https://www.assemblyai.com/docs/api-reference/transcripts/delete
|
|
2740
|
+
*/
|
|
2741
|
+
async deleteTranscript(transcriptId) {
|
|
2742
|
+
this.validateConfig();
|
|
2743
|
+
try {
|
|
2744
|
+
const response = await deleteTranscript(transcriptId, this.getAxiosConfig());
|
|
2745
|
+
return {
|
|
2746
|
+
success: response.data.status === "completed" || response.status === 200
|
|
2747
|
+
};
|
|
2748
|
+
} catch (error) {
|
|
2749
|
+
const err = error;
|
|
2750
|
+
if (err.response?.status === 404) {
|
|
2751
|
+
return { success: true };
|
|
2752
|
+
}
|
|
2753
|
+
throw error;
|
|
2754
|
+
}
|
|
2755
|
+
}
|
|
2673
2756
|
/**
|
|
2674
2757
|
* Build AssemblyAI transcription request from unified options
|
|
2675
2758
|
*/
|
|
@@ -2686,6 +2769,9 @@ var AssemblyAIAdapter = class extends BaseAdapter {
|
|
|
2686
2769
|
audio_url: audioUrl
|
|
2687
2770
|
};
|
|
2688
2771
|
if (options) {
|
|
2772
|
+
if (options.model) {
|
|
2773
|
+
request.speech_model = options.model;
|
|
2774
|
+
}
|
|
2689
2775
|
if (options.language) {
|
|
2690
2776
|
const languageCode = options.language.includes("_") ? options.language : `${options.language}_us`;
|
|
2691
2777
|
request.language_code = languageCode;
|
|
@@ -3176,6 +3262,9 @@ var DeepgramAdapter = class extends BaseAdapter {
|
|
|
3176
3262
|
if (!options) {
|
|
3177
3263
|
return params;
|
|
3178
3264
|
}
|
|
3265
|
+
if (options.model) {
|
|
3266
|
+
params.model = options.model;
|
|
3267
|
+
}
|
|
3179
3268
|
if (options.language) {
|
|
3180
3269
|
params.language = options.language;
|
|
3181
3270
|
}
|
|
@@ -3510,6 +3599,9 @@ var transcriptionsCreate = (transcription, options) => {
|
|
|
3510
3599
|
var transcriptionsGet = (id, options) => {
|
|
3511
3600
|
return import_axios4.default.get(`/transcriptions/${id}`, options);
|
|
3512
3601
|
};
|
|
3602
|
+
var transcriptionsDelete = (id, options) => {
|
|
3603
|
+
return import_axios4.default.delete(`/transcriptions/${id}`, options);
|
|
3604
|
+
};
|
|
3513
3605
|
var transcriptionsListFiles = (id, params, options) => {
|
|
3514
3606
|
return import_axios4.default.get(`/transcriptions/${id}/files`, {
|
|
3515
3607
|
...options,
|
|
@@ -3665,6 +3757,37 @@ var AzureSTTAdapter = class extends BaseAdapter {
|
|
|
3665
3757
|
return this.createErrorResponse(error);
|
|
3666
3758
|
}
|
|
3667
3759
|
}
|
|
3760
|
+
/**
|
|
3761
|
+
* Delete a transcription and its associated data
|
|
3762
|
+
*
|
|
3763
|
+
* Removes the transcription from Azure's servers. This action is irreversible.
|
|
3764
|
+
*
|
|
3765
|
+
* @param transcriptId - The ID of the transcription to delete
|
|
3766
|
+
* @returns Promise with success status
|
|
3767
|
+
*
|
|
3768
|
+
* @example Delete a transcription
|
|
3769
|
+
* ```typescript
|
|
3770
|
+
* const result = await adapter.deleteTranscript('abc123-def456');
|
|
3771
|
+
* if (result.success) {
|
|
3772
|
+
* console.log('Transcription deleted successfully');
|
|
3773
|
+
* }
|
|
3774
|
+
* ```
|
|
3775
|
+
*
|
|
3776
|
+
* @see https://learn.microsoft.com/azure/cognitive-services/speech-service/batch-transcription
|
|
3777
|
+
*/
|
|
3778
|
+
async deleteTranscript(transcriptId) {
|
|
3779
|
+
this.validateConfig();
|
|
3780
|
+
try {
|
|
3781
|
+
await transcriptionsDelete(transcriptId, this.getAxiosConfig());
|
|
3782
|
+
return { success: true };
|
|
3783
|
+
} catch (error) {
|
|
3784
|
+
const err = error;
|
|
3785
|
+
if (err.response?.status === 404) {
|
|
3786
|
+
return { success: true };
|
|
3787
|
+
}
|
|
3788
|
+
throw error;
|
|
3789
|
+
}
|
|
3790
|
+
}
|
|
3668
3791
|
/**
|
|
3669
3792
|
* Build Azure-specific transcription properties
|
|
3670
3793
|
*/
|
|
@@ -4076,11 +4199,12 @@ var SpeechmaticsAdapter = class extends BaseAdapter {
|
|
|
4076
4199
|
async transcribe(audio, options) {
|
|
4077
4200
|
this.validateConfig();
|
|
4078
4201
|
try {
|
|
4202
|
+
const operatingPoint = options?.model || options?.metadata?.operating_point || "standard";
|
|
4079
4203
|
const jobConfig = {
|
|
4080
4204
|
type: "transcription",
|
|
4081
4205
|
transcription_config: {
|
|
4082
4206
|
language: options?.language || "en",
|
|
4083
|
-
operating_point:
|
|
4207
|
+
operating_point: operatingPoint
|
|
4084
4208
|
}
|
|
4085
4209
|
};
|
|
4086
4210
|
if (options?.diarization) {
|
|
@@ -4189,6 +4313,46 @@ var SpeechmaticsAdapter = class extends BaseAdapter {
|
|
|
4189
4313
|
return this.createErrorResponse(error);
|
|
4190
4314
|
}
|
|
4191
4315
|
}
|
|
4316
|
+
/**
|
|
4317
|
+
* Delete a transcription job and its associated data
|
|
4318
|
+
*
|
|
4319
|
+
* Removes the job and all associated resources from Speechmatics' servers.
|
|
4320
|
+
* This action is irreversible.
|
|
4321
|
+
*
|
|
4322
|
+
* @param transcriptId - The job ID to delete
|
|
4323
|
+
* @param force - Force delete even if job is still running (default: false)
|
|
4324
|
+
* @returns Promise with success status
|
|
4325
|
+
*
|
|
4326
|
+
* @example Delete a completed job
|
|
4327
|
+
* ```typescript
|
|
4328
|
+
* const result = await adapter.deleteTranscript('job-abc123');
|
|
4329
|
+
* if (result.success) {
|
|
4330
|
+
* console.log('Job deleted successfully');
|
|
4331
|
+
* }
|
|
4332
|
+
* ```
|
|
4333
|
+
*
|
|
4334
|
+
* @example Force delete a running job
|
|
4335
|
+
* ```typescript
|
|
4336
|
+
* const result = await adapter.deleteTranscript('job-abc123', true);
|
|
4337
|
+
* ```
|
|
4338
|
+
*
|
|
4339
|
+
* @see https://docs.speechmatics.com/
|
|
4340
|
+
*/
|
|
4341
|
+
async deleteTranscript(transcriptId, force = false) {
|
|
4342
|
+
this.validateConfig();
|
|
4343
|
+
try {
|
|
4344
|
+
await this.client.delete(`/jobs/${transcriptId}`, {
|
|
4345
|
+
params: force ? { force: true } : void 0
|
|
4346
|
+
});
|
|
4347
|
+
return { success: true };
|
|
4348
|
+
} catch (error) {
|
|
4349
|
+
const err = error;
|
|
4350
|
+
if (err.response?.status === 404) {
|
|
4351
|
+
return { success: true };
|
|
4352
|
+
}
|
|
4353
|
+
throw error;
|
|
4354
|
+
}
|
|
4355
|
+
}
|
|
4192
4356
|
/**
|
|
4193
4357
|
* Normalize Speechmatics status to unified status
|
|
4194
4358
|
*/
|