Voice Preview
Voice Cloning
Voice Preview
Generate a preview of a voice you want to clone. This API allows you to test how a voice will sound before creating it as a permanent voice.
POST
Voice Preview
Authentication
Requires API key authentication viax-api-key header.
Request
Content-Type:multipart/form-data
Form Data
| Field | Type | Required | Description |
|---|---|---|---|
text | string | Yes | Text to generate preview with (minimum 3 words, 10 characters) |
similarity | number | Yes | Voice similarity to source (0.0 to 1.0). Higher values produce more similar voice |
model_id | string | Yes | The model identifier to use for generation |
speed | number | No | Speech speed (0.7 to 1.2, default 1.0). Values below 1.0 slow down speech, above 1.0 speed it up |
file | File | Yes | Audio file containing the voice to preview |
Notes
- The API will process the provided audio file to generate the voice preview
textmust be at least 3 words and 10 characters long
Response
Status Code:200 OK
Headers:
Content-Type: audio/raw;codec=pcm16;rate=24000;channels=1Cache-Control: no-cacheConnection: keep-alive
Error Responses
400 Bad RequestExample Usage
JavaScript
Python
cURL
Voice Preview: This endpoint generates a preview of a cloned voice. If you’re satisfied with the preview, you can proceed to create it as a permanent voice using the voice creation endpoint.
Authorizations
API key for authentication
Body
multipart/form-data
Text to generate preview with (minimum 3 words, 10 characters)
Voice similarity to source (0.0 to 1.0). Higher values produce more similar voice
Required range:
0 <= x <= 1The model identifier to use for generation
Audio file containing the voice to preview
Speech speed (0.7 to 1.2, default 1.0)
Required range:
0.7 <= x <= 1.2Response
Streaming PCM16 audio preview
PCM16 audio stream (24000 Hz, Mono, 16-bit)
