Real-time professional translation and high-fidelity speech synthesis.
Base URL: https://african-tts.vercel.app
| Interactive docs: /docs
/api/translate
Translate English text to Asante Twi. Fast and lightweight — no audio synthesis.
{
"english_text": "Good morning!"
}
{
"translated_text": "Mema wo akye!"
}
curl -X POST "https://african-tts.vercel.app/api/translate" \
-H "Content-Type: application/json" \
-d '{"english_text": "Good morning!"}'
/api/translate-twi
Translate Asante Twi text to English.
| Field | Type | Description |
|---|---|---|
twi_text
|
string | The Twi text to translate. |
{
"twi_text": "Mereba fie."
}
{
"translated_text": "I am coming home."
}
curl -X POST "https://african-tts.vercel.app/api/translate-twi" \
-H "Content-Type: application/json" \
-d '{"twi_text": "Mereba fie."}'
/api/tts
Translate English to Twi and synthesize to speech. Returns a playable audio URL.
| Field | Type | Description |
|---|---|---|
english_text |
string | English input (translates automatically) |
twi_text
|
string | Twi input (skips translation step) |
speaker
|
string | "Female" |
"Male (Low)" | "Male (High)"
|
{
"english_text": "I am coming home.",
"speaker": "Female"
}
{
"twi_text": "Mereba fie.",
"audio_url": "data:audio/wav;base64,..."
}
curl -X POST "https://african-tts.vercel.app/api/tts" \
-H "Content-Type: application/json" \
-d '{"english_text": "I am coming home.", "speaker": "Female"}'
curl -X POST "https://african-tts.vercel.app/api/tts" \
-H "Content-Type: application/json" \
-d '{"english_text": "I am coming home.", "speaker": "Male (Low)"}'
/api/tts-english
Translate Asante Twi to English and synthesize to speech. Returns a playable audio URL.
| Field | Type | Description |
|---|---|---|
twi_text
|
string | The Twi text to translate and synthesize. |
include_audio |
boolean | Whether to include audio in the response. |
curl -X POST "https://african-tts.vercel.app/api/tts-english" \
-H "Content-Type: application/json" \
-d '{"twi_text": "Mereba fie.", "include_audio": true}'
curl -X POST "https://african-tts.vercel.app/api/tts-english" \
-H "Content-Type: application/json" \
-d '{"twi_text": "Mereba fie.", "include_audio": false}'