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 { SpeechToTextJobInstance } from "./SpeechToTextJobInstance.js"; export declare namespace SpeechToTextJobClient { interface Options extends BaseClientOptions { } interface RequestOptions extends BaseRequestOptions { } } export declare class SpeechToTextJobClient { protected readonly _options: NormalizedClientOptionsWithAuth; constructor(options?: SpeechToTextJobClient.Options); /** * Create a new speech to text bulk job and receive a job UUID and storage folder details for processing multiple audio files * * @param {SarvamAI.SpeechToTextJobRequest} request * @param {SpeechToTextJobClient.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.speechToTextJob.initialise({ * job_parameters: {} * }) */ initialise(request: SarvamAI.SpeechToTextJobRequest, requestOptions?: SpeechToTextJobClient.RequestOptions): core.HttpResponsePromise; private __initialise; /** * Retrieve the current status and details of a speech to text 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 {SpeechToTextJobClient.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.speechToTextJob.getStatus("job_id") */ getStatus(job_id: string, requestOptions?: SpeechToTextJobClient.RequestOptions): core.HttpResponsePromise; private __getStatus; /** * Start processing a speech to text bulk job after all audio files have been uploaded * * @param {string} job_id - The unique identifier of the job * @param {SarvamAI.SpeechToTextJobStartRequest} request * @param {SpeechToTextJobClient.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.speechToTextJob.start("job_id", { * ptu_id: 1 * }) */ start(job_id: string, request?: SarvamAI.SpeechToTextJobStartRequest, requestOptions?: SpeechToTextJobClient.RequestOptions): core.HttpResponsePromise; private __start; /** * Generate presigned upload URLs for audio files that will be processed in a speech to text bulk job * * @param {SarvamAI.FilesRequest} request * @param {SpeechToTextJobClient.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.speechToTextJob.getUploadLinks({ * job_id: "job_id", * files: ["files"] * }) */ getUploadLinks(request: SarvamAI.FilesRequest, requestOptions?: SpeechToTextJobClient.RequestOptions): core.HttpResponsePromise; private __getUploadLinks; /** * Generate presigned download URLs for the transcription output files of a completed speech to text bulk job * * @param {SarvamAI.FilesRequest} request * @param {SpeechToTextJobClient.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.speechToTextJob.getDownloadLinks({ * job_id: "job_id", * files: ["files"] * }) */ getDownloadLinks(request: SarvamAI.FilesRequest, requestOptions?: SpeechToTextJobClient.RequestOptions): core.HttpResponsePromise; private __getDownloadLinks; /** * Create a new Speech-to-Text bulk job. * * @param params - Job creation parameters * @param params.model - The model to use for transcription (default: "saarika:v2.5") * @param params.withDiarization - Whether to enable speaker diarization (default: false) * @param params.withTimestamps - Whether to include word-level timestamps (default: false) * @param params.languageCode - The language code of the input audio (e.g., "hi-IN", "bn-IN") * @param params.numSpeakers - The number of distinct speakers in the audio, if known * @param params.mode - Output mode for **saaras:v3** only (e.g. transcribe, translate, verbatim) * @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 job */ createJob(params?: { model?: SarvamAI.SpeechToTextModel; withDiarization?: boolean; withTimestamps?: boolean; languageCode?: SarvamAI.SpeechToTextLanguage; numSpeakers?: number; mode?: SarvamAI.Mode; callback?: SarvamAI.BulkJobCallback; }, requestOptions?: SpeechToTextJobClient.RequestOptions): Promise; /** * Get an existing Speech-to-Text job handle by job ID. * * @param jobId - The job ID of the previously created Speech-to-Text job * @returns A job handle which can be used to check status or retrieve results */ getJob(jobId: string): SpeechToTextJobInstance; }