Text To Sound
Turn up to 2,500 characters into a WAV file: mono, 24 kHz, 16-bit. Short text returns the audio at once; text longer than 220 characters returns 202 and a status URL to poll.
POST
https://borminto.com/api/v1/voice/speech
Request
textstring · required- The exact words to speak, with at least one letter or number.
voicestring · required- A voice from
GET /api/v1/voice/capabilities. languagestring · required- Such as
ar-EG,aroren-US. Idempotency-Keyheader · recommended- A retry with the same key and input returns the saved audio for 24 hours without another charge.
Prefer: respond-asyncheader · optional- Use the 202 flow for short text too.
Background generation
Poll status_url until status is complete or failed, then fetch audio_url. Both need the same key. Read X-Audio-Duration-Ms on the audio for its length. Only successful audio uses the allowance.
Errors
| Status | Code | What to do |
|---|---|---|
| 401 | authentication_required | The key is missing or revoked. Send a current bv_ key. |
| 402 | allowance_exhausted | The allowance has been used. allowance_expired means the plan has ended. |
| 403 | application_suspended | The application is suspended. Contact the administrator. |
| 409 | idempotency_conflict | The same Idempotency-Key was sent with different input. Use a new key for new input. |
| 422 | invalid_request | A field, the audio or the Idempotency-Key is not valid. Audio problems use codes such as no_speech or audio_too_long. |
| 429 | rate_limited | Too many requests. Wait for Retry-After seconds. |
| 503 | voice_unavailable | Temporarily unavailable. Retry after Retry-After with the same Idempotency-Key. |
| 410 | speech_expired | The saved audio has expired. Generate again with a new Idempotency-Key. |