Create transcript
Transcribe an audio or video file and get the full transcript in the response.
Upload a recording as multipart/form-data (a file plus form fields, not JSON). The response is the complete transcript, returned once the whole file is processed. Requires an API key with all permission.
from wistfareai import WistfareAI
client = WistfareAI() # reads WISTFARE_API_KEY
transcript = client.speech_to_text.convert(
file="standup.m4a", # path, bytes, binary file object or ("name.m4a", data)
model="wistfare-stt-v3-beta",
language="auto",
timestamps="word",
key_terms=["Wistfare", "Nyabugogo", "MTN MoMo"],
punctuation=True,
)
print(transcript.id, transcript.duration, transcript.cost_cents)
print(transcript.text)Request
Headers
| Header | Description |
|---|---|
Authorization | Bearer wv_sk_…, a key with all permission. |
Idempotency-Key | Optional. Retry with the same key and file to get the original response instead of a second charge. See Idempotency. |
X-Request-Id | Optional. Your correlation id, echoed in the response. |
Body (multipart/form-data)
| Field | Type | Default | Description |
|---|---|---|---|
file | file | required | The audio or video to transcribe: MP3, WAV, M4A, MP4, WEBM, OGG, FLAC or AAC. Up to 128 MB and 30 minutes. |
model | string | wistfare-stt-v3-beta | wistfare-stt-v3-beta, wistfare-stt-v2-beta or wistfare-stt-v1-beta (aliases wistfare-stt-1, wistfare-stt-fast). |
language | string | auto | auto, rw, en, fr or sw; with v3 also lg and rn. |
timestamps | boolean | true | Include words with start and end times. |
diarize | boolean | false | Label speakers (v3): 1 … 4 on words and segments, up to 4 speakers. See Speaker labels. For explicitly named v1/v2 the default is true, but those models don't separate speakers. |
boost v3 | string | — | Key terms to favour, one per line or comma-separated. At most 200, each up to 100 characters. |
enhanced v3 | boolean | true | Beam search with a language model. false switches to faster plain decoding. |
punctuation v3 | boolean | true | Punctuation and capitals. false returns lower-case words without punctuation. |
The SDKs use the same defaults and name two fields differently: key_terms / keyTerms for boost, and timestamps="word" for timestamps=true.
Boolean fields take true or false (1/0, yes/no and on/off also work). boost, enhanced and punctuation only affect wistfare-stt-v3-beta; other models ignore them.
Response
200 OK:
{
"id": "tr_7c31be92a1f04d2e8b9c",
"text": "Good morning everyone, welcome back. Uyu munsi turaganira ku mibare y'igihembwe.",
"language": "rw",
"model": "wistfare-stt-v3-beta",
"audio_seconds": 5.71,
"cost_cents": 2,
"segments": [
{ "start": 0.24, "end": 2.6, "speaker": null, "language": "en", "text": "Good morning everyone, welcome back." },
{ "start": 2.62, "end": 5.38, "speaker": null, "language": "rw", "text": "Uyu munsi turaganira ku mibare y'igihembwe." }
],
"words": [
{ "word": "Good", "start": 0.24, "end": 0.52, "speaker": null, "language": "en" },
{ "word": "morning", "start": 0.52, "end": 0.86, "speaker": null, "language": "en" },
{ "word": "everyone,", "start": 0.86, "end": 1.44, "speaker": null, "language": "en" },
{ "word": "welcome", "start": 1.44, "end": 1.8, "speaker": null, "language": "en" },
{ "word": "back.", "start": 1.8, "end": 2.6, "speaker": null, "language": "en" },
{ "word": "Uyu", "start": 2.62, "end": 2.9, "speaker": null, "language": "rw" },
{ "word": "munsi", "start": 2.9, "end": 3.22, "speaker": null, "language": "rw" },
{ "word": "turaganira", "start": 3.22, "end": 3.96, "speaker": null, "language": "rw" },
{ "word": "ku", "start": 3.96, "end": 4.12, "speaker": null, "language": "rw" },
{ "word": "mibare", "start": 4.12, "end": 4.58, "speaker": null, "language": "rw" },
{ "word": "y'igihembwe.", "start": 4.58, "end": 5.38, "speaker": null, "language": "rw" }
],
"source_name": "standup.m4a",
"created_at": "2026-10-11T09:41:12Z"
}| Field | Type | Description |
|---|---|---|
id | string | Transcription id (tr_…). Retrieve it again with GET /v1/stt/transcriptions/{id}. |
text | string | The full transcript. |
language | string | The recording's main language with language=auto, otherwise the language you asked for. |
model | string | Canonical id of the model that transcribed the audio. |
audio_seconds | number | Duration of the input audio: what you're billed for ($0.006 / min on v3, $0.012 / min on v1 and v2, minimum 2¢). |
cost_cents | integer | What the request cost, in US cents. |
segments[] | array | Display-ready lines. A new segment starts after a sentence ends, when the speaker changes, after a pause longer than one second, or after 40 words. |
segments[].start, .end | number | Seconds from the start of the file. |
segments[].language | string | null | The segment's majority language (v2, v3). |
segments[].speaker | integer | null | 1 … 4 with diarize=true on v3, numbered in order of first appearance; otherwise null. |
segments[].text | string | The segment's text. |
words[] | array | One entry per word. Empty when timestamps=false. |
words[].word | string | The word, with any attached punctuation. |
words[].start, .end | number | Approximate timing in seconds. end is the next word's start, capped at 0.8 s after start. |
words[].language | string | null | ISO 639-1 code of the word's sentence (v2, v3). |
words[].speaker | integer | null | 1 … 4 with diarize=true on v3, numbered in order of first appearance; otherwise null. |
source_name | string | null | The uploaded file name. |
created_at | string | ISO-8601 UTC timestamp. |
The SDKs return the same data as a typed object: duration is audio_seconds, and in JavaScript fields are camelCase (costCents, sourceName, …). The raw JSON is on .raw.
Response headers
| Header | Example |
|---|---|
X-Transcription-Id | tr_7c31be92a1f04d2e8b9c |
X-Audio-Seconds | 5.71 |
X-Credits-Charged-Cents | 2 |
X-Request-Id | 9b2f4c1e6a8d4e0fb3c7a5d2e1f09a64 |
Errors
| Status | Code | Meaning |
|---|---|---|
400 | unknown_model | model isn't a speech-to-text model. |
400 | unsupported_language | language isn't supported by the chosen model. |
400 | too_many_boost_terms / boost_term_too_long | More than 200 key terms, or a term over 100 characters. |
400 | empty_file / unsupported_audio | The upload is empty or couldn't be decoded as audio. |
400 | audio_too_short / audio_too_long | Shorter than 0.1 s, or longer than 30 minutes. |
401 | unauthorized | Missing, invalid or revoked API key. |
402 | insufficient_credits / budget_exceeded | Not enough credits, or the project's budget is reached. Checked before transcribing; nothing was charged. |
403 | read_only_key / account_suspended | The key is read-only, or spending is suspended on the account. |
409 | idempotency_in_progress | A request with the same Idempotency-Key is still running. |
413 | file_too_large | The upload is larger than 128 MB. |
422 | validation_error / idempotency_mismatch | The file field is missing, or the Idempotency-Key was used with a different request. |
429 | rate_limited / concurrency_limit | Request-rate or concurrent-transcription limit reached (4 at once by default). Retry after Retry-After seconds. |
502 | transcription_unavailable | The model service couldn't return a result. Nothing was charged; retry with backoff. |
504 | transcription_timeout | Transcription took too long. Nothing was charged; retry, or split the file. |