Kapture 3.1
Speech to Text (ASR) for Indian languages. Send an audio file to POST /v1/speech-to-text with model=kapture_v3_1 and get the transcript back. Kapture 3.1 supports 11 languages plus automatic language detection, and a code-mix mode that keeps English words in Latin script.
Quick start
- 1
Get an API key
Create a key in the Console and replace
YOUR_API_KEYin the examples below. - 2
Install the SDK
pip install -U "fonadalabs>=4.0" - 3
Make your first request
Transcribe an audio file. Replace audio.wav with your file; send language=auto to detect the language.
from fonadalabs import ASRClient client = ASRClient(api_key="YOUR_API_KEY") result = client.transcribe_file("audio.wav", model="kapture_v3_1", language_id="hi", mode="native") print(result.text)
Overview
- One request per file, any length: long audio is split and transcribed in parallel on our side.
language=autodetects which of the 11 languages is spoken and tells you how sure it is.mode=codemixreturns English words inside Hindi, Tamil or Telugu speech in Latin script.hotwordshelps Kapture get names, brands and terms right.- Same price as Kapture V3. Auto-detect and code-mix cost nothing extra.
Request
POST https://api.fonada.ai/v1/speech-to-text with multipart/form-data and an Authorization: Bearer <API key> header.
curl -X POST "https://api.fonada.ai/v1/speech-to-text" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "model=kapture_v3_1" \
-F "file=@audio.wav" \
-F "language=hi" \
-F "mode=native"| Field | Required | Values | Default |
|---|---|---|---|
| file | Yes | Audio file: WAV, MP3, M4A, FLAC, OGG and so on. Any length. | — |
| model | Yes | kapture_v3_1 is the only value. Missing or empty: 400 missing_model; any other value: 400 invalid_model. | — |
| language | Yes | auto, a code (hi), a name (Hindi) or a tag (hi-IN). Not case-sensitive. Missing or empty: 400 missing_language. Called language_id on /v3/asr/transcribe. See Supported Languages. | — |
| mode | Yes | native or codemix. Missing or empty: 400 missing_mode. See Code-mix mode. | — |
| hotwords | No | A JSON list (["गर्वित शर्मा","यसमैडम"]) or comma-separated text, up to 500. Write them in the transcript's script. See Hot words. | — |
| hotword_boost | No | 0 to 20. Only with hotwords. Keep it near 3; high values distort the transcript. | 3 |
| fallback_language | No | A supported language. Only with language=auto: used when detection isn't confident. | — |
Optional header X-Job-Id (a UUID): the job is tracked under that id.
Automatic language detection
Send language=auto and Kapture works out which of the 11 languages is spoken. The response says which language it found and how sure it is:
language: the detected language code, e.g.hi.language_source:detectedwith auto,requestedwhen you sent a language, orfallbackwhen detection wasn't confident and yourfallback_languagewas used.language_confidence: 0 to 1, e.g.0.997. It isnullwhen you sent a language yourself.- Long audio: each part is detected on its own, so every entry in
transcript_chunkshas its ownlanguageandlanguage_confidence. The top-levellanguageis the one spoken in most of the audio.
language=en instead of auto: auto-detect is weakest on strongly accented Indian English.Add fallback_language (for example hi) to say which language to use when detection isn't confident. It works only with language=auto; with any other language the request is refused with 400 fallback_language_requires_auto.
curl -X POST "https://api.fonada.ai/v1/speech-to-text" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "model=kapture_v3_1" \
-F "file=@call.wav" \
-F "language=auto" \
-F "mode=codemix" \
-F "fallback_language=hi"Code-mix mode
| mode | What you get | Example |
|---|---|---|
| native (default) | Every word in the language's own script, exactly like Kapture V3. | घरेलू टूर पैकेज हैं … प्लान |
| codemix | English words inside Hindi, Tamil or Telugu speech come back in Latin script. | घरेलू tour package हैं … plan |
- Code-mix works with
hi,ta,teandauto. - With any other language, e.g.
bnoren, the request is refused with400 codemix_not_supportedand nothing is charged. - The response echoes
mode, so you can show which one ran.
Hot words
Send names, brands or terms that matter in your audio in hotwords, and Kapture favours them when they are spoken.
- A JSON list (
["गर्वित शर्मा","यसमैडम","आगाह"]) or comma-separated text. Up to 500. - Write each hot word in the script it should appear in. With
mode=nativethe transcript is in the language's own script, so Latin hot words likeGarvit Sharmanever match; write them asगर्वित शर्मा. Withmode=codemix, English names can stay in Latin script. - Hot words only help with words that are spoken. They never add words that aren't in the audio.
hotword_boost: 0 to 20, default 3. Keep it near 3; high values distort the transcript. Sending it withouthotwordsreturns400 hotword_boost_without_hotwords.- The response field
hotwords_countsays how many hot words were used.
# Native mode: hot words in the same script as the output
curl -X POST "https://api.fonada.ai/v1/speech-to-text" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "model=kapture_v3_1" \
-F "file=@call.wav" \
-F "language=hi" \
-F "mode=native" \
-F 'hotwords=["गर्वित शर्मा","यसमैडम","आगाह"]' \
-F "hotword_boost=3"# Code-mix mode: English names can be in Latin script
curl -X POST "https://api.fonada.ai/v1/speech-to-text" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "model=kapture_v3_1" \
-F "file=@call.wav" \
-F "language=hi" \
-F "mode=codemix" \
-F 'hotwords=["Garvit Sharma","YesMadam","आगाह"]' \
-F "hotword_boost=3"Response
JSON. Every Kapture V3 field is still there with the same name and meaning; new fields are marked.
| Field | Meaning |
|---|---|
| text | The full transcript. |
| language | The language used. With auto, the language that was detected (the one spoken in most of the audio). |
| language_sourceNew | detected (with auto), requested (when you sent a language) or fallback (auto was not confident, so fallback_language was used). |
| language_confidenceNew | 0 to 1 with auto, otherwise null. |
| modeNew | native or codemix: the mode that ran. |
| modelNew | Always kapture_v3_1. |
| hotwords_countNew | Number of hot words used. 0 when you sent none. |
| fallback_languageNew | The fallback_language you sent, otherwise null. |
| request_idNew | Unique id of this request. Send it to support when reporting a problem. |
| job_id | Job id (your X-Job-Id if you sent one). |
| audio_duration_s | Audio length in seconds. |
| num_chunks, chunk_durations_s, chunk_texts | How long audio was split, and the text of each part. |
| transcript_chunks | Per chunk: idx, text, duration_s, start_s, end_s, and now also language (plus language_confidence with auto). |
| processing_time_ms | Server processing time. |
| credits_used | Credits charged for this request. |
{
"request_id": "0b6f3c2e-5d1a-4f7b-9a3e-2c8d1e4f6a70",
"job_id": "fa2c318b-bdde-4656-8d1b-9fb83b46653a",
"model": "kapture_v3_1",
"text": "Sir, नहीं, ऐसा कुछ होता तो मैं बताता, ऐसा कुछ नहीं है Sir.",
"language": "hi",
"language_source": "detected",
"language_confidence": 1.0,
"mode": "codemix",
"hotwords_count": 0,
"fallback_language": null,
"audio_duration_s": 3.12,
"num_chunks": 1,
"chunk_durations_s": [3.12],
"chunk_texts": ["Sir, नहीं, ऐसा कुछ होता तो मैं बताता, ऐसा कुछ नहीं है Sir."],
"transcript_chunks": [
{
"idx": 0,
"text": "Sir, नहीं, ऐसा कुछ होता तो मैं बताता, ऐसा कुछ नहीं है Sir.",
"duration_s": 3.12,
"start_s": 0.0,
"end_s": 3.12,
"language": "hi",
"language_confidence": 1.0
}
],
"processing_time_ms": 62.0,
"credits_used": 0.43
}Response headers: X-Job-Id, X-Num-Chunks, X-Processing-Time-Ms, X-Credits-Used, X-Audio-Duration-Seconds, X-Model and X-Request-Id. Browser JavaScript cannot read these headers cross-origin, so read model, request_id, job_id and credits_used from the JSON body instead.
Errors
HTTP status plus {"detail": {"error": "...", "message": "..."}}. Nothing is charged for any 400 error. Required fields are checked in this order: API key (401), then model, then language, then mode. Authentication, insufficient credits, rate limit and concurrency errors are the same as Kapture V3.
| Status | error | When |
|---|---|---|
| 400 | missing_model | model missing or empty (required). The response includes supported_models. |
| 400 | invalid_model | model is not kapture_v3_1. The response includes supported_models. |
| 400 | missing_language | language missing or empty (required). Replaces missing_language_id. |
| 400 | missing_mode | mode missing or empty (required). The response includes supported_modes: ["native", "codemix"]. |
| 400 | invalid_mode | mode is not native or codemix. The response includes supported_modes. |
| 400 | codemix_not_supported | mode=codemix with a language other than hi, ta, te or auto. The response includes supported_languages. |
| 400 | unsupported_language | Unknown language. |
| 400 | invalid_hotwords | hotwords is not a JSON list of strings or comma-separated text. |
| 400 | too_many_hotwords | More than 500 hot words. |
| 400 | invalid_hotword_boost | hotword_boost is not a number from 0 to 20. |
| 400 | hotword_boost_without_hotwords | hotword_boost sent without any hotwords. |
| 400 | fallback_language_requires_auto | fallback_language sent with a language other than auto. |
| 400 | invalid_fallback_language | fallback_language is not a supported language. |
| 400 | empty_audio / invalid_audio | The file is empty or cannot be read. |
| 401 | — | Missing or invalid API key. |
| 422 | — | No file field. FastAPI shape: detail is a list of { loc, msg }. |
| 429 | rate_limit_exceeded / concurrent_limit_exceeded | Too many requests. Same limits as Kapture V3, shared between both endpoints. |
| 502 | upstream_unavailable and similar | Transcription failed on our side. Credits are refunded automatically. |
{
"detail": {
"error": "codemix_not_supported",
"message": "mode=codemix supports hi, ta, te; got language 'bn'.",
"supported_languages": ["hi", "ta", "te"]
}
}Code examples
async function transcribe(file, { language = "auto", mode = "native", hotwords = [] } = {}) {
const form = new FormData()
form.append("file", file)
form.append("model", "kapture_v3_1")
form.append("language", language) // "auto", "hi", "ta", ...
form.append("mode", mode) // "native" or "codemix"
if (hotwords.length) form.append("hotwords", JSON.stringify(hotwords)) // optional
const res = await fetch("https://api.fonada.ai/v1/speech-to-text", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.FONADA_API_KEY}` },
body: form,
})
const body = await res.json()
if (!res.ok) throw new Error(body.detail?.message || res.statusText)
return body // body.text, body.language, body.language_confidence, body.mode
}
// Only offer code-mix where it is supported
const CODEMIX_LANGS = ["auto", "hi", "ta", "te"]
const codemixAllowed = (lang) => CODEMIX_LANGS.includes(lang)import requests
with open("audio.wav", "rb") as f:
res = requests.post(
"https://api.fonada.ai/v1/speech-to-text",
headers={"Authorization": "Bearer YOUR_API_KEY"},
files={"file": f},
data={"model": "kapture_v3_1", "language": "auto", "mode": "native"},
timeout=600,
)
res.raise_for_status()
body = res.json()
print(body["language"], body["language_confidence"])
print(body["text"])Python SDK
Always pass model="kapture_v3_1", language_id and mode: all three are required on every call.
pip install -U "fonadalabs>=4.0"Upgrading from SDK 3.x
- Run
pip install -U "fonadalabs>=4.0". - Add
model=to every call; it is required now. klone_v2_flash→klone_v3_flashv2(Pro) →klone_v2_pro- ASR
v3→kapture_v3_1 last_stream_info.credits_charged→last_stream_info.credits_used
from fonadalabs import ASRClient
client = ASRClient(api_key="YOUR_API_KEY")
try:
result = client.transcribe_file(
"audio.wav",
model="kapture_v3_1", # required
language_id="hi", # required
mode="native", # required: native or codemix
)
print(f"Language : {result.language_id}")
print(f"Text : {result.text}")
print(f"Duration : {result.audio_duration_s}s")
print(f"Credits : {result.credits_used}")
finally:
client.close()from fonadalabs import ASRClient
client = ASRClient(api_key="YOUR_API_KEY")
result = client.transcribe_file(
"audio.wav",
model="kapture_v3_1", # required
language_id="auto", # required; auto detects the language
mode="codemix", # required; codemix: English words in Latin script (hi, ta, te or auto)
)
print(result.text)
print(result.language_id, result.language_source, result.language_confidence, result.mode)Supported Languages
11 languages, the same as Kapture V3, plus auto. Any other language returns 400 unsupported_language before credits are charged.
| Code | Language | Code-mix |
|---|---|---|
| auto | Detect automatically | Yes |
| hi | Hindi | Yes |
| ta | Tamil | Yes |
| te | Telugu | Yes |
| bn | Bengali | No |
| en | English | No |
| gu | Gujarati | No |
| kn | Kannada | No |
| ml | Malayalam | No |
| mr | Marathi | No |
| or | Odia | No |
| pa | Punjabi | No |
Pricing
Priced per hour, billed per second of audio. Unchanged from Kapture V3.
| Model | Price | Credits | Billing |
|---|---|---|---|
| Kapture 3.1 | ₹6 per hour | ~500 credits | Billed per second |
Auto-detect and code-mix cost nothing extra. See the full pricing page.
Previous version
POST /v3/asr/transcribe (Kapture V3) and its alias POST /v2/asr/transcribe still work unchanged, but new integrations should use POST /v1/speech-to-text.
- Change the URL, add
model=kapture_v3_1, renamelanguage_idtolanguage, and always sendmode. - Stop reading
bucketandstorage_prefix: they are removed (they were always null). - Handle the new errors
missing_model,missing_language,missing_mode,invalid_mode,codemix_not_supported, and the hot word and fallback errors listed under Errors.
form.append("file", file)
form.append("language_id", "hi")
fetch(BASE + "/v3/asr/transcribe", ...)form.append("file", file)
form.append("model", "kapture_v3_1")
form.append("language", "auto")
form.append("mode", "native")
fetch(BASE + "/v1/speech-to-text", ...)FAQ
model=kapture_v3_1 is required on every request and SDK call. Without it the API returns 400 missing_model.