import { TranscriptionModelV3, ProviderV3 } from '@ai-sdk/provider'; import { FetchFunction } from '@ai-sdk/provider-utils'; import { z } from 'zod/v4'; type SonioxConfig = { provider: string; url: (options: { modelId: string; path: string; }) => string; headers: () => Record; fetch?: FetchFunction; }; type SonioxTranscriptionModelId = 'stt-async-v3' | 'stt-async-v4' | (string & {}); declare const sonioxTranscriptionProviderOptionsSchema: z.ZodObject<{ languageHints: z.ZodOptional>>; languageHintsStrict: z.ZodOptional>; enableLanguageIdentification: z.ZodOptional>; enableSpeakerDiarization: z.ZodOptional>; context: z.ZodOptional>>>>; text: z.ZodOptional>>; terms: z.ZodOptional>>>; translationTerms: z.ZodOptional>>>>; }, z.core.$strip>]>>>; clientReferenceId: z.ZodOptional>; webhookUrl: z.ZodOptional>; webhookAuthHeaderName: z.ZodOptional>; webhookAuthHeaderValue: z.ZodOptional>; translation: z.ZodOptional; targetLanguage: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"two_way">; languageA: z.ZodString; languageB: z.ZodString; }, z.core.$strip>], "type">>>; }, z.core.$strip>; type SonioxTranscriptionProviderOptions = z.infer; interface SonioxTranscriptionModelConfig extends SonioxConfig { _internal?: { currentDate?: () => Date; }; pollingIntervalMs?: number; timeoutMs?: number; } declare class SonioxTranscriptionModel implements TranscriptionModelV3 { readonly modelId: SonioxTranscriptionModelId; private readonly config; readonly specificationVersion = "v3"; private readonly POLLING_INTERVAL_MS; private readonly TIMEOUT_MS; get provider(): string; constructor(modelId: SonioxTranscriptionModelId, config: SonioxTranscriptionModelConfig); private mapContext; private mapTranslation; private buildSegments; private getLanguageFromTokens; private tryDeleteResource; doGenerate(options: Parameters[0]): Promise>>; } interface SonioxProvider extends ProviderV3 { (modelId: string, settings?: {}): { transcription: SonioxTranscriptionModel; }; /** Creates a model for transcription. */ transcription(modelId: SonioxTranscriptionModelId): TranscriptionModelV3; /** * @deprecated Use `embeddingModel` instead. */ textEmbeddingModel(modelId: string): never; } interface SonioxProviderSettings { /** API key for authenticating requests. */ apiKey?: string; /** Base URL for Soniox API requests. */ apiBaseUrl?: 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; /** Polling interval for async transcription status checks in milliseconds. */ pollingIntervalMs?: number; /** * Timeout for transcription job polling in milliseconds. * Default: 300,000 (5 minutes). */ timeoutMs?: number; } /** Create a Soniox provider instance. */ declare function createSoniox(options?: SonioxProviderSettings): SonioxProvider; /** Default Soniox provider instance. */ declare const soniox: SonioxProvider; declare const VERSION: string; export { type SonioxProvider, type SonioxProviderSettings, SonioxTranscriptionModel, type SonioxTranscriptionModelId, type SonioxTranscriptionProviderOptions, VERSION, createSoniox, soniox };