import { APIResource } from "../resource.js"; import * as Core from "../core.js"; export declare class Voices extends APIResource { /** * Submits a request to create a voice with a supplied voice configuration and a * batch of input audio data. * * @example * ```ts * const voice = await client.voices.create({ * file: fs.createReadStream('path/to/file'), * name: 'new-voice', * }); * ``` */ create(body: VoiceCreateParams, options?: Core.RequestOptions): Core.APIPromise; /** * Returns details of a specific voice. * * @example * ```ts * const voice = await client.voices.retrieve('9c4a8f2b3e1d7c40'); * ``` */ retrieve(id: string, options?: Core.RequestOptions): Core.APIPromise; /** * Updates metadata for a specific voice. Only provided fields will be changed. * * @example * ```ts * const voice = await client.voices.update('9c4a8f2b3e1d7c40'); * ``` */ update(id: string, body?: VoiceUpdateParams, options?: Core.RequestOptions): Core.APIPromise; update(id: string, options?: Core.RequestOptions): Core.APIPromise; /** * Deletes a voice and cancels any pending operations on it. Cannot be undone. * * @example * ```ts * const voice = await client.voices.delete('9c4a8f2b3e1d7c40'); * ``` */ delete(id: string, options?: Core.RequestOptions): Core.APIPromise; /** * Returns a list of voices available to you. * * @example * ```ts * const voices = await client.voices.list(); * ``` */ list(query?: VoiceListParams, options?: Core.RequestOptions): Core.APIPromise; list(options?: Core.RequestOptions): Core.APIPromise; } /** * Voice details */ export interface Voice { /** * The unique identifier of this voice. */ id: string; /** * The display name of this voice. */ name: string; /** * The owner of this voice. */ owner: 'system' | 'me' | 'other'; /** * The state of this voice in the training pipeline (e.g., `ready`, `training`). */ state: string; /** * A text description of this voice. */ description?: string | null; /** * A tag describing the gender of this voice, e.g. `male`, `female`, `nonbinary`. */ gender?: string; /** * A URL that returns a preview speech sample of this voice. The file can be played * directly in a browser or audio player. */ preview_url?: string; /** * Whether this voice has been starred by you or not. */ starred?: boolean; /** * Tags attached to this voice. */ tags?: Array; /** * The method by which this voice was created. Always `instant`. */ type?: 'instant'; } export interface VoiceUpdateResponse { /** * Voice details */ voice: Voice; } export interface VoiceDeleteResponse { success: boolean; } export type VoiceListResponse = Array; export interface VoiceCreateParams { /** * The input audio file to train the voice with, as a binary `wav`, `mp3`, `mp4`, * `m4a`, or `webm` attachment. * * - Max file size: 250 MB. */ file: Core.Uploadable; /** * The display name for this voice */ name: string; /** * A text description of this voice. */ description?: string; /** * A tag describing the gender of this voice. Has no effect on voice creation. */ gender?: string; /** * A list of tags to attach to this voice. */ tags?: Array; } export interface VoiceUpdateParams { /** * A description of this voice. */ description?: string; /** * A tag describing the gender of this voice, e.g. `male`, `female`, `nonbinary`. */ gender?: string; /** * The display name for this voice. */ name?: string; /** * If `true`, adds this voice to your starred list. */ starred?: boolean; /** * Replaces the tags attached to this voice with the given list. */ tags?: Array; } export interface VoiceListParams { /** * Which owner's voices to return. Choose from `system`, `me`, or `all`. */ owner?: string; /** * If true, only returns voices that you have starred. */ starred?: string; } export declare namespace Voices { export { type Voice as Voice, type VoiceUpdateResponse as VoiceUpdateResponse, type VoiceDeleteResponse as VoiceDeleteResponse, type VoiceListResponse as VoiceListResponse, type VoiceCreateParams as VoiceCreateParams, type VoiceUpdateParams as VoiceUpdateParams, type VoiceListParams as VoiceListParams, }; } //# sourceMappingURL=voices.d.ts.map