Devnagri
Blackbird ASR
API documentation

Blackbird ASR

Speech recognition for 27 Indian languages. Send a file and get a transcript, or stream audio over a WebSocket and get words as they are spoken. Output comes in the speaker's own script, transliterated into Latin, or code-mixed the way people actually talk.

27 languages

English plus the 22 constitutionally recognised languages, two Hindi dialects, and two low-resource languages.

Code-mixed natively

Hinglish and other mixed speech is transcribed as spoken, not forced into one language.

Realtime or batch

A streaming socket with interim results, and a batch endpoint that handles hours of audio.

Built-in language ID

Leave the language out and it is identified from the audio before transcription.

What's new

Changes to the live service, newest first. Existing requests keep working unchanged: new options are off until you ask for them.

DateChangeApplies to
27 Nov 2026Phone numbers, OTPs and percentages in mixed mode. Digits read out one by one, in Hindi or English, come back as one number (नौ आठ एक एक … / "nine eight one one …" → 9811077225), including "double"/"triple" (डबल नौ → 99). Percentages and decimals keep their form: बारह प्रतिशत → 12%, साढ़े बारह प्रतिशत → 12.5%.File upload, async jobs, and the final text of live streams
27 Nov 2026Short replies kept. One-word answers such as हाँ, जी, नहीं and "ok" are no longer dropped, while silence and steady noise still return nothing. With diarize=true, a short reply between two sentences now appears as its own segment instead of being joined to the other speaker's sentence.All endpoints (the separate segment applies to diarize)
27 Nov 2026Amounts in mixed mode. Spoken amounts keep their hundreds and thousands, and the currency word stays: चौबीस सौ नौ रुपये → 2409 रुपये, बावन सौ रुपये → 5200 रुपये. The article एक stays a word (एक बार, not 1 बार).File upload, async jobs, and the final text of live streams
27 Nov 2026No more "REDACTED". The tag no longer appears in transcripts.All endpoints
27 Nov 2026Punctuation, new option punctuate=true: full stops (।), commas and question marks, with every word left exactly as transcribed.File upload, async jobs
27 Nov 2026Stereo call recordings, new option channels=split: each channel is transcribed on its own and labelled channel_1, channel_2, in time order. See Stereo call recordings.File upload, async jobs
25 Nov 2026Telephony audio. Live streams accept 8 kHz G.711 μ-law and A-law directly. See Telephony audio.Live streaming
10 Nov 2026Overlapping speech. With diarize=true, responses mark where people talk at the same time. See Overlapping speech.File upload, async jobs
30 Oct 2026Speaker diarization, option diarize=true. See Timestamps & speakers.File upload, async jobs

Feature availability

What each way of sending audio supports today. — means not available on that endpoint yet.

FeatureFile upload
/v1/transcribe
Async jobs
/v1/transcriptions
Live streaming
/v1/stream, /v1/stream_vad
27 languages, automatic language detection✓✓✓
Output modes: native, mixed, romanized✓✓✓
Amounts written correctly in mixed mode✓✓✓ on final text; interim partial text may still show the old form until the sentence closes
Phone numbers, OTPs, percentages in mixed mode✓✓✓ on final text. A long pause in the middle of a number can still split it across two final events
Short replies (हाँ, जी, नहीं, ok)✓✓✓
"REDACTED" tag removed✓✓✓
Punctuation (punctuate=true)✓✓—
Stereo channel split (channels=split)✓✓— open one stream per channel instead
Speaker diarization (diarize=true) and overlapping speech✓✓—
8 kHz telephone audio✓ WAV in PCM, μ-law or A-law, or any format ffmpeg reads✓ same as file upload✓ raw PCM, μ-law or A-law frames
Segment timestamps✓✓✓
Interim (partial) results——✓
Custom vocabulary (brand names, domain terms)———
Word-level timestamps and confidence———

Quickstart

Every request needs an API key in the Authorization header. Replace $BLACKBIRD_KEY below with yours.

# a Hindi file, native script
curl -X POST https://blackbird.devnagri.com/v1/transcribe \
  -H "Authorization: Bearer $BLACKBIRD_KEY" \
  -F "file=@call.wav" \
  -F "language=hi"

# response
{
  "id": "req_936519b3205b4330bdfcc155",
  "model": "blackbird-indic-v1",
  "text": "मैंने कल पाँच बजे तीन फ़ाइलें अपलोड कीं",
  "language": "hi",
  "language_name": "Hindi",
  "language_source": "explicit",
  "mode": "native",
  "duration_ms": 3408,
  "segments": [{"start_ms": 0, "end_ms": 3408, "text": "मैंने कल…"}],
  "processing_ms": 116,
  "queue_ms": 0
}

Authentication

Keys look like bb_live_… (production) or bb_test_…. Pass one as a bearer token:

Authorization: Bearer bb_live_t31F8uwonghgx8dWn8dB…

The header X-API-Key: <key> is accepted as an alternative. For WebSockets — where browsers cannot set headers — pass the key as the api_key field of the config frame, or as ?api_key= in the URL.

Keys are shown once. The plaintext appears only in the response that creates it; only a hash is stored. If it is lost, rotate the key rather than trying to recover it.

Keys are scoped to a project, and carry their own concurrency limit, rate limit and optional monthly quota. A key can also be restricted to specific languages or output modes — useful when you hand one to a single product surface.

Languages

Pass a code as language. Omit it to have the language identified from the audio. GET /v1/models returns this table at runtime.

GroupCodes
Indian-accented Englishen
22 constitutionally recognisedas bn brx doi gu hi kn ks kok mai ml mni mr ne or pa sa sat sd ta te ur
Hindi dialectshne (Chhattisgarhi) bgc (Haryanvi)
Low-resourcebhb (Bhili) bho (Bhojpuri)

Output modes

The same utterance, three renderings. Set mode to pick one.

ModeOutputUse it for
nativeमैंने कल पाँच बजे तीन फ़ाइलें अपलोड कीं Everything in the language's own script. The default, and what most production systems want.
mixedमैंने कल 5 बजे 3 files upload कीं Native words in native script, English and numerals in Latin. Spoken numbers become digits.
romanizedmaine kal 5 baje 3 files upload kin All Latin. Search indexing, keyword spotting, Latin-only interfaces.

Language detection

Omit language and the model identifies it first, then transcribes — one extra decoder step, not a second pass over the audio. The response always reports which happened:

FieldMeaning
language_sourceexplicit if you supplied it, detected if the model chose.
language_candidatesRanked alternatives with confidences, when detection ran.
low_confidence_languagetrue when the detected language is one the model confuses often.

Pass the language when you know it. Detection is strong for most languages but weak for hi, bho, mai and ur, which absorb their neighbours — and English speech is sometimes read as Hindi and written in Devanagari. A wrong language gives you the wrong script rather than an obvious error, so low_confidence_language is worth checking.

Audio

PropertyAccepted
Formatswav, mp3, flac, m4a/mp4, ogg, opus, webm, amr — anything ffmpeg reads
Sample rateAny, including 8 kHz telephony; resampled to 16 kHz internally
Telephony8 kHz μ-law and A-law WAV files; live streams also take raw μ-law / A-law. See Telephony
ChannelsAny; downmixed to mono
Upload size512 MB
DurationUp to 4 hours per file

The model is trained on single-speaker audio. Overlapping speakers degrade accuracy. To label who said what in a file, use diarize=true.

Telephony audio 8 kHz · μ-law · A-law

Phone calls can be sent exactly as they come off the line. There is no need to convert or resample on your side: the service converts 8 kHz audio to 16 kHz itself, and decodes G.711 μ-law and A-law natively.

WhereWhat to send
File upload and async jobs8 kHz WAV in PCM, μ-law or A-law, or any other format in the Audio table. Nothing to set.
Live streaming (/v1/stream, /v1/stream_vad)Raw audio bytes with "sample_rate": 8000 and the encoding below in the config frame.

Streaming encodings

encodingAudioBytes per sample100 ms at 8 kHzAlso accepted as
mulawG.711 μ-law (PCMU)1800 bytesulaw, mu-law, pcm_mulaw, g711_ulaw, audio/x-mulaw
alawG.711 A-law (PCMA), the usual Indian and European telephone format1800 bytesa-law, pcm_alaw, g711_alaw, audio/x-alaw
pcm_s16le16-bit signed little-endian PCM (default)21,600 bytes
pcm_f32le32-bit float little-endian PCM43,200 bytes

Any other value closes the socket with invalid_config. The ready event echoes the canonical name, so "g711_ulaw" comes back as "mulaw".

Example: an 8 kHz μ-law call

import asyncio, json, websockets

async def transcribe_call(rtp_payloads):          # raw G.711 bytes, e.g. 20 ms = 160 bytes each
    url = "wss://blackbird.devnagri.com/v1/stream"
    async with websockets.connect(url) as ws:
        await ws.send(json.dumps({
            "api_key": "bb_live_…", "language": "hi",
            "sample_rate": 8000, "encoding": "mulaw",   # or "alaw"
        }))
        async def send():
            async for chunk in rtp_payloads:
                await ws.send(chunk)                 # bytes exactly as received
            await ws.send(json.dumps({"type": "finalize"}))
        sender = asyncio.create_task(send())
        async for msg in ws:
            ev = json.loads(msg)
            if ev["type"] == "final": print(ev["text"])
            if ev["type"] == "done": break
        await sender

Platforms that wrap audio in JSON. Some calling platforms (for example Twilio media streams) deliver μ-law as base64 text inside JSON messages. Decode the base64 to bytes and send those bytes as binary frames. Do not forward the JSON.

Send audio as it arrives. Stream at the pace of the call. On /v1/stream, a very short clip pushed much faster than real time and finalized at once can come back empty; /v1/stream_vad is not affected.

Transcribe a file synchronous

POST/v1/transcribe

Transcribes and waits. Long audio is split at natural pauses internally and returned as timestamped segments. For anything over a few minutes prefer async jobs, so you are not holding a connection open.

ParameterTypeNotes
filemultipartThe audio. Alternatively send raw bytes as the request body.
languagestringOptional. Omit to auto-detect.
modestringnative (default), mixed, romanized. In mixed, spoken amounts are written as digits with the currency word kept (चौबीस सौ नौ रुपये → 2409 रुपये), and the article एक stays a word (एक बार).
diarizebooleanOptional. true labels every segment with its speaker. See Timestamps & speakers.
num_speakersintegerOptional, with diarize. Exact number of speakers, if known.
min_speakers, max_speakersintegerOptional, with diarize. A range instead of an exact number.
overlapbooleanOptional, with diarize. Default true: also returns where people talk at the same time. Send false to turn it off. See Overlapping speech.
punctuatebooleanOptional. true adds sentence punctuation (। . , ? !) to every segment and to text. Words are never changed, only punctuation is added. Default false.
channelsstringOptional. mono (default) mixes all channels into one. split transcribes each channel of a stereo recording on its own and labels segments channel_1, channel_2 in time order, which keeps agent and customer apart on two-channel call recordings. Replaces diarize when set. Billed once, for the length of the recording.

Response

FieldDescription
textThe full transcript.
segments[]start_ms, end_ms, text per segment, plus speaker when diarize=true.
speakersOnly with diarize=true: the speaker labels found, e.g. ["speaker_1", "speaker_2"].
speaker_turns[]Only with diarize=true and overlap on: speaker, start_ms, end_ms for every stretch someone talks. Two turns can cover the same time.
segments[].overlaps_withOnly on segments that another speaker talks over, e.g. ["speaker_2"].
duration_msLength of the audio.
processing_msTime spent decoding.
queue_msTime spent waiting for a GPU slot.

Timestamps are per segment, not per word. Segments break at the pauses the audio actually contains, so they line up with sentences in practice. The model does not emit word-level alignments, and none are invented. See Timestamps & speakers.

Async jobs long audio

POST/v1/transcriptions

Accepts the same fields as /v1/transcribe, returns 202 with a job id immediately, and processes in the background.

# submit
curl -X POST https://blackbird.devnagri.com/v1/transcriptions \
  -H "Authorization: Bearer $BLACKBIRD_KEY" \
  -F "file=@hour-long-call.mp3" -F "language=hi"
# -> {"id": "job_7c82399e…", "status": "queued", …}

# poll
curl https://blackbird.devnagri.com/v1/transcriptions/job_7c82399e… \
  -H "Authorization: Bearer $BLACKBIRD_KEY"

GET/v1/transcriptions/{id} — status is queued, processing, completed or failed. When completed, result holds the same object /v1/transcribe returns.

GET/v1/transcriptions — list recent jobs. DELETE/v1/transcriptions/{id} — delete a job and its stored audio.

Jobs and their uploaded audio are deleted automatically 72 hours after creation. Fetch results before then, or delete them yourself as soon as you have the transcript.

Streaming over WebSocket realtime

WS/v1/stream

Connect, send one JSON config frame, then send raw PCM as binary frames. Interim text arrives as partial events and is replaced as more audio arrives; each sentence settles into a final event at the pause that ends it.

Not on live streams yet: punctuation (punctuate), stereo channel split (channels) and speaker diarization. These work on file upload and async jobs. See Feature availability.

1 — Config frame

{
  "api_key": "bb_live_…",
  "language": "hi",          // omit or null to auto-detect
  "mode": "native",
  "sample_rate": 16000,     // 8000–96000; resampled if not 16k
  "encoding": "pcm_s16le",   // or "pcm_f32le", "mulaw", "alaw"
  "interim_results": true
}

2 — Audio frames

Send binary frames of raw mono PCM — no container, no header. Frames of roughly 100 ms are a good default. There is no minimum; the server buffers.

Phone audio: set "encoding": "mulaw" or "alaw" with "sample_rate": 8000 and send the raw G.711 bytes. See Telephony audio.

3 — Finish

Send {"type":"finalize"}. The server flushes whatever is still open, emits a last final, then a done summary, then closes.

Full example

import asyncio, json, websockets

async def transcribe(pcm_frames):
    url = "wss://blackbird.devnagri.com/v1/stream"
    async with websockets.connect(url) as ws:
        await ws.send(json.dumps({
            "api_key": "bb_live_…",
            "language": "hi",
            "mode": "native",
            "sample_rate": 16000,
            "encoding": "pcm_s16le",
        }))

        async def receive():
            async for msg in ws:
                ev = json.loads(msg)
                if ev["type"] == "partial":
                    print("~", ev["text"], end="\r")
                elif ev["type"] == "final":
                    print("#", ev["text"])
                elif ev["type"] == "done":
                    return ev["text"]

        task = asyncio.create_task(receive())
        for frame in pcm_frames:      # ~100 ms of int16 PCM each
            await ws.send(frame)
        await ws.send(json.dumps({"type": "finalize"}))
        return await task

Event reference

EventWhenFields
readyAfter the config frame is accepted. session_id, model, echoed config
languageOnce, if the language was auto-detected. language, confidence, low_confidence, candidates[]
partialWhile a sentence is still being spoken. text, start_ms, end_ms
finalWhen a sentence settles. segment_id, text, start_ms, end_ms, language
doneAfter finalize. text, duration_ms, segments[]
errorOn any failure.code, message
pongReply to {"type":"ping"}.—

Treat partial as disposable. Replace the last interim line each time one arrives, and append only on final. Partial text is a best guess at an unfinished sentence and routinely changes — including the last word — as more audio arrives.

Latency and behaviour

The model transcribes a whole clip at once rather than token by token, so streaming works by re-decoding the open sentence on a timer and closing it at a pause. Three consequences are worth designing around:

Silence is never transcribed: audio below the speech threshold is discarded rather than decoded, so background noise does not produce invented words.

Timestamps & speakers

Timestamps

Every transcript comes with timestamps. There is no parameter to turn them on; they are always returned.

WhereFieldMeasured from
POST /v1/transcribesegments[].start_ms, segments[].end_msStart of the file
Async jobsresult.segments[], same shapeStart of the file
Streamingstart_ms, end_ms on every partial and final eventStart of the stream (the first audio frame)
"segments": [
  {"start_ms": 0,    "end_ms": 3408, "text": "मैंने कल अपना बिल भरा था"},
  {"start_ms": 3920, "end_ms": 6150, "text": "लेकिन रसीद नहीं आई"}
]

Segment-level, not word-level. A segment is one stretch of speech between pauses, so segments line up with sentences or phrases in practice. The model does not produce word-level timings, and the API does not estimate them. If you need subtitles, the segments are already the right size for subtitle lines.

Speaker diarization

Add diarize=true to a file transcription or an async job and every segment says who spoke it. The file is first split into speaker turns, then each turn is transcribed on its own, so a segment never mixes two speakers. Speakers are labelled speaker_1, speaker_2, ... in the order they first speak; the labels distinguish voices, they do not identify people.

curl -X POST https://blackbird.devnagri.com/v1/transcribe \
  -H "Authorization: Bearer $BLACKBIRD_KEY" \
  -F "file=@call.mp3" -F "language=hi" \
  -F "diarize=true" -F "num_speakers=2"
{
  "text": "नमस्ते, मैं प्रिया बोल रही हूँ। हाँ जी, बताइए।",
  "speakers": ["speaker_1", "speaker_2"],
  "segments": [
    {"start_ms": 0,    "end_ms": 5690, "speaker": "speaker_1", "text": "नमस्ते, मैं प्रिया बोल रही हूँ।"},
    {"start_ms": 6260, "end_ms": 9500, "speaker": "speaker_2", "text": "हाँ जी, बताइए।"}
  ]
}
FieldNotes
diarizetrue to label speakers. Default false: the response is exactly as before, with no speaker or speakers fields.
num_speakersOptional, 1–20. Set it when you know how many people speak: it is the single biggest accuracy gain, especially when voices are similar.
min_speakers, max_speakersOptional, 1–20. A range, when you only know roughly.
overlapDefault true. Adds speaker_turns and overlaps_with (below). false returns exactly the earlier response.

Overlapping speech

When people talk over each other, the transcript still gives each stretch of audio to one speaker: whoever dominates it. With overlap on (the default) the response also says where the overlap happened:

{
  "speakers": ["speaker_1", "speaker_2"],
  "segments": [
    {"start_ms": 0, "end_ms": 7400, "speaker": "speaker_1",
     "overlaps_with": ["speaker_2"], "text": "आपकी EMI इस महीने बाउंस हो गई है, तो..."}
  ],
  "speaker_turns": [
    {"speaker": "speaker_1", "start_ms": 0,    "end_ms": 7400},
    {"speaker": "speaker_2", "start_ms": 5100, "end_ms": 6000}
  ]
}

Use it for talk-time, interruption and crosstalk analytics. On the Indic DiarBench conversations it cut the diarization error inside overlapping speech from 58% to 38%. The words spoken underneath someone else are not transcribed separately: the model hears one mixed signal and writes the louder voice.

Good to know. Diarization adds about a second per minute of audio. It works best on conversations with clear turns, and a very short reply between two long turns can be merged into a neighbour. If diarization cannot run, a request that asked for it fails with 503 diarization_unavailable rather than silently returning no speakers. Live streaming does not diarize.

Stereo call recordings

When a recording already has one speaker per channel (agent left, customer right), splitting the channels gives perfect separation, which no model can beat. Send the file with channels=split (file upload and async jobs, since 27 Nov 2026): each channel is cut at its own pauses and transcribed on its own, and the segments come back in time order labelled channel_1 (left) and channel_2 (right), with speakers listing both. It replaces diarize, and the recording is billed once for its length.

curl -X POST https://blackbird.devnagri.com/v1/transcribe \
  -H "Authorization: Bearer $BLACKBIRD_KEY" \
  -F "file=@call.wav" -F "language=hi" -F "mode=mixed" \
  -F "channels=split" -F "punctuate=true"

Without channels=split, audio with several channels is mixed down to mono. For live streams, which are mono, open one stream per channel. To split a file yourself:

# split a stereo call into one file per speaker
ffmpeg -i call.wav -af "pan=mono|c0=FL" agent.wav
ffmpeg -i call.wav -af "pan=mono|c0=FR" customer.wav

Limits and concurrency

Three independent limits apply, checked in this order:

LimitScopeExceeded
Monthly audio quotaPer key, optional402 quota_exceeded
Rate limitPer key, requests/minute429 rate_limit_exceeded + Retry-After
ConcurrencyPer key, simultaneous requests429 concurrency_limit_exceeded
Server capacityService-wide503 server_overloaded + Retry-After

Requests that exceed service-wide capacity queue briefly rather than failing outright; only a saturated queue or a timed-out wait returns 503. Retry on 429 and 503 with exponential backoff, honouring Retry-After where present.

Usage and quotas

GET/v1/usage/me — what the calling key has spent this month and what remains.

GET/v1/usage — usage across the project, bucketed by grain=hour|day|month, with optional since and until.

Usage is metered in seconds of audio submitted, for both batch and streaming. Failed requests are not billed.

Errors

Every error uses one shape, with a stable code to branch on and a request_id to quote in a support request.

{
  "error": {
    "code": "invalid_language",
    "message": "'zz' is not supported. See GET /v1/models.",
    "request_id": "req_044045f1af0241b58beb"
  }
}
StatusCodeMeaning
400invalid_audioThe audio could not be decoded.
400invalid_language / invalid_modeUnsupported value.
400no_audio / audio_too_shortNothing usable was sent.
400invalid_speakersSpeaker counts outside 1–20, or min_speakers above max_speakers.
401missing_api_key / invalid_api_keyNo key, or not a real one.
403api_key_revoked / api_key_expiredKey is no longer usable.
403language_not_allowed / mode_not_allowedRestricted by key policy.
402quota_exceededMonthly audio quota spent.
413file_too_large / audio_too_longOver the size or duration cap.
422invalid_requestMalformed parameters; see fields[].
429rate_limit_exceeded / concurrency_limit_exceededSlow down.
503server_overloadedRetry with backoff.
503diarization_unavailableSpeaker labelling could not run. Retry, or send the request without diarize.

Health and metrics

RouteAuthPurpose
GET /healthznoneLiveness. Returns 200 as soon as the process is up.
GET /readyznoneReadiness. 503 until the model is loaded and warm — point your load balancer here.
GET /metricsnonePrometheus metrics: queue depth, decode latency, GPU memory, rejections by reason.