import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"; import * as core from "../../../../core/index.js"; import * as SarvamAI from "../../../index.js"; import { SpeechToTextTranslateJobInstance } from "./SpeechToTextTranslateJobInstance.js"; export declare namespace SpeechToTextTranslateJobClient { interface Options extends BaseClientOptions { } interface RequestOptions extends BaseRequestOptions { } } export declare class SpeechToTextTranslateJobClient { protected readonly _options: NormalizedClientOptionsWithAuth; constructor(options?: SpeechToTextTranslateJobClient.Options); /** * Create a new speech to text translate bulk job and receive a job UUID and storage folder details for processing multiple audio files with translation * * @param {SarvamAI.SpeechToTextTranslateJobRequest} request * @param {SpeechToTextTranslateJobClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link SarvamAI.BadRequestError} * @throws {@link SarvamAI.ForbiddenError} * @throws {@link SarvamAI.UnprocessableEntityError} * @throws {@link SarvamAI.TooManyRequestsError} * @throws {@link SarvamAI.InternalServerError} * @throws {@link SarvamAI.ServiceUnavailableError} * * @example * await client.speechToTextTranslateJob.initialise({ * ptu_id: 1, * job_parameters: {} * }) */ initialise(request: SarvamAI.SpeechToTextTranslateJobRequest, requestOptions?: SpeechToTextTranslateJobClient.RequestOptions): core.HttpResponsePromise; private __initialise; /** * Retrieve the current status and details of a speech to text translate bulk job, including progress and file-level information. * * **Rate Limiting Best Practice:** To prevent rate limit errors and ensure optimal server performance, we recommend implementing a minimum 5-millisecond delay between consecutive status polling requests. This helps maintain system stability while still providing timely status updates. * * @param {string} job_id - The unique identifier of the job * @param {SpeechToTextTranslateJobClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link SarvamAI.BadRequestError} * @throws {@link SarvamAI.ForbiddenError} * @throws {@link SarvamAI.UnprocessableEntityError} * @throws {@link SarvamAI.TooManyRequestsError} * @throws {@link SarvamAI.InternalServerError} * @throws {@link SarvamAI.ServiceUnavailableError} * * @example * await client.speechToTextTranslateJob.getStatus("job_id") */ getStatus(job_id: string, requestOptions?: SpeechToTextTranslateJobClient.RequestOptions): core.HttpResponsePromise; private __getStatus; /** * Start processing a speech to text translate bulk job after all audio files have been uploaded * * @param {string} job_id - The unique identifier of the job * @param {SarvamAI.SpeechToTextTranslateJobStartRequest} request * @param {SpeechToTextTranslateJobClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link SarvamAI.BadRequestError} * @throws {@link SarvamAI.ForbiddenError} * @throws {@link SarvamAI.UnprocessableEntityError} * @throws {@link SarvamAI.TooManyRequestsError} * @throws {@link SarvamAI.InternalServerError} * @throws {@link SarvamAI.ServiceUnavailableError} * * @example * await client.speechToTextTranslateJob.start("job_id", { * ptu_id: 1 * }) */ start(job_id: string, request?: SarvamAI.SpeechToTextTranslateJobStartRequest, requestOptions?: SpeechToTextTranslateJobClient.RequestOptions): core.HttpResponsePromise; private __start; /** * Generate presigned upload URLs for audio files that will be processed in a speech to text translate bulk job * * @param {SarvamAI.SpeechToTextTranslateJobGetUploadLinksRequest} request * @param {SpeechToTextTranslateJobClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link SarvamAI.BadRequestError} * @throws {@link SarvamAI.ForbiddenError} * @throws {@link SarvamAI.UnprocessableEntityError} * @throws {@link SarvamAI.TooManyRequestsError} * @throws {@link SarvamAI.InternalServerError} * @throws {@link SarvamAI.ServiceUnavailableError} * * @example * await client.speechToTextTranslateJob.getUploadLinks({ * ptu_id: 1, * body: { * job_id: "job_id", * files: ["files"] * } * }) */ getUploadLinks(request: SarvamAI.SpeechToTextTranslateJobGetUploadLinksRequest, requestOptions?: SpeechToTextTranslateJobClient.RequestOptions): core.HttpResponsePromise; private __getUploadLinks; /** * Generate presigned download URLs for the translated transcription output files of a completed speech to text translate bulk job * * @param {SarvamAI.SpeechToTextTranslateJobGetDownloadLinksRequest} request * @param {SpeechToTextTranslateJobClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link SarvamAI.BadRequestError} * @throws {@link SarvamAI.ForbiddenError} * @throws {@link SarvamAI.UnprocessableEntityError} * @throws {@link SarvamAI.TooManyRequestsError} * @throws {@link SarvamAI.InternalServerError} * @throws {@link SarvamAI.ServiceUnavailableError} * * @example * await client.speechToTextTranslateJob.getDownloadLinks({ * ptu_id: 1, * body: { * job_id: "job_id", * files: ["files"] * } * }) */ getDownloadLinks(request: SarvamAI.SpeechToTextTranslateJobGetDownloadLinksRequest, requestOptions?: SpeechToTextTranslateJobClient.RequestOptions): core.HttpResponsePromise; private __getDownloadLinks; /** * Create a new Speech-to-Text-Translate bulk job. * * @param params - Job creation parameters * @param params.model - The model to use for speech-to-text translation (default: "saaras:v2.5") * @param params.withDiarization - Whether to enable speaker diarization (default: false) * @param params.prompt - An optional prompt to guide the transcription and translation model * @param params.numSpeakers - The number of distinct speakers in the audio, if known * @param params.callback - Optional callback configuration to receive job completion events * @param requestOptions - Request-specific configuration * @returns A handle to the newly created Speech-to-Text-Translate job */ createJob(params?: { model?: SarvamAI.SpeechToTextTranslateModel; withDiarization?: boolean; prompt?: string; numSpeakers?: number; callback?: SarvamAI.BulkJobCallback; }, requestOptions?: SpeechToTextTranslateJobClient.RequestOptions): Promise; /** * Get an existing Speech-to-Text-Translate job handle by job ID. * * @param jobId - The job ID of the previously created Speech-to-Text-Translate job * @returns A job handle which can be used to check status or retrieve results */ getJob(jobId: string): SpeechToTextTranslateJobInstance; }