TTS (Text-to-Speech)

Convert text into natural-sounding audio with high-fidelity neural speech synthesis.

Convert text into natural-sounding audio with high-fidelity neural speech synthesis optimized for African languages.

Overview

Our TTS service generates natural-sounding speech from text. It supports multiple voices and languages, with proper pronunciation and local accents for African languages.

Basic Usage

To synthesize speech from text:

curl https://api.lesan.ai/synthesize \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "ሰላም፣ እንኳን ደህና መጡ።",
    "voice_id": "am-female-1",
    "speed": 1.0,
    "format": "mp3"
  }' \
  --output audio.mp3

Parameters

  • text - The text to synthesize (required)
  • voice_id - Voice identifier (e.g., "am-female-1") (required)
  • speed - Speech speed multiplier (default: 1.0)
  • format - Audio format: "mp3" or "wav" (default: "mp3")

Available Voices

Different voices are available for each language. Check the API reference for the complete list of available voices.

For detailed API documentation, see the API Reference.