Text to speech
Speak text aloud in Kinyarwanda, English, French, Swahili or Japanese.
Speak text
/v1/ttsEvery language Signa understands is also spoken: Kinyarwanda, English, French, Swahili and Japanese. Send the text and its language. The answer carries the speech as base64 MP3, ready to save or play.
curl https://api.usesigna.org/v1/tts \
-H "Authorization: Bearer $SIGNA_KEY" \
-H "Content-Type: application/json" \
-d '{"text": "Muraho neza", "lang": "rw", "voice": "rw-female-1"}' \
| jq -r .payload.audio | base64 -d > muraho.mp3{
"success": true,
"payload": {
"audio": "SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjYx…",
"provider": "signa",
"lang": "rw",
"mimeType": "audio/mpeg",
"voice": "rw-female-1"
}
}| Field | Type | Description |
|---|---|---|
text | string | What to say. Up to 1,000 characters at a time; split longer text into sentences. |
lang | string | The language: rw, en, fr, sw or ja. |
voice | string, optional | Leave it out. Every language is spoken without it. Kinyarwanda can also take rw-female-1 (its default). |
speechRate | number, optional | Speed, from 0.5 to 2. 1 is natural. |
Voices
/v1/tts/voicesLists the voices you can name. No key needed.
{
"success": true,
"payload": {
"voices": [
{ "id": "rw-female-1", "lang": "rw", "gender": "female", "default": true }
],
"languages": ["rw", "en", "fr", "sw", "ja"]
}
}All five languages are spoken: English, French, Swahili and Japanese as well as Kinyarwanda. You only need text and lang. The list above is the named voices you may pick, which today is Kinyarwanda's; a voice that does not match the language is answered 400.
Usage
Each request counts the characters spoken, shown in your usage next to signing. Speech is also a good partner for signing: send the same text to both, and play the audio while the signer signs.