Skip to main content

Transcribe audio

A speech-to-text family provides transcribe, and the workflow is the same one the tutorial used for text: resolve the model, run its command, get the payload on stdout. This guide transcribes a file locally, then serves transcription over HTTP.

From the command line

clika-modelverse openai/whisper-large-v3-turbo transcribe meeting.wav
Good morning, everyone. Before we start, two quick announcements about the release schedule and the on-call rotation for next week.

The transcript is the entire stdout payload, ready to redirect into a file. Decoding progress and timing ride stderr. The audio loader accepts the common containers (WAV, FLAC, MP3, OGG) and resamples to the model's expected rate, so the input file's format is not your problem. One gap: the decoder refuses OGG (Opus and Vorbis) and M4A/AAC with unsupported or corrupt audio data (decoder code -10), while WAV, FLAC and MP3 of the same clip transcribe identically (runtime_internal issues 563 and 566).

The load knobs from the tutorial apply unchanged: --device cuda places the encoder and decoder, --cache-dir controls where the snapshot lives, and a local directory works as the source for offline machines. Whisper checkpoints come in sizes from whisper-tiny (fits anywhere, fastest, roughest) to whisper-large-v3 (the accuracy reference); Model requirements has the figures.

Over HTTP

The same model serves the OpenAI transcription route:

clika-modelverse openai/whisper-large-v3-turbo serve --port 8000

Call it as a multipart upload, the OpenAI shape:

curl -s http://127.0.0.1:8000/v1/audio/transcriptions \
-F file=@meeting.wav \
-F model=whisper
{"text":" Good morning, everyone. Before we start, two quick announcements about the release schedule and the on-call rotation for next week."}

OpenAI SDK clients use their audio.transcriptions.create(...) call against the server's base URL, unchanged. The server-side flags and operations story (binding, health, admission control) is the common one in Serve an OpenAI-compatible endpoint.

For concurrent callers, --concurrent-sessions N admits N requests at once: Whisper keeps one encoder and mints decoder-only replicas over the same weights, encodes every window on the shared encoder with no lock held, and locks one replica for the decode alone, so N uploads run without a whole-request lock. The library form is LoadOptions::concurrent_sessions.

For transcription inside your own process, the library's SttModel and the transcription engine mount on the same OpenAiServer the 01_serve example demonstrates (Additional examples).