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"; export declare namespace SpeechToTextClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } export declare class SpeechToTextClient { protected readonly _options: NormalizedClientOptionsWithAuth; constructor(options?: SpeechToTextClient.Options); /** * ## Speech to Text API * * This API transcribes speech to text in multiple Indian languages and English. Supports transcription for interactive applications. * * ### Available Options: * - **REST API** (Current Endpoint): For quick responses under 30 seconds with immediate results * - **Batch API**: For longer audio files, [Follow This Documentation](https://docs.sarvam.ai/api-reference-docs/api-guides-tutorials/speech-to-text/batch-api) * - Supports diarization (speaker identification) * * ### Note: * - Pricing differs for REST and Batch APIs * - Diarization is only available in Batch API with separate pricing * - Please refer to [here](https://docs.sarvam.ai/api-reference-docs/getting-started/pricing) for detailed pricing information * * @param {SarvamAI.SpeechToTextTranscriptionRequest} request * @param {SpeechToTextClient.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 * import { createReadStream } from "fs"; * await client.speechToText.transcribe({ * file: fs.createReadStream("/path/to/your/file") * }) */ transcribe(request: SarvamAI.SpeechToTextTranscriptionRequest, requestOptions?: SpeechToTextClient.RequestOptions): core.HttpResponsePromise; private __transcribe; /** * ## Speech to Text Translation API * * This API automatically detects the input language, transcribes the speech, and translates the text to English. * * ### Available Options: * - **REST API** (Current Endpoint): For quick responses under 30 seconds with immediate results * - **Batch API**: For longer audio files [Follow this documentation](https://docs.sarvam.ai/api-reference-docs/api-guides-tutorials/speech-to-text/batch-api) * - Supports diarization (speaker identification) * * ### Note: * - Pricing differs for REST and Batch APIs * - Diarization is only available in Batch API with separate pricing * - Please refer to [here](https://docs.sarvam.ai/api-reference-docs/getting-started/pricing) for detailed pricing information * * @param {SarvamAI.SpeechToTextTranslationRequest} request * @param {SpeechToTextClient.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 * import { createReadStream } from "fs"; * await client.speechToText.translate({ * file: fs.createReadStream("/path/to/your/file") * }) */ translate(request: SarvamAI.SpeechToTextTranslationRequest, requestOptions?: SpeechToTextClient.RequestOptions): core.HttpResponsePromise; private __translate; }