/** * 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 * as stream from "stream"; import { Speaker } from "../resources/speaker/client/Client"; export declare namespace Dubbing { 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 Dubbing { protected readonly _options: Dubbing.Options; protected _speaker: Speaker | undefined; constructor(_options?: Dubbing.Options); get speaker(): Speaker; /** * Given a dubbing ID generated from the '/v1/dubbing' endpoint with studio enabled, returns the dubbing resource. * * @param {string} dubbingId - ID of the dubbing project. * @param {Dubbing.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example * await client.dubbing.getDubbingResource("dubbing_id") */ getDubbingResource(dubbingId: string, requestOptions?: Dubbing.RequestOptions): Promise; /** * Adds the given ElevenLab Turbo V2/V2.5 language code to the resource. Does not automatically generate transcripts/translations/audio. * * @param {string} dubbingId - ID of the dubbing project. * @param {ElevenLabs.BodyAddALanguageToTheResourceV1DubbingResourceDubbingIdLanguagePost} request * @param {Dubbing.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example * await client.dubbing.addLanguageToResource("dubbing_id") */ addLanguageToResource(dubbingId: string, request?: ElevenLabs.BodyAddALanguageToTheResourceV1DubbingResourceDubbingIdLanguagePost, requestOptions?: Dubbing.RequestOptions): Promise; /** * Modifies a single segment with new text and/or start/end times. Will update the values for only a specific language of a segment. Does not automatically regenerate the dub. * * @param {string} dubbingId - ID of the dubbing project. * @param {string} segmentId - ID of the segment * @param {string} language - ID of the language. * @param {ElevenLabs.SegmentUpdatePayload} request * @param {Dubbing.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example * await client.dubbing.updateSegmentLanguage("dubbing_id", "segment_id", "language") */ updateSegmentLanguage(dubbingId: string, segmentId: string, language: string, request?: ElevenLabs.SegmentUpdatePayload, requestOptions?: Dubbing.RequestOptions): Promise; /** * Deletes a single segment from the dubbing. * * @param {string} dubbingId - ID of the dubbing project. * @param {string} segmentId - ID of the segment * @param {Dubbing.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example * await client.dubbing.deleteSegment("dubbing_id", "segment_id") */ deleteSegment(dubbingId: string, segmentId: string, requestOptions?: Dubbing.RequestOptions): Promise; /** * Regenerate the transcriptions for the specified segments. Does not automatically regenerate translations or dubs. * * @param {string} dubbingId - ID of the dubbing project. * @param {ElevenLabs.BodyTranscribesSegmentsV1DubbingResourceDubbingIdTranscribePost} request * @param {Dubbing.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example * await client.dubbing.transcribeSegments("dubbing_id", { * segments: ["segments"] * }) */ transcribeSegments(dubbingId: string, request: ElevenLabs.BodyTranscribesSegmentsV1DubbingResourceDubbingIdTranscribePost, requestOptions?: Dubbing.RequestOptions): Promise; /** * Regenerate the translations for either the entire resource or the specified segments/languages. Will automatically transcribe missing transcriptions. Will not automatically regenerate the dubs. * * @param {string} dubbingId - ID of the dubbing project. * @param {ElevenLabs.BodyTranslatesAllOrSomeSegmentsAndLanguagesV1DubbingResourceDubbingIdTranslatePost} request * @param {Dubbing.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example * await client.dubbing.translateSegments("dubbing_id", { * segments: ["segments"] * }) */ translateSegments(dubbingId: string, request: ElevenLabs.BodyTranslatesAllOrSomeSegmentsAndLanguagesV1DubbingResourceDubbingIdTranslatePost, requestOptions?: Dubbing.RequestOptions): Promise; /** * Regenerate the dubs for either the entire resource or the specified segments/languages. Will automatically transcribe and translate any missing transcriptions and translations. * * @param {string} dubbingId - ID of the dubbing project. * @param {ElevenLabs.BodyDubsAllOrSomeSegmentsAndLanguagesV1DubbingResourceDubbingIdDubPost} request * @param {Dubbing.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example * await client.dubbing.dubSegments("dubbing_id", { * segments: ["segments"] * }) */ dubSegments(dubbingId: string, request: ElevenLabs.BodyDubsAllOrSomeSegmentsAndLanguagesV1DubbingResourceDubbingIdDubPost, requestOptions?: Dubbing.RequestOptions): Promise; /** * Regenerate the dubs for either the entire resource or the specified segments/languages. Will automatically transcribe and translate any missing transcriptions and translations. * * @param {string} dubbingId - ID of the dubbing project. * @param {string} language - Render this language * @param {ElevenLabs.BodyRenderAudioOrVideoForTheGivenLanguageV1DubbingResourceDubbingIdRenderLanguagePost} request * @param {Dubbing.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example * await client.dubbing.renderDub("dubbing_id", "language", { * render_type: "mp4" * }) */ renderDub(dubbingId: string, language: string, request: ElevenLabs.BodyRenderAudioOrVideoForTheGivenLanguageV1DubbingResourceDubbingIdRenderLanguagePost, requestOptions?: Dubbing.RequestOptions): Promise; /** * Dubs a provided audio or video file into given language. * * @param {ElevenLabs.BodyDubAVideoOrAnAudioFileV1DubbingPost} request * @param {Dubbing.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example * await client.dubbing.dubAVideoOrAnAudioFile({}) */ dubAVideoOrAnAudioFile(request: ElevenLabs.BodyDubAVideoOrAnAudioFileV1DubbingPost, requestOptions?: Dubbing.RequestOptions): Promise; /** * Returns metadata about a dubbing project, including whether it's still in progress or not * * @param {string} dubbingId - ID of the dubbing project. * @param {Dubbing.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example * await client.dubbing.getDubbingProjectMetadata("dubbing_id") */ getDubbingProjectMetadata(dubbingId: string, requestOptions?: Dubbing.RequestOptions): Promise; /** * Deletes a dubbing project. * * @param {string} dubbingId - ID of the dubbing project. * @param {Dubbing.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example * await client.dubbing.deleteDubbingProject("dubbing_id") */ deleteDubbingProject(dubbingId: string, requestOptions?: Dubbing.RequestOptions): Promise; /** * Returns dubbed file as a streamed file. Videos will be returned in MP4 format and audio only dubs will be returned in MP3. * @throws {@link ElevenLabs.ForbiddenError} * @throws {@link ElevenLabs.NotFoundError} * @throws {@link ElevenLabs.UnprocessableEntityError} * @throws {@link ElevenLabs.TooEarlyError} */ getDubbedFile(dubbingId: string, languageCode: string, requestOptions?: Dubbing.RequestOptions): Promise; /** * Returns transcript for the dub as an SRT or WEBVTT file. * * @param {string} dubbingId - ID of the dubbing project. * @param {string} languageCode - ID of the language. * @param {ElevenLabs.DubbingGetTranscriptForDubRequest} request * @param {Dubbing.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link ElevenLabs.ForbiddenError} * @throws {@link ElevenLabs.NotFoundError} * @throws {@link ElevenLabs.UnprocessableEntityError} * @throws {@link ElevenLabs.TooEarlyError} * * @example * await client.dubbing.getTranscriptForDub("dubbing_id", "language_code") */ getTranscriptForDub(dubbingId: string, languageCode: string, request?: ElevenLabs.DubbingGetTranscriptForDubRequest, requestOptions?: Dubbing.RequestOptions): Promise; }