/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { customVoicesCreateClonedVoice } from "../funcs/customVoicesCreateClonedVoice.js"; import { customVoicesDeleteCustomVoice } from "../funcs/customVoicesDeleteCustomVoice.js"; import { customVoicesEditCustomVoice } from "../funcs/customVoicesEditCustomVoice.js"; import { customVoicesGetCustomVoice } from "../funcs/customVoicesGetCustomVoice.js"; import { customVoicesListCustomVoices } from "../funcs/customVoicesListCustomVoices.js"; import { customVoicesSearchCustomVoices } from "../funcs/customVoicesSearchCustomVoices.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as models from "../models/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class CustomVoices extends ClientSDK { /** * Create cloned voice * * @remarks * Creates a custom (cloned) voice from uploaded audio files. */ async createClonedVoice( request: operations.CreateClonedVoiceRequest, options?: RequestOptions, ): Promise { return unwrapAsync(customVoicesCreateClonedVoice( this, request, options, )); } /** * Gets custom (cloned) voices * * @remarks * Gets a paginated list of custom (cloned) voices available to the user, using token-based pagination. */ async listCustomVoices( request?: operations.ListCustomVoicesRequest | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(customVoicesListCustomVoices( this, request, options, )); } /** * Search custom (cloned) voices * * @remarks * Search and filter custom (cloned) voices based on various parameters. Space-separated terms in name/description fields use AND condition (all terms must be present). */ async searchCustomVoices( request?: operations.SearchCustomVoicesRequest | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(customVoicesSearchCustomVoices( this, request, options, )); } /** * Get single cloned voice * * @remarks * Gets details of a specific custom (cloned) voice by ID. */ async getCustomVoice( request: operations.GetCustomVoiceRequest, options?: RequestOptions, ): Promise { return unwrapAsync(customVoicesGetCustomVoice( this, request, options, )); } /** * Update cloned voice (partial update) * * @remarks * Partially updates properties of a custom (cloned) voice by ID. */ async editCustomVoice( request: operations.EditCustomVoiceRequest, options?: RequestOptions, ): Promise { return unwrapAsync(customVoicesEditCustomVoice( this, request, options, )); } /** * Delete cloned voice * * @remarks * Deletes a custom (cloned) voice by ID. */ async deleteCustomVoice( request: operations.DeleteCustomVoiceRequest, options?: RequestOptions, ): Promise { return unwrapAsync(customVoicesDeleteCustomVoice( this, request, options, )); } }