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 TextToSpeechClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } export declare class TextToSpeechClient { protected readonly _options: NormalizedClientOptionsWithAuth; constructor(options?: TextToSpeechClient.Options); /** * Convert text into spoken audio. The output is a base64-encoded audio string that must be decoded before use. * * **Available Models:** * - **bulbul:v3**: Latest model with improved quality, 30+ voices, and temperature control * - **bulbul:v2**: Legacy model with pitch and loudness controls * * **Important Notes for bulbul:v3:** * - Pitch and loudness parameters are NOT supported * - Pace range: 0.5 to 2.0 * - Preprocessing is automatically enabled * - Default sample rate is 24000 Hz * - Supports sample rates: 8000, 16000, 22050, 24000 Hz (REST API also supports 32000, 44100, 48000 Hz) * * @param {SarvamAI.TextToSpeechRequest} request * @param {TextToSpeechClient.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} * * @example * await client.textToSpeech.convert({ * text: "text", * target_language_code: "bn-IN" * }) */ convert(request: SarvamAI.TextToSpeechRequest, requestOptions?: TextToSpeechClient.RequestOptions): core.HttpResponsePromise; private __convert; /** * Converts the input text into a streamed spoken audio response. * * This endpoint supports streaming audio using the specified output codec (e.g., `audio/mpeg` for MP3). The response is returned as a binary audio stream, which can be played or saved directly by the client. * * Supports the `dict_id` parameter to apply a [pronunciation dictionary](https://docs.sarvam.ai/api-reference-docs/pronunciation-dictionary/create) during synthesis. * @throws {@link SarvamAI.BadRequestError} * @throws {@link SarvamAI.ForbiddenError} * @throws {@link SarvamAI.UnprocessableEntityError} * @throws {@link SarvamAI.TooManyRequestsError} * @throws {@link SarvamAI.InternalServerError} */ convertStream(request: SarvamAI.TextToSpeechStreamRequest, requestOptions?: TextToSpeechClient.RequestOptions): core.HttpResponsePromise; private __convertStream; }