Skip to main content
Request a transcript when you need the spoken words rather than a summary. Specify whether to preserve the original language, include repetitions, and mark words that cannot be heard clearly. Review the result against the recording before relying on exact wording.

Transcribe a local recording

Install perceptron>=0.4.0, set PERCEPTRON_API_KEY, and place a short WAV recording at ./recording.wav. This example asks for a verbatim transcript in the original language:
The transcript is returned in choices[0].message.content. A length finish reason means the output budget was exhausted; treat that transcript as incomplete. A stop finish reason indicates completion, not verified transcription accuracy. The audio() helper detects the local recording’s format and sends it inline. For other supported encodings, remote recordings, or uploaded files, use the audio input forms.

Specify the transcript you need

These are prompt instructions, not guarantees of word accuracy or speaker separation. Speaker labels describe turns within the recording; they do not establish a person’s identity or a stable identity across recordings. Check labels and quotations against the audio when they matter to your application.

Budget for the full transcript

A recording can fit the audio input limit while its transcript exceeds the requested output budget. Allow enough completion tokens for the spoken text, within the model’s context and output limits. The example uses reasoning_effort="none" and a 4,096-token output budget; adjust that budget for your recording. For a longer recording, split the audio into shorter excerpts before sending requests and retain their start times in your application. If you overlap excerpts to preserve context around a boundary, check for duplicated transcript text when joining results. Audio over the per-item limit is rejected rather than automatically truncated. Use audio clipping to ask for an interval containing a phrase or audible event. A clip is a temporal annotation; it does not provide automatic word-by-word alignment for a transcript. Use audio Q&A when you only need a specific answer from the recording.