Text-to-speech synthesis and voice cloning
| Method | Path | Summary |
|---|---|---|
POST | /voice/clone | Clone a voice from audio samples |
POST | /voice/generate | Generate speech from text |
GET | /voice/voices | List available voices |
{% api-endpoint method=“POST” path=“/voice/clone” /%}
Clone a voice from audio samples
Operation ID: cloneVoice
Content-Type: application/json
| Required
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | - |
audioFiles | string[] | Yes | - |
description | string | No | - |
labels | object | No | - |
Voice cloned
| Field | Type | Required | Description |
|---|---|---|---|
id | string | No | - |
name | string | No | - |
description | string | No | - |
previewUrl | string (uri) | No | - |
category | string | No | - |
labels | object | No | - |
{% tabs %} {% tab label=“TypeScript” %}
import { WaveClient } from "@wave/sdk";
const client = new WaveClient({ apiKey: "your-api-key" });
const result = await client.voice.cloneVoice({
name: "example-value",
audioFiles: [],
description: "example-value",
labels: {},
});
console.log(result);
{% /tab %} {% tab label=“Python” %}
from wave_sdk import WaveClient
client = WaveClient(api_key="your-api-key")
result = client.voice.clone_voice(
name="example-value",
audio_files=[],
description="example-value",
labels={}
)
print(result)
{% /tab %} {% tab label=“cURL” %}
curl -X POST 'https://api.wave.online/voice/clone' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"name": "example-value",
"audioFiles": [],
"description": "example-value",
"labels": {}
}'
{% /tab %} {% /tabs %}
{% api-endpoint method=“POST” path=“/voice/generate” /%}
Generate speech from text
Operation ID: generateSpeech
Content-Type: application/json
| Required
| Field | Type | Required | Description |
|---|---|---|---|
voiceId | string | Yes | - |
text | string | Yes | - |
stability | number | No | Default: 0.5 |
similarityBoost | number | No | Default: 0.75 |
style | number | No | Default: 0 |
model | string | No | Default: "eleven_multilingual_v2" |
outputFormat | string | No | Default: "mp3_44100_128" |
Voice generation created
| Field | Type | Required | Description |
|---|---|---|---|
id | string | No | - |
voiceId | string | No | - |
text | string | No | - |
status | string | No | Values: pending, processing, completed, failed, cancelled |
audioUrl | string (uri) | No | - |
duration | number | No | - |
characterCount | integer | No | - |
model | string | No | - |
createdAt | string (date-time) | No | - |
updatedAt | string (date-time) | No | - |
{% tabs %} {% tab label=“TypeScript” %}
import { WaveClient } from "@wave/sdk";
const client = new WaveClient({ apiKey: "your-api-key" });
const result = await client.voice.generateSpeech({
voiceId: "abc-123",
text: "example-value",
stability: 0.5,
similarityBoost: 0.75,
style: 0,
model: "eleven_multilingual_v2",
outputFormat: "mp3_44100_128",
});
console.log(result);
{% /tab %} {% tab label=“Python” %}
from wave_sdk import WaveClient
client = WaveClient(api_key="your-api-key")
result = client.voice.generate_speech(
voice_id="abc-123",
text="example-value",
stability=1,
similarity_boost=1,
style=1,
model="example-value",
output_format="example-value"
)
print(result)
{% /tab %} {% tab label=“cURL” %}
curl -X POST 'https://api.wave.online/voice/generate' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"voiceId": "abc-123",
"text": "example-value",
"stability": 0.5,
"similarityBoost": 0.75,
"style": 0,
"model": "eleven_multilingual_v2",
"outputFormat": "mp3_44100_128"
}'
{% /tab %} {% /tabs %}
{% api-endpoint method=“GET” path=“/voice/voices” /%}
List available voices
Operation ID: listVoices
| Name | Type | Required | Description |
| ---------- | ---------- | -------- | --------------- | --- | ------------------------------------------- |
| category | "premade" | "cloned" | "professional" | No | Values: premade, cloned, professional |
| language | string | No | - |
List of voices
| Field | Type | Required | Description |
|---|---|---|---|
voices | object[] | No | - |
{% tabs %} {% tab label=“TypeScript” %}
import { WaveClient } from "@wave/sdk";
const client = new WaveClient({ apiKey: "your-api-key" });
const result = await client.voice.listVoices({
category: "example-value",
language: "example-value",
});
console.log(result);
{% /tab %} {% tab label=“Python” %}
from wave_sdk import WaveClient
client = WaveClient(api_key="your-api-key")
result = client.voice.list_voices(
category="example-value",
language="example-value"
)
print(result)
{% /tab %} {% tab label=“cURL” %}
curl -X GET 'https://api.wave.online/voice/voices?category=example-value&language=example-value' \
-H 'Authorization: Bearer YOUR_API_KEY'
{% /tab %} {% /tabs %}