POST https://api.lokutor.com/v1/speech-to-text transcribes a recording and, when you ask for it, says which speaker said each word. The request and response follow the ElevenLabs Speech to Text (Scribe) shape, so a client written for that API works by changing the base URL and the key.
What it is, honestly
Diarization splits a recording into speakers and numbers themspeaker_0, speaker_1, … in order of first appearance.
- Where it works well: English meetings. On a real 60-minute, 5-person meeting from the AMI corpus it measured a diarization error rate of 8.0%, found 5 of 5 speakers, and attributed 99.4% of words to the right speaker.
- Where it does not: very short interjections (“yeah”, “mm”) and overlapping speech are missed or given to the wrong speaker.
- Not yet measured: telephone-quality audio and non-English audio. Treat the speaker labels there as unverified.
/stt/transcribe, with greedy decoding (not the language-model beam).
Request
multipart/form-data. Authenticate with xi-api-key: YOUR_KEY, X-API-Key: YOUR_KEY or Authorization: Bearer YOUR_KEY.
Response
language_code: ISO-639-3 (eng,spa, …).language_probabilityis1.0when you passedlanguage_codeandnullwhen the language was detected.text: the full transcript, formatted.words[].type:word, orspacingfor the gap between words.words[].speaker_id:speaker_0for everything whendiarizeis false.
Errors
Errors use the ElevenLabs shape, with the HTTP status you would expect:Limits
- Audio length for
diarize=true: 7,200 seconds (2 hours). - File size: 10 MB without diarization; 256 MB with it. Two hours of 16 kHz mono WAV is 219 MB; stereo or 44.1 kHz audio of that length is larger than the limit, so send 16 kHz mono (or cut the file).
- One diarization request at a time per account. Without diarization the usual concurrency rules apply.
- Speaker labels run on a CPU service, so they are not real time. If no diarization has run in the last 10 minutes, the first request waits about a minute while the service starts; requests that follow within 10 minutes start at once. Processing takes about 11 minutes for an hour of audio, so a two-hour file takes about 22 minutes. Keep the connection open and set your client timeout to at least 45 minutes. There is no polling endpoint: the answer arrives on the same connection.
Pricing
Transcription is billed per audio minute at the speech-to-text rate. Speaker labels are a separate line on top:stt_diarization_per_minute per audio minute (on the rate card, GET /v1/pricing). At the current card that is $0.0017 per audio minute ($0.10 per hour, $0.20 for a two-hour file), with no minimum: a short file costs its length. Together with transcription ($0.0014 per minute) a diarized minute is $0.0031. A request that fails, or is answered 503 diarization_busy, is not billed.
Differences from ElevenLabs
words[].textis spoken-form (lower case, no punctuation); the top-leveltextis formatted.- No
logprobfields. - No
audio_evententries;tag_audio_eventsis ignored. language_probabilityis1.0whenlanguage_codeis given andnullwhen detected (ElevenLabs returns an estimated probability).- A word’s
endis the frame its last piece was emitted at, so words are short andspacingentries carry the gaps between them. - Speakers are numbered by first appearance (
speaker_0is whoever speaks first). - Languages:
ca de en es eu fr gl it ptonly. - WAV input only for now.
- Greedy decoding, not the language-model beam.
- Not implemented:
webhook,cloud_storage_url,additional_formats,entity_detection,keytermson this route.
Also on /stt/transcribe
POST /v1/stt/transcribe accepts diarize and num_speakers too, and returns Lokutor’s own shape: the usual fields plus turns (consecutive speech by one speaker) and segments, exactly as the recogniser produces them. Same limits and errors (in Lokutor’s error shape).