import * as _ai_sdk_provider from '@ai-sdk/provider'; import { TranscriptionModelV4, ProviderV4 } from '@ai-sdk/provider'; import { FetchFunction, WORKFLOW_SERIALIZE, WORKFLOW_DESERIALIZE } from '@ai-sdk/provider-utils'; import { z } from 'zod/v4'; type AssemblyAIConfig = { provider: string; url: (options: { modelId: string; path: string; }) => string; headers?: () => Record; fetch?: FetchFunction; generateId?: () => string; }; /** * Legacy AssemblyAI speech model, sent via the deprecated singular * `speech_model` request parameter. * * @deprecated Use `universal-3-5-pro` instead. * @see https://www.assemblyai.com/docs/pre-recorded-audio/select-the-speech-model */ type AssemblyAIDeprecatedTranscriptionModelId = 'best'; type AssemblyAITranscriptionModelId = 'universal-2' | 'universal-3-pro' | 'universal-3-5-pro' | AssemblyAIDeprecatedTranscriptionModelId | (string & {}); interface AssemblyAITranscriptionModelConfig extends AssemblyAIConfig { _internal?: { currentDate?: () => Date; }; /** * The polling interval for checking transcript status in milliseconds. */ pollingInterval?: number; } declare class AssemblyAITranscriptionModel implements TranscriptionModelV4 { readonly modelId: AssemblyAITranscriptionModelId; private readonly config; readonly specificationVersion = "v4"; private readonly POLLING_INTERVAL_MS; get provider(): string; static [WORKFLOW_SERIALIZE](model: AssemblyAITranscriptionModel): { modelId: string; config: _ai_sdk_provider.JSONObject; }; static [WORKFLOW_DESERIALIZE](options: { modelId: AssemblyAITranscriptionModelId; config: AssemblyAITranscriptionModelConfig; }): AssemblyAITranscriptionModel; constructor(modelId: AssemblyAITranscriptionModelId, config: AssemblyAITranscriptionModelConfig); private getArgs; /** * Polls the given transcript until we have a status other than `processing` or `queued`. * * @see https://www.assemblyai.com/docs/getting-started/transcribe-an-audio-file#step-33 */ private waitForCompletion; doGenerate(options: Parameters[0]): Promise>>; } interface AssemblyAIProvider extends ProviderV4 { (modelId: AssemblyAITranscriptionModelId, settings?: {}): { transcription: AssemblyAITranscriptionModel; }; /** * Creates a model for transcription. */ transcription(modelId: AssemblyAITranscriptionModelId): TranscriptionModelV4; /** * @deprecated Use `embeddingModel` instead. */ textEmbeddingModel(modelId: string): never; } interface AssemblyAIProviderSettings { /** * API key for authenticating requests. */ apiKey?: string; /** * Custom headers to include in the requests. */ headers?: Record; /** * Custom fetch implementation. You can use it as a middleware to intercept requests, * or to provide a custom fetch implementation for e.g. testing. */ fetch?: FetchFunction; } /** * Create an AssemblyAI provider instance. */ declare function createAssemblyAI(options?: AssemblyAIProviderSettings): AssemblyAIProvider; /** * Default AssemblyAI provider instance. */ declare const assemblyai: AssemblyAIProvider; declare const assemblyaiTranscriptionModelOptionsSchema: z.ZodObject<{ audioEndAt: z.ZodOptional>; audioStartFrom: z.ZodOptional>; autoChapters: z.ZodOptional>; autoHighlights: z.ZodOptional>; boostParam: z.ZodOptional>; contentSafety: z.ZodOptional>; contentSafetyConfidence: z.ZodOptional>; customSpelling: z.ZodOptional; to: z.ZodString; }, z.core.$strip>>>>; disfluencies: z.ZodOptional>; domain: z.ZodOptional>; entityDetection: z.ZodOptional>; filterProfanity: z.ZodOptional>; formatText: z.ZodOptional>; iabCategories: z.ZodOptional>; keytermsPrompt: z.ZodOptional>>; languageCode: z.ZodOptional, z.ZodString]>>>; languageConfidenceThreshold: z.ZodOptional>; languageDetection: z.ZodOptional>; languageDetectionOptions: z.ZodOptional>>; fallbackLanguage: z.ZodOptional>; codeSwitching: z.ZodOptional>; codeSwitchingConfidenceThreshold: z.ZodOptional>; }, z.core.$strip>>>; multichannel: z.ZodOptional>; prompt: z.ZodOptional>; punctuate: z.ZodOptional>; redactPii: z.ZodOptional>; redactPiiAudio: z.ZodOptional>; redactPiiAudioOptions: z.ZodOptional>; overrideAudioRedactionMethod: z.ZodOptional>>; }, z.core.$strip>>>; redactPiiAudioQuality: z.ZodOptional>; redactPiiPolicies: z.ZodOptional>>; redactPiiReturnUnredacted: z.ZodOptional>; redactPiiSub: z.ZodOptional>; redactStaticEntities: z.ZodOptional>>>; removeAudioTags: z.ZodOptional>>; sentimentAnalysis: z.ZodOptional>; speakerLabels: z.ZodOptional>; speakerOptions: z.ZodOptional>; maxSpeakersExpected: z.ZodOptional>; }, z.core.$strip>>>; speakersExpected: z.ZodOptional>; speechThreshold: z.ZodOptional>; summarization: z.ZodOptional>; summaryModel: z.ZodOptional>; summaryType: z.ZodOptional>; temperature: z.ZodOptional>; webhookAuthHeaderName: z.ZodOptional>; webhookAuthHeaderValue: z.ZodOptional>; webhookUrl: z.ZodOptional>; wordBoost: z.ZodOptional>>; }, z.core.$strip>; type AssemblyAITranscriptionModelOptions = z.infer; declare const VERSION: string; export { type AssemblyAIProvider, type AssemblyAIProviderSettings, type AssemblyAITranscriptionModelOptions, VERSION, assemblyai, createAssemblyAI };