Skip to main content

Text-to-Speech Service

YODI exposes two different voice endpoints:

  • POST /api/ai/tts-generic for generic audio synthesis
  • POST /api/ai/tts for the financial-agent voice workflow

Generic Audio Synthesis​

POST https://admin.yodi.tg/api/ai/tts-generic

Required​

ParameterTypeDescription
textstringText to convert
langstringCanonical language code

Supported Language​

  • ewe_Latn - Ewe

Example Request​

curl -X POST "https://admin.yodi.tg/api/ai/tts-generic" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "Bienvenue sur YODI!",
"lang": "ewe_Latn"
}' \
--output audio.wav

Response​

The endpoint returns audio bytes (audio/wav).

Financial Agent Voice Route​

POST https://admin.yodi.tg/api/ai/tts

This route runs the financial-agent workflow and accepts:

ParameterTypeDescription
inputstringAgent input

Use Cases​

  • Audio synthesis for Ewe content
  • Financial-agent workflows
  • Accessibility features
  • Voice-driven notifications

Next Steps​