/** * This file was auto-generated by Fern from our API Definition. */ import * as environments from "../../../../environments"; import * as core from "../../../../core"; import * as ElevenLabs from "../../../index"; export declare namespace TextToVoice { interface Options { environment?: core.Supplier; /** Specify a custom URL to connect the client to. */ baseUrl?: core.Supplier; /** Override the xi-api-key header */ apiKey?: core.Supplier; } interface RequestOptions { /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the xi-api-key header */ apiKey?: string | undefined; /** Additional headers to include in the request. */ headers?: Record; } } export declare class TextToVoice { protected readonly _options: TextToVoice.Options; constructor(_options?: TextToVoice.Options); /** * Create a voice from a text prompt. * * @param {ElevenLabs.VoiceDesignRequest} request * @param {TextToVoice.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example * await client.textToVoice.createPreviews({ * voice_description: "A sassy squeaky mouse" * }) */ createPreviews(request: ElevenLabs.VoiceDesignRequest, requestOptions?: TextToVoice.RequestOptions): Promise; /** * Add a generated voice to the voice library. * * @param {ElevenLabs.SaveVoicePreviewRequest} request * @param {TextToVoice.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example * await client.textToVoice.createVoiceFromPreview({ * voice_name: "Sassy squeaky mouse", * voice_description: "A sassy squeaky mouse", * generated_voice_id: "37HceQefKmEi3bGovXjL" * }) */ createVoiceFromPreview(request: ElevenLabs.SaveVoicePreviewRequest, requestOptions?: TextToVoice.RequestOptions): Promise; }