Vulavula Logo
Speech To Text (STT)

Sync Transcribe

Send an audio file and receive the transcript in the same HTTP request/response cycle — no webhooks or polling required. Optionally, the endpoint can also label who spoke when (diarisation) and detect music such as hold tones.

Code
POST https://api.lelapa.ai/v1/transcribe/sync

New here? Get an API key first

Every request needs an API key in the X-CLIENT-TOKEN header. Sign up at vulavula.lelapa.ai, generate a key, and you're set — every account includes 100 free API calls per month. See Authentication for the full walkthrough.

Processing time

Processing may take up to 2min30s, or fail altogether, on long, low-quality, or complex audio. Keep clips short where you can.

Request

Headers

HeaderTypeRequiredDescription
X-CLIENT-TOKENstringYesYour API key — see Authentication
Content-TypestringYesMust be set to multipart/form-data

Form data

ParameterTypeRequiredDescription
filefileYesThe audio file to transcribe

Supported audio formats: WAV, MP3, FLAC, AAC, OGG, MP4, AIFF, OPUS.

Query parameters

ParameterTypeRequiredDescription
lang_codestringNoLanguage code for transcription. If not specified, the language is auto-detected.
diarisebooleanNoLabel segments and words with speaker IDs (default: false). Sesotho returns segments only — see Word-level results
detect_musicbooleanNoDetect music, such as music-on-hold (default: false)

Supported language codes

CodeLanguage
afrAfrikaans
zulisiZulu
sotSesotho
engSouth African English
fraAfrican French

Note: our zul (isiZulu) support is code-switched isiZulu.

See Language Support for the current status of every language, and the model cards for details on model performance.

Example request

Code
import requests API_KEY = "<INSERT-TOKEN>" with open("recording.wav", "rb") as f: response = requests.post( "https://api.lelapa.ai/v1/transcribe/sync", headers={"X-CLIENT-TOKEN": API_KEY}, files={"file": ("recording.wav", f, "audio/wav")}, params={ "lang_code": "<INSERT-LANGUAGE-CODE>", # optional "diarise": 1, # optional }, ) print(response.json()["transcription_text"])

Prefer not to hand-roll HTTP calls? The Python SDK wraps transcription in a single method call.

Response

A successful request returns 200 OK with the transcript and audio metadata. The example below shows a diarised, two-speaker call with detect_music enabled:

JSONCode
{ "id": "5f15e81b-53c2-4c5c-a779-1f6776100543", "upload_file_size": null, "audio_length_seconds": 20.0, "sample_rate": null, "channels": null, "frame_rate": null, "mime_type": null, "language_code": "eng", "warnings": null, "diarisation_result": { "timeline": [ { "start_time": 0.0, "end_time": 2.14, "type": "silence" }, { "start_time": 2.14, "end_time": 10.54, "type": "speech", "speaker_id": "speaker0", "text": "Thank you so much for calling. You're through to Thandi, how can help you?" }, { "start_time": 10.54, "end_time": 15.98, "type": "speech", "speaker_id": "speaker1", "text": "Hi, Thandi, I would like to settle my bill for yesterday." }, { "start_time": 15.98, "end_time": 20.0, "type": "music" } ], "words": [ { "word": "Thank", "start_time": 2.14, "end_time": 2.45, "confidence": 0.94, "weight": null, "word_intensity": null, "best_path": true, "speaker_id": "speaker0" }, { "word": "you", "start_time": 2.45, "end_time": 2.60, "confidence": 0.91, "weight": null, "word_intensity": null, "best_path": true, "speaker_id": "speaker0" } // More words would follow here... ] }, "transcription_text": "Thank you so much for calling. You're through to Thandi, how can help you? Hi, Thandi, I would like to settle my bill for yesterday.", "transcription_status": "COMPLETED", "error_message": null, "status_datetime": "2025-04-16T10:45:00Z", "upload_datetime": "2025-04-16T10:43:12Z" }

Response fields

FieldTypeDescription
idstringUnique identifier for this transcription
transcription_textstringThe full transcript
transcription_statusstringCOMPLETED on success
language_codestringThe language used — either your lang_code or the auto-detected language
audio_length_secondsnumberDuration of the submitted audio
diarisation_resultobjectPresent when diarise=1: a timeline of silence/speech/music segments with speaker IDs and text, plus per-word timings and confidence in words (not returned for Sesotho)
error_messagestringPopulated when transcription fails

Word-level results

Sesotho does not return word-level results

For Sesotho (sot), diarisation_result contains only timeline. The words key is left out of the response, so check that it exists before reading it.

You still get who spoke when, and the text of each turn, from timeline. What is not available for Sesotho:

  • Word timings — the start and end time of each word. Captions, search and click-to-play can only work at the level of a whole speaker turn.
  • Per-word speaker IDs — speaker labels apply to a whole turn, and the text at the edge of a turn may be attached to the neighbouring speaker.
  • Per-word confidence — there is no score to filter or flag individual words with.

If your integration handles several languages, treat words as optional:

Code
result = response.json()["diarisation_result"] words = result.get("words") or [] # empty for Sesotho for segment in result["timeline"]: if segment["type"] == "speech": print(segment["speaker_id"], segment["text"])

Errors

StatusMeaning
400 Bad RequestThe request was malformed or contained invalid data
401 UnauthorizedThe client token is missing or invalid
413 Payload Too LargeFile size exceeds the limit
415 Unsupported Media TypeInvalid audio file format
422 Unprocessable EntityThe request body failed validation
500 Internal Server ErrorAn unexpected error occurred on the server
503 Service UnavailableTemporary overload — retry later
504 Gateway TimeoutService downtime — retry later

Next steps

Last modified on