/** * 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"; import { Pvc } from "../resources/pvc/client/Client"; export declare namespace Voices { 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; } } /** * Access to voices created either by you or us. */ export declare class Voices { protected readonly _options: Voices.Options; protected _pvc: Pvc | undefined; constructor(_options?: Voices.Options); get pvc(): Pvc; /** * Returns a list of all available voices for a user. * * @param {ElevenLabs.VoicesGetAllRequest} request * @param {Voices.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example * await client.voices.getAll() */ getAll(request?: ElevenLabs.VoicesGetAllRequest, requestOptions?: Voices.RequestOptions): Promise; /** * Gets a list of all available voices for a user with search, filtering and pagination. * * @param {ElevenLabs.VoicesSearchRequest} request * @param {Voices.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example * await client.voices.search({ * include_total_count: true * }) */ search(request?: ElevenLabs.VoicesSearchRequest, requestOptions?: Voices.RequestOptions): Promise; /** * Gets the default settings for voices. "similarity_boost" corresponds to"Clarity + Similarity Enhancement" in the web app and "stability" corresponds to "Stability" slider in the web app. * * @param {Voices.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.voices.getDefaultSettings() */ getDefaultSettings(requestOptions?: Voices.RequestOptions): Promise; /** * Returns the settings for a specific voice. "similarity_boost" corresponds to"Clarity + Similarity Enhancement" in the web app and "stability" corresponds to "Stability" slider in the web app. * * @param {string} voiceId - Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices. * @param {Voices.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example * await client.voices.getSettings("21m00Tcm4TlvDq8ikWAM") */ getSettings(voiceId: string, requestOptions?: Voices.RequestOptions): Promise; /** * Returns metadata about a specific voice. * * @param {string} voiceId - ID of the voice to be used. You can use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices. * @param {ElevenLabs.VoicesGetRequest} request * @param {Voices.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example * await client.voices.get("21m00Tcm4TlvDq8ikWAM") */ get(voiceId: string, request?: ElevenLabs.VoicesGetRequest, requestOptions?: Voices.RequestOptions): Promise; /** * Deletes a voice by its ID. * * @param {string} voiceId - ID of the voice to be used. You can use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices. * @param {Voices.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example * await client.voices.delete("21m00Tcm4TlvDq8ikWAM") */ delete(voiceId: string, requestOptions?: Voices.RequestOptions): Promise; /** * Edit your settings for a specific voice. "similarity_boost" corresponds to "Clarity + Similarity Enhancement" in the web app and "stability" corresponds to "Stability" slider in the web app. * * @param {string} voiceId - ID of the voice to be used. You can use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices. * @param {ElevenLabs.VoiceSettings} request * @param {Voices.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example * await client.voices.editSettings("21m00Tcm4TlvDq8ikWAM", { * stability: 1, * similarity_boost: 1, * style: 0, * use_speaker_boost: true, * speed: 1 * }) */ editSettings(voiceId: string, request: ElevenLabs.VoiceSettings, requestOptions?: Voices.RequestOptions): Promise; /** * Create a voice clone and add it to your Voices * * @param {ElevenLabs.BodyAddVoiceV1VoicesAddPost} request * @param {Voices.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example * await client.voices.add({ * files: [fs.createReadStream("/path/to/your/file")], * name: "name" * }) */ add(request: ElevenLabs.BodyAddVoiceV1VoicesAddPost, requestOptions?: Voices.RequestOptions): Promise; /** * Edit a voice created by you. * * @param {string} voiceId * @param {ElevenLabs.BodyEditVoiceV1VoicesVoiceIdEditPost} request * @param {Voices.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example * await client.voices.edit("21m00Tcm4TlvDq8ikWAM", { * name: "name" * }) */ edit(voiceId: string, request: ElevenLabs.BodyEditVoiceV1VoicesVoiceIdEditPost, requestOptions?: Voices.RequestOptions): Promise; /** * Add a shared voice to your collection of Voices * * @param {string} publicUserId - Public user ID used to publicly identify ElevenLabs users. * @param {string} voiceId - ID of the voice to be used. You can use the [Get voices](/docs/api-reference/voices/search) endpoint list all the available voices. * @param {ElevenLabs.BodyAddSharedVoiceV1VoicesAddPublicUserIdVoiceIdPost} request * @param {Voices.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example * await client.voices.addSharingVoice("63e06b7e7cafdc46be4d2e0b3f045940231ae058d508589653d74d1265a574ca", "21m00Tcm4TlvDq8ikWAM", { * new_name: "John Smith" * }) */ addSharingVoice(publicUserId: string, voiceId: string, request: ElevenLabs.BodyAddSharedVoiceV1VoicesAddPublicUserIdVoiceIdPost, requestOptions?: Voices.RequestOptions): Promise; /** * Retrieves a list of shared voices. * * @param {ElevenLabs.VoicesGetSharedRequest} request * @param {Voices.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example * await client.voices.getShared({ * featured: true, * reader_app_enabled: true * }) */ getShared(request?: ElevenLabs.VoicesGetSharedRequest, requestOptions?: Voices.RequestOptions): Promise; /** * Returns a list of shared voices similar to the provided audio sample. If neither similarity_threshold nor top_k is provided, we will apply default values. * * @param {ElevenLabs.BodyGetSimilarLibraryVoicesV1SimilarVoicesPost} request * @param {Voices.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example * await client.voices.getSimilarLibraryVoices({}) */ getSimilarLibraryVoices(request: ElevenLabs.BodyGetSimilarLibraryVoicesV1SimilarVoicesPost, requestOptions?: Voices.RequestOptions): Promise; }