Aller au contenu principal

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​

ParameterTypeDescription
textstringText to convert

Optional​

ParameterTypeDefaultDescription
languagestringfrLanguage code
voicestringdefaultVoice ID
speedfloat1.0Speaking speed (0.5 - 2.0)
pitchfloat1.0Voice pitch (0.5 - 2.0)
audioFormatstringmp3'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 — Mina
  • ewe — Ewe
  • fr — French
  • tem — Tem (Kotokoli)

Use Cases​

  • Podcast generation
  • Mobile app voiceovers
  • Accessibility features
  • Educational content
  • IVR systems

Next Steps​