What Is Automatic Speech Recognition (ASR)?
A plain-language introduction to ASR — how machines turn spoken audio into text, and why whisper.cpp makes it easy to run locally.
- asr
- whisper.cpp
- fundamentals
The short version
Automatic Speech Recognition, or ASR, is the technology that listens to audio and writes down what was said. Your phone's dictation, meeting transcripts, and subtitles on videos all rely on it.
Whisper.cpp is a fast, local implementation of OpenAI's Whisper model. It does the same job as cloud speech APIs, but it runs entirely on your own machine — no audio ever leaves your computer.
How it works, in one picture
- Audio preprocessing turns raw sound waves into a spectrogram (a picture of frequencies over time).
- Acoustic model maps chunks of that spectrogram to sounds and word pieces.
- Language model picks the most likely sentence out of many possible word sequences.
- The result: readable text, often with punctuation and timestamps.
Why this matters for whisper.cpp
Whisper.cpp bundles all three steps into a single command-line tool written in C/C++. No Python runtime, no GPU required (though it can use one), and no internet connection.
# Transcribe a local audio file
./whisper-cli -m models/ggml-base.en.bin -f audio.wavThat single line does everything shown in the diagram above: it loads the model, preprocesses audio.wav, and prints the transcript to your terminal.
Common use cases
- Turning podcast episodes into blog posts
- Generating subtitles for videos
- Creating searchable meeting notes
- Building voice commands for local apps
Error handling basics
Even a "beginner" command needs a couple of safety checks:
if [ ! -f "$AUDIO_FILE" ]; then
echo "Error: audio file not found: $AUDIO_FILE" >&2
exit 1
fi
if [ ! -f "$MODEL_FILE" ]; then
echo "Error: model file not found: $MODEL_FILE. Download one with models/download-ggml-model.sh" >&2
exit 1
fi
./whisper-cli -m "$MODEL_FILE" -f "$AUDIO_FILE" || {
echo "Error: whisper-cli exited with a non-zero status" >&2
exit 1
}Up next
The next article in this series covers how to actually build a small ASR pipeline with whisper.cpp — picking a model, converting audio formats, and reading the output.