Skip to content

KhasbhaSTT turns recordings into text: phone calls, WhatsApp voice notes, videos, interviews. It's built for the way people speak in the Maghreb. It writes darija the way it's said, keeps the French and English words people mix in, in Latin letters, and can tell the people on a call apart. Send a file to one endpoint, POST /stt, and the transcript comes back in the response.

For speech you need while it happens, such as a call in progress or dictation, use KhasbhaSTT LIVE: it takes audio over a WebSocket and writes while people talk.

You'll need an API key and some API credit: see Get Your API Key. KhasbhaSTT costs 3 DA a minute of audio, billed per second. The examples use the official SDKs, which read the key from the VOICE213_API_KEY environment variable. To try it without code first, open Speech to text in the Developer workspace.

​Transcribe a file

Send the recording as multipart/form-data, in a field named file. The SDKs do it for you from a path or the file's bytes, and in Python from an open file too. Nothing else is required: without other fields, KhasbhaSTT expects Algerian darija.

curl -X POST https://api.voice213.com/api/v1/stt \
  -H "Authorization: Bearer $VOICE213_API_KEY" \
  -F "file=@voice-note.ogg"

Send the recording as it is, in any common audio or video format: see Files and limits. Keep its name's extension, such as .ogg or .mp3: it helps Voice213 recognize the format. The SDKs send the file's name with it. A successful response looks like this:

{
  "success": true,
  "text": "السلام عليكم، la commande تاعي وصلت اليوم الصباح، بصح الصباط جا صغير شوية. واش نقدر نبدلو بنمرة أكبر؟",
  "model": "khasbha-stt",
  "language": "ar",
  "dialect": "algerian",
  "durationSeconds": 9.84,
  "billableSeconds": 30,
  "cost": 1.5,
  "currency": "DZD",
  "remainingCredit": 4998.5
}
  • text is the transcript. A recording without speech, such as silence, gives an empty text.
  • durationSeconds is the exact length of the audio, and billableSeconds what you paid for: the length rounded up to the second, and at least 30 seconds.
  • cost is what the transcription cost in dinars (DZD), and remainingCredit your API credit after it.
  • language and dialect are what the recording was transcribed as. dialect is null for French and English.

The SDKs return the same fields, without success, in snake_case in Python (transcript.billable_seconds).

​Send a URL instead

If the recording is already online, send its address as JSON instead of uploading it. The optional fields are the same. With the SDKs, pass url instead of file: transcribe({ url }) in JavaScript, transcribe(url=...) in Python.

curl -X POST https://api.voice213.com/api/v1/stt \
  -H "Authorization: Bearer $VOICE213_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://cdn.example.com/calls/2026-11-20-1432.mp3", "speakers": true}'
  • The address must be a public http:// or https:// URL of the file itself, not of a page that plays it. A link to your own storage works well, signed or not, as long as it's valid when Voice213 downloads it.
  • Voice213 downloads the file, following redirects. It must be 100 MB or smaller and arrive within 60 seconds.
  • An address that isn't a public http:// or https:// URL, such as one on a private network or whose host doesn't exist, gets 400 INVALID_URL. A file that can't be downloaded in time, or whose server answers with an error, gets 400 FETCH_FAILED, and one over 100 MB gets 413 FILE_TOO_LARGE. None of them is charged.

​Languages and dialects

Set the language of the recording with language, and for Arabic the dialect with dialect:

SpeechlanguagedialectNative name
Algerian darijaDefaultaralgerianالدارجة الجزائرية
Tunisian darijaartunisianالدارجة التونسية
Libyan darijaarlibyanاللهجة الليبية
Frenchfr—Français
Englishen—English
  • Leave both out and the recording is transcribed as Algerian darija.
  • The dialect tunes the transcription to its words and to the way they're said. Choose the speaker's own dialect.
  • dialect applies to Arabic only. With fr or en it's ignored, and the response's dialect is null, but a value that isn't one of the three names still gets 400 INVALID_DIALECT.
  • Speech in Modern Standard Arabic, or in another Arabic dialect, is transcribed with ar too, word for word.
  • dialect takes the names only. Unlike Text to Speech, the numbers 1, 2 and 3 get 400 INVALID_DIALECT.

People in the Maghreb mix darija and French in the same sentence. Keep ar for those recordings: the French words come out in Latin letters inside the Arabic text, the way people write them in messages.

راني نستنى la livraison من السبت، و le suivi ما يبان فيه والو.

With fr or en it works the other way round: the transcript is in Latin letters, and the Arabic and darija words in it are in Arabic script.

Bonjour, j'ai bien reçu la commande, mais la taille est trop petite. يعني لازم نبدلها.

​Options

Three optional fields shape the transcript:

FieldDefaultWhat it does
speakersNot setHow the people speaking are told apart. See Speakers.
punctuationtruefalse leaves punctuation marks out.
profanityfalsetrue hides swear words behind ***.

In a multipart form every value is text: send true or false. In a JSON body, booleans work too. Any other value gets 400 INVALID_OPTION, with the field's name in field. The SDKs take booleans, and send them the right way for each.

​Speakers

On a recording with several voices, such as a phone call, speakers chooses between three layouts. Here's the same call each way.

Not set: each change of speaker starts a new line, beginning with - .

- ألو، السلام عليكم، راني نعيط على la commande تاعي.
- وعليكم السلام، مرحبا بيك. واش هو الاسم من فضلك؟
- كريم بن علي. خلصت par carte نهار الخميس وما زال ما وصلني والو.
- مليح، la commande تاعك خرجت البارح، توصلك غدوة إن شاء الله.

true: each line starts with the speaker's number, «المتحدث 1:» in Arabic, Speaker 1: in English and Intervenant 1: in French. The same person keeps the same number from start to finish.

المتحدث 1: ألو، السلام عليكم، راني نعيط على la commande تاعي.
المتحدث 2: وعليكم السلام، مرحبا بيك. واش هو الاسم من فضلك؟
المتحدث 1: كريم بن علي. خلصت par carte نهار الخميس وما زال ما وصلني والو.
المتحدث 2: مليح، la commande تاعك خرجت البارح، توصلك غدوة إن شاء الله.

false: one continuous text, without line breaks.

ألو، السلام عليكم، راني نعيط على la commande تاعي. وعليكم السلام، مرحبا بيك. واش هو الاسم من فضلك؟ كريم بن علي. خلصت par carte نهار الخميس وما زال ما وصلني والو. مليح، la commande تاعك خرجت البارح، توصلك غدوة إن شاء الله.

In text, the lines are separated by a line break (\n). A recording with a single voice comes without dashes or labels, whatever you choose.

​Punctuation

By default the transcript has simple punctuation where the speech pauses: commas, full stops and question marks («، . ؟» in Arabic). With punctuation: false it has none, which suits search indexes and text you process further:

السلام عليكم la commande تاعي وصلت اليوم الصباح بصح الصباط جا صغير شوية واش نقدر نبدلو بنمرة أكبر

​Swear words

With profanity: true, swear words and slurs become ***, and the rest of the sentence stays as it was said:

ثلاثة أيام وأنا نستنى la livraison، *** هادي ماشي خدمة!

​What the transcript looks like

KhasbhaSTT writes down what was said, the way it was said:

  • Word for word. Hesitations and repeated words stay in. Nothing is rephrased, summarized, corrected or translated into Modern Standard Arabic.
  • Darija in Arabic script, spelled the way it's pronounced, without tashkeel.
  • French and English words in Latin letters inside Arabic text, and Arabic words in Arabic script inside French or English text.
  • Only speech. Music, laughter and silence aren't described: you won't find notes such as [musique] or (ضحك).
  • Nothing when nothing is said. A silent recording, or one without speech that can be made out, gives "text": "". It's still billed: the audio was processed.

​Files and limits

  • Any common format. Send the recording as it is: MP3, WAV, M4A, AAC, OGG and Opus (WhatsApp voice notes), AMR (phone recordings), FLAC or WebM, or a video such as MP4, MOV, MKV or AVI, whose sound is transcribed. A file Voice213 can't find any audio in gets 400 INVALID_MEDIA.
  • Up to 100 MB, uploaded or at a URL. A larger file gets 413 FILE_TOO_LARGE.
  • Up to 30 minutes of audio. A longer recording gets 400 AUDIO_TOO_LONG, before anything is charged. Split it into parts: see Tips.
  • Small files are fine. Speech doesn't need studio quality: a mono MP3 at 64 kbps transcribes as well as a large WAV, and uploads faster.
LimitKhasbhaSTTKhasbhaSTT LIVE
Longest audio30 minutes per file1 hour per session
Largest file100 MB, uploaded or at a URL—
AudioAudio and video files16-bit PCM, mono, 16 kHz, streamed
At once20 per key, shared with voice-overs5 sessions per account
Requests per minute and per dayEach transcription counts once Voice213 starts reading its audio, even if it's then refusedEach token counts once
Downloading a URLWithin 60 seconds—
Session token—Single use, valid 2 minutes
Custom vocabulary—Up to 50 terms of up to 40 characters
Without audio—A session ends after 60 seconds
Socket messages—Up to 64 KB each

Each transcription takes one of your account's 20 places for requests running at once, shared with voice-overs, until it ends. Once 20 are running, the next one gets 429 Rate limit exceeded: Concurrent request limit exceeded: retry when one has finished. While a transcription runs, its price is set aside from your API credit, so one that arrives while others run is refused with 402 INSUFFICIENT_CREDIT when what's left can't cover it. See Rate Limits.

​Pricing

ModelmodelPer minutePer hourBilling
KhasbhaSTTkhasbha-stt3 DA180 DAPer second, at least 30 seconds per file
KhasbhaSTT LIVEkhasbha-stt-live5 DA300 DAPer second, at least 15 seconds per session
  • A file is billed for the length of its audio, per second, rounded up to the whole second, with a minimum of 30 seconds: a 12-second voice note costs the same as a 30-second one, 1.50 DA.
  • The whole recording counts, silences included.
  • The cost is billable seconds × price per minute ÷ 60, rounded to four decimals. It's taken from your API credit only when the transcription succeeds: a transcription that fails (502 TRANSCRIPTION_FAILED) costs nothing, and neither does a file refused as too long or unreadable.
  • To know the price before you send a file, send its length to Estimate Transcription Cost. It's free.

What some typical recordings cost at today's prices:

ExampleModelBilledCost
A 20-second voice noteKhasbhaSTT30 seconds, the minimum1.50 DA
A 3-minute callKhasbhaSTT3 minutes9.00 DA
1,000 voice notes of 30 secondsKhasbhaSTT1,000 × 30 seconds1,500 DA
A 10-minute live sessionKhasbhaSTT LIVE10 minutes50.00 DA
One hour liveKhasbhaSTT LIVE1 hour300 DA

The 1,000 voice notes are 1,000 requests of 30 seconds each, right at the minimum, so they cost the same as 500 minutes of audio in longer files. See API Pricing & Limits to top up your API credit.

​Tips

  • Choose the speaker's dialect. The transcription is tuned to it: for calls from Tunisia, send "dialect": "tunisian".
  • Turn speakers on for calls. Numbered speakers make a call easy to read, search and summarize.
  • Trim long silences before you send a recording, such as the hold music at the start of a call: every second is billed.
  • Keep the transcript. There's no endpoint to fetch it again later, so save text when you receive it.
  • Run several files at once, up to 20 per account, through a queue with a fixed number of workers, like the one in Rate Limits.
  • Give long files time. A long recording takes a while to upload and transcribe. The SDKs wait up to 10 minutes for the answer; raise their timeout for large files on a slow connection. With another HTTP client, set a timeout of 10 minutes or more: in Node.js, the built-in fetch stops waiting after 5.
  • Split recordings longer than 30 minutes into parts, for example of 25 minutes with ffmpeg, then send each part:
ffmpeg -i meeting.mp3 -f segment -segment_time 1500 -c copy part-%02d.mp3

​Next steps

Was this page helpful?