primvoices
Version:
TypeScript client for the Prim Voices API
40 lines (39 loc) • 1.27 kB
TypeScript
import { AxiosInstance } from 'axios';
import { APIResponse, VoiceResponse, VoiceCreateParams, PaginationParams, PublicVoiceResponse } from '../types';
export declare class VoicesAPI {
private readonly client;
constructor(client: AxiosInstance);
/**
* List all voices for the authenticated user
* GET /v1/voices
*/
list(params?: PaginationParams): Promise<APIResponse<VoiceResponse[]>>;
/**
* Get a specific voice by ID
* GET /v1/voices/:id
*/
retrieve(voiceId: string): Promise<APIResponse<VoiceResponse>>;
/**
* Create a new voice
* POST /v1/voices
*
* @param params.name - Name of the voice
* @param params.sampleUrl - URL of the sample audio file
*/
create(params: VoiceCreateParams): Promise<APIResponse<VoiceResponse>>;
/**
* Delete a voice
* DELETE /v1/voices/:id
*/
delete(voiceId: string): Promise<APIResponse<void>>;
/**
* List all public voices
* GET /v1/publicVoices
*/
listPublic(params?: PaginationParams): Promise<APIResponse<PublicVoiceResponse[]>>;
/**
* Get a specific public voice by ID
* GET /v1/publicVoices/:id
*/
retrievePublic(voiceId: string): Promise<APIResponse<PublicVoiceResponse>>;
}