Audio transcription
Turn speech into text, from meetings and calls to voice notes and podcasts.
Transcribe a file
Send an audio file and a model. Add a language,
such as en or cy, for better accuracy.
from pendra import Pendra
client = Pendra(api_key="pdr_sk_...")
with open("meeting.mp3", "rb") as f:
result = client.audio.transcriptions.create(
model="whisper-large-v3-turbo",
file=f,
language="en",
)
print(result.text)
We're starting the meeting now. First item on the agenda is the Q3 forecast.
Files can be up to 25 MB, in WAV, MP3 or FLAC. Renaming a file doesn't change its format, so convert other files first. Browser recordings are usually WebM, whatever they're called.
Output formats
Choose one with response_format:
jsonreturns the text in a JSON object. This is the default.textreturns just the transcript.srtandvttreturn subtitle files with timings.verbose_jsonadds the language and timestamps for each word or segment.
Faster transcripts
By default, Pendra compares several possible transcripts and returns the
most accurate. For a faster result, such as for bulk jobs or rough drafts,
set beam_size to 1.
result = client.audio.transcriptions.create(
model="whisper-large-v3-turbo",
file=f,
beam_size=1, # faster; leave out for the most accurate result
)
Models
whisper-large-v3-turbois fast and multilingual, and a good default.whisper-large-v3is the most accurate, but larger and slower.
Try it from your microphone
In the console's Playground, pick a transcription model and press Record to see the transcript as you speak. It's a little less accurate than uploading a file, and isn't available if your organisation requires end-to-end encryption.