Text to speech

Speak text aloud in Kinyarwanda, English, French, Swahili or Japanese.

Speak text

POST/v1/tts

Every 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
Response
{
  "success": true,
  "payload": {
    "audio": "SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjYx…",
    "provider": "signa",
    "lang": "rw",
    "mimeType": "audio/mpeg",
    "voice": "rw-female-1"
  }
}
FieldTypeDescription
textstringWhat to say. Up to 1,000 characters at a time; split longer text into sentences.
langstringThe language: rw, en, fr, sw or ja.
voicestring, optionalLeave it out. Every language is spoken without it. Kinyarwanda can also take rw-female-1 (its default).
speechRatenumber, optionalSpeed, from 0.5 to 2. 1 is natural.

Voices

GET/v1/tts/voices

Lists the voices you can name. No key needed.

Response
{
  "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.