Text-to-Speech Service
Convert text to natural-sounding audio with YODI's TTS API.
Endpoint​
POST https://admin.yodi.tg/api/ai/tts
Description​
Convert text to high-quality audio files in multiple languages and voices.
Parameters​
Required​
| Parameter | Type | Description |
|---|---|---|
text | string | Text to convert |
Optional​
| Parameter | Type | Default | Description |
|---|---|---|---|
language | string | fr | Language code |
voice | string | default | Voice ID |
speed | float | 1.0 | Speaking speed (0.5 - 2.0) |
pitch | float | 1.0 | Voice pitch (0.5 - 2.0) |
audioFormat | string | mp3 | 'mp3', 'wav', 'ogg' |
Example Request​
curl -X POST "https://admin.yodi.tg/api/ai/tts" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "Bienvenue sur YODI!",
"language": "fr",
"voice": "default",
"speed": 1.0
}' \
-o audio.mp3
Example Response​
{
"message": "SUCCESS",
"error": false,
"data": {
"audioUrl": "https://admin.yodi.tg/media/tts/abc123.wav",
"duration": 3.2,
"format": "wav"
},
"status": 200
}
Available Languages​
mina— Minaewe— Ewefr— Frenchtem— Tem (Kotokoli)
Use Cases​
- Podcast generation
- Mobile app voiceovers
- Accessibility features
- Educational content
- IVR systems