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 PronunciationDictionaryClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } export declare class PronunciationDictionaryClient { protected readonly _options: NormalizedClientOptionsWithAuth; constructor(options?: PronunciationDictionaryClient.Options); /** * Retrieve a list of all pronunciation dictionary IDs associated with the authenticated user. * * @param {PronunciationDictionaryClient.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.pronunciationDictionary.list() */ list(requestOptions?: PronunciationDictionaryClient.RequestOptions): core.HttpResponsePromise; private __list; /** * Upload a `.json` file to create a new pronunciation dictionary. Only supported by **bulbul:v3**. * * The file should contain a JSON object with a `pronunciations` key mapping language codes to word-pronunciation pairs. See the [Pronunciation Dictionary guide](/api-reference-docs/api-guides-tutorials/text-to-speech/pronunciation-dictionary) for format details and examples. * * The returned `dictionary_id` can be passed as `dict_id` in text-to-speech requests (REST, HTTP Stream, and WebSocket). * * **Limits:** Max 10 dictionaries per user, 100 words per dictionary, 1 MB file size. * * @param {SarvamAI.CreatePronunciationDictionaryRequest} request * @param {PronunciationDictionaryClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link SarvamAI.BadRequestError} * @throws {@link SarvamAI.ForbiddenError} * @throws {@link SarvamAI.ContentTooLargeError} * @throws {@link SarvamAI.UnprocessableEntityError} * @throws {@link SarvamAI.TooManyRequestsError} * @throws {@link SarvamAI.InternalServerError} * * @example * import { createReadStream } from "fs"; * await client.pronunciationDictionary.create({ * file: fs.createReadStream("/path/to/your/file") * }) */ create(request: SarvamAI.CreatePronunciationDictionaryRequest, requestOptions?: PronunciationDictionaryClient.RequestOptions): core.HttpResponsePromise; private __create; /** * Update an existing pronunciation dictionary by uploading a JSON file. You can add new words, change existing pronunciations, or both — entries not included in the uploaded file remain unchanged. * * **Limits:** Max 100 words per dictionary, 1 MB file size. * * The response includes the `dictionary_id` and the updated pronunciation mappings for verification. * * @param {SarvamAI.UpdatePronunciationDictionaryRequest} request * @param {PronunciationDictionaryClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link SarvamAI.BadRequestError} * @throws {@link SarvamAI.ForbiddenError} * @throws {@link SarvamAI.NotFoundError} * @throws {@link SarvamAI.ContentTooLargeError} * @throws {@link SarvamAI.UnprocessableEntityError} * @throws {@link SarvamAI.TooManyRequestsError} * @throws {@link SarvamAI.InternalServerError} * * @example * import { createReadStream } from "fs"; * await client.pronunciationDictionary.update({ * file: fs.createReadStream("/path/to/your/file"), * dict_id: "p_5cb7faa6" * }) */ update(request: SarvamAI.UpdatePronunciationDictionaryRequest, requestOptions?: PronunciationDictionaryClient.RequestOptions): core.HttpResponsePromise; private __update; /** * Delete a pronunciation dictionary by its ID. Once deleted, the dictionary can no longer be referenced in text-to-speech requests. * * @param {SarvamAI.PronunciationDictionaryDeleteRequest} request * @param {PronunciationDictionaryClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link SarvamAI.BadRequestError} * @throws {@link SarvamAI.ForbiddenError} * @throws {@link SarvamAI.NotFoundError} * @throws {@link SarvamAI.UnprocessableEntityError} * @throws {@link SarvamAI.TooManyRequestsError} * @throws {@link SarvamAI.InternalServerError} * * @example * await client.pronunciationDictionary.delete({ * dict_id: "dict_id" * }) */ delete(request: SarvamAI.PronunciationDictionaryDeleteRequest, requestOptions?: PronunciationDictionaryClient.RequestOptions): core.HttpResponsePromise; private __delete; /** * Retrieve the full pronunciation mappings for a specific dictionary by its ID. * * Returns the pronunciation data organized by language code, where each language contains word-to-pronunciation pairs. * * @param {string} dict_id * @param {PronunciationDictionaryClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link SarvamAI.BadRequestError} * @throws {@link SarvamAI.ForbiddenError} * @throws {@link SarvamAI.NotFoundError} * @throws {@link SarvamAI.UnprocessableEntityError} * @throws {@link SarvamAI.TooManyRequestsError} * @throws {@link SarvamAI.InternalServerError} * * @example * await client.pronunciationDictionary.get("dict_id") */ get(dict_id: string, requestOptions?: PronunciationDictionaryClient.RequestOptions): core.HttpResponsePromise; private __get; }