Audio / Intermediate

Transcribe an audio file privately

Use the publisher’s Transformers path for Voxtral Mini Realtime to transcribe a local recording, check the words against the audio, and keep the file off hosted APIs.

Verified sourceSource checked 9/23/2026
LOCALRENTED GPU

Before you begin

Difficulty
Intermediate
Software
Python, PyTorch, Transformers, mistral-common
Hardware
Mistral documents a 16 GB GPU minimum for its vLLM streaming path. The Transformers file path below has no separate measured minimum; begin on a CUDA GPU with ample memory or a suitable rented GPU.
View the setup source

Sources and files

Publisher Voxtral model card and Python example Publisher-supported vLLM streaming route

Choose a model for this task

The steps below use the recommended model. Alternatives have their own package and command; open their model pages before switching.

The workflow

1

Prepare a private GPU environment

Use a local Linux CUDA machine or a rented Linux GPU with access limited to you. Place a short recording you are allowed to process at sample.mp3. The model download needs additional disk space; this workflow sends the recording only to your local Python process.

2

Install the documented audio dependencies

Create a fresh Python environment with a compatible PyTorch installation, then install the publisher-listed Transformers and audio packages.

pip install --upgrade "transformers>=5.2.0" "mistral-common[audio]"
3

Save the transcription script

Save this publisher-derived example as transcribe.py beside sample.mp3. It loads the official weights, resamples the recording for the processor, and prints the decoded transcript.

from transformers import VoxtralRealtimeForConditionalGeneration, AutoProcessor from mistral_common.tokens.tokenizers.audio import Audio repo_id = "mistralai/Voxtral-Mini-4B-Realtime-2602" processor = AutoProcessor.from_pretrained(repo_id) model = VoxtralRealtimeForConditionalGeneration.from_pretrained(repo_id, device_map="auto") audio = Audio.from_file("sample.mp3", strict=False) audio.resample(processor.feature_extractor.sampling_rate) inputs = processor(audio.audio_array, return_tensors="pt") inputs = inputs.to(model.device, dtype=model.dtype) outputs = model.generate(**inputs) print(processor.batch_decode(outputs, skip_special_tokens=True)[0])
4

Run a short transcription

Start with a short, clear recording before a long meeting. The first run downloads the weights. A printed transcript without a model-load or audio-decoding error is the technical success check.

python transcribe.py
5

Check the transcript against the recording

Listen to the source while reading the text. Verify names, numbers, and any words that matter. The publisher reports strong multilingual recognition, but the output is not guaranteed to be exact.

6

Scale up carefully

For live subtitles, switch to the publisher’s vLLM realtime route and its linked streaming client. Check latency and GPU memory on your exact system before using it for longer sessions.

When it doesn’t go to plan

Audio cannot be decoded

Confirm sample.mp3 exists beside the script and install the audio extras from the publisher instructions. Try a short standard MP3 or WAV that plays locally.

The model runs out of GPU memory

Use a larger CUDA GPU or rented GPU. The documented 16 GB minimum applies to vLLM; this Transformers example has no separately published memory minimum.

Words or names are wrong

Check the source recording manually, use clearer input where possible, and review names and numbers before relying on the transcript.

The model behind this workflow

Voxtral Mini · 4B Realtime
MY HARDWARE

Will it run on your machine?

Save your machine to see a personalized rating and its reasoning.

Add my hardware

Keep exploring