Speech to Text

Create transcript

Transcribe an audio or video file and get the full transcript in the response.

POST/v1/stt

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

HeaderDescription
AuthorizationBearer wv_sk_…, a key with all permission.
Idempotency-KeyOptional. Retry with the same key and file to get the original response instead of a second charge. See Idempotency.
X-Request-IdOptional. Your correlation id, echoed in the response.

Body (multipart/form-data)

FieldTypeDefaultDescription
filefilerequiredThe audio or video to transcribe: MP3, WAV, M4A, MP4, WEBM, OGG, FLAC or AAC. Up to 128 MB and 30 minutes.
modelstringwistfare-stt-v3-betawistfare-stt-v3-beta, wistfare-stt-v2-beta or wistfare-stt-v1-beta (aliases wistfare-stt-1, wistfare-stt-fast).
languagestringautoauto, rw, en, fr or sw; with v3 also lg and rn.
timestampsbooleantrueInclude words with start and end times.
diarizebooleanfalseLabel 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 v3string—Key terms to favour, one per line or comma-separated. At most 200, each up to 100 characters.
enhanced v3booleantrueBeam search with a language model. false switches to faster plain decoding.
punctuation v3booleantruePunctuation 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"
}
FieldTypeDescription
idstringTranscription id (tr_…). Retrieve it again with GET /v1/stt/transcriptions/{id}.
textstringThe full transcript.
languagestringThe recording's main language with language=auto, otherwise the language you asked for.
modelstringCanonical id of the model that transcribed the audio.
audio_secondsnumberDuration of the input audio: what you're billed for ($0.006 / min on v3, $0.012 / min on v1 and v2, minimum 2¢).
cost_centsintegerWhat the request cost, in US cents.
segments[]arrayDisplay-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, .endnumberSeconds from the start of the file.
segments[].languagestring | nullThe segment's majority language (v2, v3).
segments[].speakerinteger | null1 … 4 with diarize=true on v3, numbered in order of first appearance; otherwise null.
segments[].textstringThe segment's text.
words[]arrayOne entry per word. Empty when timestamps=false.
words[].wordstringThe word, with any attached punctuation.
words[].start, .endnumberApproximate timing in seconds. end is the next word's start, capped at 0.8 s after start.
words[].languagestring | nullISO 639-1 code of the word's sentence (v2, v3).
words[].speakerinteger | null1 … 4 with diarize=true on v3, numbered in order of first appearance; otherwise null.
source_namestring | nullThe uploaded file name.
created_atstringISO-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

HeaderExample
X-Transcription-Idtr_7c31be92a1f04d2e8b9c
X-Audio-Seconds5.71
X-Credits-Charged-Cents2
X-Request-Id9b2f4c1e6a8d4e0fb3c7a5d2e1f09a64

Errors

StatusCodeMeaning
400unknown_modelmodel isn't a speech-to-text model.
400unsupported_languagelanguage isn't supported by the chosen model.
400too_many_boost_terms / boost_term_too_longMore than 200 key terms, or a term over 100 characters.
400empty_file / unsupported_audioThe upload is empty or couldn't be decoded as audio.
400audio_too_short / audio_too_longShorter than 0.1 s, or longer than 30 minutes.
401unauthorizedMissing, invalid or revoked API key.
402insufficient_credits / budget_exceededNot enough credits, or the project's budget is reached. Checked before transcribing; nothing was charged.
403read_only_key / account_suspendedThe key is read-only, or spending is suspended on the account.
409idempotency_in_progressA request with the same Idempotency-Key is still running.
413file_too_largeThe upload is larger than 128 MB.
422validation_error / idempotency_mismatchThe file field is missing, or the Idempotency-Key was used with a different request.
429rate_limited / concurrency_limitRequest-rate or concurrent-transcription limit reached (4 at once by default). Retry after Retry-After seconds.
502transcription_unavailableThe model service couldn't return a result. Nothing was charged; retry with backoff.
504transcription_timeoutTranscription took too long. Nothing was charged; retry, or split the file.

On this page