import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs"; import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs"; import * as core from "../../../../core/index.mjs"; import * as SarvamAI from "../../../index.mjs"; export declare namespace DubbingClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } export declare class DubbingClient { protected readonly _options: NormalizedClientOptionsWithAuth; constructor(options?: DubbingClient.Options); /** * ## Creative Agents - Dubbing * * Create a dubbing job that translates a source video or audio file into one or more Indian languages, with optional voice cloning, watermark control, and translation-style (register) control. * * **Base URL:** `https://api.sarvam.ai/dubbing`. * **Auth:** send your key in the `api-subscription-key` header, not `Authorization: Bearer`. * * This call only creates the job. It does not accept the media file. The response returns `data.job_id` and a short-lived signed `data.upload_url`. After that: * 1. `PUT` the raw media bytes to `upload_url` with headers `Content-Type: ` (e.g. `video/mp4`) and `x-ms-blob-type: BlockBlob`. * 2. `POST /jobs/{job_id}/start` to begin the pipeline. * * A single job dubs into every language in `target_langs`, so you don't need a separate job per language. * * @param {SarvamAI.CreateDubbingJobRequest} request * @param {DubbingClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link SarvamAI.UnauthorizedError} * @throws {@link SarvamAI.UnprocessableEntityError} * @throws {@link SarvamAI.InternalServerError} * * @example * await client.dubbing.create({ * src_lang: "en-IN", * target_langs: ["hi-IN", "ta-IN", "te-IN"], * export_options: ["video", "audio", "srt"], * voice_cloning: true, * num_speakers: 1, * disable_watermark: true, * register: "modern-colloquial", * job_name: "segment1" * }) */ create(request: SarvamAI.CreateDubbingJobRequest, requestOptions?: DubbingClient.RequestOptions): core.HttpResponsePromise; private __create; /** * Start a dubbing job once the media file has been uploaded to the signed `upload_url` returned by `POST /jobs`. The job status then moves from `queued` to `in_progress`, and finally to `completed` or `failed`. * * Keep `editor_flow` set to `false` (the default) when creating the job so exports auto-produce once the pipeline finishes. * * @param {string} job_id - The `job_id` returned by `POST /jobs`. * @param {DubbingClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link SarvamAI.UnauthorizedError} * @throws {@link SarvamAI.UnprocessableEntityError} * @throws {@link SarvamAI.InternalServerError} * * @example * await client.dubbing.start("dub_5cb7faa6") */ start(job_id: string, requestOptions?: DubbingClient.RequestOptions): core.HttpResponsePromise; private __start; /** * Poll the pipeline progress of a dubbing job. `data.status` moves from `queued` to `in_progress`, then to `completed` or `failed`. * * > **Note:** `live-status` is a progress signal only. The source of truth for downloadable outputs is `GET /jobs/{job_id}/export-status`. Each `(target_language, export_type)` export completes independently and carries its own `status` and `download_url`. * * @param {string} job_id - The `job_id` returned by `POST /jobs`. * @param {DubbingClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link SarvamAI.UnauthorizedError} * @throws {@link SarvamAI.UnprocessableEntityError} * @throws {@link SarvamAI.InternalServerError} * * @example * await client.dubbing.getLiveStatus("dub_5cb7faa6") */ getLiveStatus(job_id: string, requestOptions?: DubbingClient.RequestOptions): core.HttpResponsePromise; private __getLiveStatus; /** * Retrieve the per-output export status for a dubbing job. Returns `data.exports[]`, one entry per `(target_language, export_type)` combination, each with its own `status` and signed `download_url`. * * **This is the source of truth for downloads.** Before downloading, confirm an entry's `status == "completed"` and use its `download_url`. * * > Signed download URLs are time-limited (~24h). Re-fetch this endpoint for a fresh URL rather than caching long-term. * * @param {string} job_id - The `job_id` returned by `POST /jobs`. * @param {SarvamAI.DubbingGetExportStatusRequest} request * @param {DubbingClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link SarvamAI.UnauthorizedError} * @throws {@link SarvamAI.UnprocessableEntityError} * @throws {@link SarvamAI.InternalServerError} * * @example * await client.dubbing.getExportStatus("dub_5cb7faa6", { * limit: 5 * }) */ getExportStatus(job_id: string, request?: SarvamAI.DubbingGetExportStatusRequest, requestOptions?: DubbingClient.RequestOptions): core.HttpResponsePromise; private __getExportStatus; }