/** * This file was auto-generated by Fern from our API Definition. */ import * as environments from "../../../../environments"; import * as core from "../../../../core"; import * as ElevenLabs from "../../../index"; import * as stream from "stream"; export declare namespace PronunciationDictionary { interface Options { environment?: core.Supplier; /** Specify a custom URL to connect the client to. */ baseUrl?: core.Supplier; /** Override the xi-api-key header */ apiKey?: core.Supplier; } interface RequestOptions { /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the xi-api-key header */ apiKey?: string | undefined; /** Additional headers to include in the request. */ headers?: Record; } } export declare class PronunciationDictionary { protected readonly _options: PronunciationDictionary.Options; constructor(_options?: PronunciationDictionary.Options); /** * Creates a new pronunciation dictionary from a lexicon .PLS file * * @param {ElevenLabs.BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromFilePost} request * @param {PronunciationDictionary.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example * await client.pronunciationDictionary.addFromFile({ * name: "name" * }) */ addFromFile(request: ElevenLabs.BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromFilePost, requestOptions?: PronunciationDictionary.RequestOptions): Promise; /** * Creates a new pronunciation dictionary from provided rules. * * @param {ElevenLabs.BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPost} request * @param {PronunciationDictionary.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example * await client.pronunciationDictionary.addFromRules({ * rules: [{ * type: "alias", * string_to_replace: "Thailand", * alias: "tie-land" * }], * name: "My Dictionary" * }) */ addFromRules(request: ElevenLabs.BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromRulesPost, requestOptions?: PronunciationDictionary.RequestOptions): Promise; /** * Add rules to the pronunciation dictionary * * @param {string} pronunciationDictionaryId - The id of the pronunciation dictionary * @param {ElevenLabs.PronunciationDictionary} request * @param {PronunciationDictionary.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example * await client.pronunciationDictionary.addRules("21m00Tcm4TlvDq8ikWAM", { * rules: [{ * type: "alias", * string_to_replace: "Thailand", * alias: "tie-land" * }] * }) */ addRules(pronunciationDictionaryId: string, request: ElevenLabs.PronunciationDictionary, requestOptions?: PronunciationDictionary.RequestOptions): Promise; /** * Remove rules from the pronunciation dictionary * * @param {string} pronunciationDictionaryId - The id of the pronunciation dictionary * @param {ElevenLabs.RemovePronunciationDictionaryRulesRequest} request * @param {PronunciationDictionary.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example * await client.pronunciationDictionary.removeRules("21m00Tcm4TlvDq8ikWAM", { * rule_strings: ["rule_strings"] * }) */ removeRules(pronunciationDictionaryId: string, request: ElevenLabs.RemovePronunciationDictionaryRulesRequest, requestOptions?: PronunciationDictionary.RequestOptions): Promise; /** * Get a PLS file with a pronunciation dictionary version rules * @throws {@link ElevenLabs.UnprocessableEntityError} */ download(dictionaryId: string, versionId: string, requestOptions?: PronunciationDictionary.RequestOptions): Promise; /** * Get metadata for a pronunciation dictionary * * @param {string} pronunciationDictionaryId - The id of the pronunciation dictionary * @param {PronunciationDictionary.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example * await client.pronunciationDictionary.get("21m00Tcm4TlvDq8ikWAM") */ get(pronunciationDictionaryId: string, requestOptions?: PronunciationDictionary.RequestOptions): Promise; /** * Get a list of the pronunciation dictionaries you have access to and their metadata * * @param {ElevenLabs.PronunciationDictionaryGetAllRequest} request * @param {PronunciationDictionary.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link ElevenLabs.UnprocessableEntityError} * * @example * await client.pronunciationDictionary.getAll() */ getAll(request?: ElevenLabs.PronunciationDictionaryGetAllRequest, requestOptions?: PronunciationDictionary.RequestOptions): Promise; }