import * as _ai_sdk_provider from '@ai-sdk/provider'; import { TranscriptionModelV4, ProviderV4, SpeechModelV4 } from '@ai-sdk/provider'; import { FetchFunction, WORKFLOW_SERIALIZE, WORKFLOW_DESERIALIZE } from '@ai-sdk/provider-utils'; import { z } from 'zod/v4'; type ElevenLabsConfig = { provider: string; url: (options: { modelId: string; path: string; }) => string; headers?: () => Record; fetch?: FetchFunction; generateId?: () => string; }; type ElevenLabsTranscriptionModelId = 'scribe_v1' | 'scribe_v1_experimental' | 'scribe_v2' | (string & {}); interface ElevenLabsTranscriptionModelConfig extends ElevenLabsConfig { _internal?: { currentDate?: () => Date; }; } declare class ElevenLabsTranscriptionModel implements TranscriptionModelV4 { readonly modelId: ElevenLabsTranscriptionModelId; private readonly config; readonly specificationVersion = "v4"; get provider(): string; static [WORKFLOW_SERIALIZE](model: ElevenLabsTranscriptionModel): { modelId: string; config: _ai_sdk_provider.JSONObject; }; static [WORKFLOW_DESERIALIZE](options: { modelId: ElevenLabsTranscriptionModelId; config: ElevenLabsTranscriptionModelConfig; }): ElevenLabsTranscriptionModel; constructor(modelId: ElevenLabsTranscriptionModelId, config: ElevenLabsTranscriptionModelConfig); private getArgs; doGenerate(options: Parameters[0]): Promise>>; } type ElevenLabsSpeechModelId = 'eleven_v3' | 'eleven_multilingual_v2' | 'eleven_flash_v2_5' | 'eleven_flash_v2' | 'eleven_turbo_v2_5' | 'eleven_turbo_v2' | 'eleven_monolingual_v1' | 'eleven_multilingual_v1' | (string & {}); type ElevenLabsSpeechVoiceId = string; interface ElevenLabsProvider extends ProviderV4 { (modelId: ElevenLabsTranscriptionModelId, settings?: {}): { transcription: ElevenLabsTranscriptionModel; }; /** * Creates a model for transcription. */ transcription(modelId: ElevenLabsTranscriptionModelId): TranscriptionModelV4; /** * Creates a model for speech generation. */ speech(modelId: ElevenLabsSpeechModelId): SpeechModelV4; /** * @deprecated Use `embeddingModel` instead. */ textEmbeddingModel(modelId: string): never; } interface ElevenLabsProviderSettings { /** * 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 ElevenLabs provider instance. */ declare function createElevenLabs(options?: ElevenLabsProviderSettings): ElevenLabsProvider; /** * Default ElevenLabs provider instance. */ declare const elevenLabs: ElevenLabsProvider; declare const elevenLabsSpeechModelOptionsSchema: z.ZodObject<{ languageCode: z.ZodOptional; voiceSettings: z.ZodOptional; similarityBoost: z.ZodOptional; style: z.ZodOptional; useSpeakerBoost: z.ZodOptional; }, z.core.$strip>>; pronunciationDictionaryLocators: z.ZodOptional; }, z.core.$strip>>>; seed: z.ZodOptional; previousText: z.ZodOptional; nextText: z.ZodOptional; previousRequestIds: z.ZodOptional>; nextRequestIds: z.ZodOptional>; applyTextNormalization: z.ZodOptional>; applyLanguageTextNormalization: z.ZodOptional; enableLogging: z.ZodOptional; }, z.core.$strip>; type ElevenLabsSpeechModelOptions = z.infer; declare const elevenLabsTranscriptionModelOptionsSchema: z.ZodObject<{ languageCode: z.ZodOptional>; tagAudioEvents: z.ZodDefault>>; numSpeakers: z.ZodOptional>; timestampsGranularity: z.ZodDefault>>>; diarize: z.ZodDefault>>; fileFormat: z.ZodDefault>>>; }, z.core.$strip>; type ElevenLabsTranscriptionModelOptions = z.infer; declare const VERSION: string; export { type ElevenLabsProvider, type ElevenLabsProviderSettings, type ElevenLabsSpeechModelId, type ElevenLabsSpeechModelOptions, type ElevenLabsSpeechVoiceId, type ElevenLabsTranscriptionModelOptions, VERSION, createElevenLabs, elevenLabs, elevenLabs as elevenlabs };