Written and maintained by CASRAI Editorial Board
Last updated
Speech recognition is software that converts spoken audio into text. A researcher usually meets it as a way to turn interview or focus-group recordings into a transcript that can be coded, searched and quoted. This guide explains what a speech recognition system does, how it differs from voice recognition, and how to run two openly licensed tools, OpenAI Whisper and the Python SpeechRecognition package, with the commands taken from their own project pages (read 2026-11-07).
What is a speech recognition system in a computer?
A speech recognition system takes an audio signal, usually a recording or a live microphone stream, and outputs the words it estimates were spoken. Under the hood the audio is first treated as a signal and converted to features (see signal processing), then a trained statistical or neural model maps those features to text. The result is an estimate, not a record: accents, background noise, overlapping talkers and specialist vocabulary all change how accurate the text is, which is why research use needs a human check against the audio.
What is the difference between voice and speech recognition?
Speech recognition answers “what was said?” and returns words. Voice recognition (often called speaker recognition) answers “who said it?” and identifies or verifies a person from the characteristics of their voice. The two are often confused because both start from a recording and both are sold in the same products, but a transcript tool does not need to know who is speaking, and a speaker-verification system does not need to know what was said. In the language-science sense, speech is the produced, linguistic message and voice is the acoustic quality of the person producing it (see linguistics for the wider field).
What speech recognition is used for in research
- Interview and focus-group transcription. A machine first draft saves typing time; the transcript must still be corrected against the audio and formatted to the conventions your study uses. See transcription conventions in qualitative research.
- Confidential recordings. Some tools run entirely on your own computer, so the audio never leaves it. This matters when consent forms or an ethics approval restrict where participant audio may be sent. Whether a given tool is local or cloud-based is the first thing to check.
- Accessibility and dictation. Live dictation (“voice typing”) applies the same technology to a microphone stream.
- Language and speech data. Transcripts of recorded speech are a data source for linguistic and computational work; see what artificial intelligence is for the broader context.
Install or access (official sources only)
Option 1: OpenAI Whisper (runs locally)
Whisper is published at github.com/openai/whisper. Its README gives the install command:
pip install -U openai-whisper
To install the latest commit instead of the release: pip install git+https://github.com/openai/whisper.git. The README states the code was developed with Python 3.9.9 and PyTorch 1.10.1 and is expected to be compatible with Python 3.8 to 3.11. It also requires the command-line tool ffmpeg:
- Ubuntu or Debian:
sudo apt update && sudo apt install ffmpeg - macOS (Homebrew):
brew install ffmpeg - Windows (Chocolatey):
choco install ffmpeg; or (Scoop):scoop install ffmpeg
The README adds that you may need Rust installed if a prebuilt tiktoken package is not available for your platform.
Option 2: the Python SpeechRecognition package
The package page at pypi.org/project/SpeechRecognition gives the install command:
pip install SpeechRecognition
Version 3.17.0 was listed as released on 17 June 2026, for Python 3.9 and later, under the BSD-3-Clause licence. It is a wrapper that lets one Python interface call many recognition engines. Microphone input needs PyAudio (0.2.11 or later); on Windows the page gives pip install SpeechRecognition.
Step-by-step: transcribe a recording with Whisper
- Install ffmpeg and then Whisper as shown above.
- From a terminal, run the command-line tool on one or more files. The README example is:
whisper audio.flac audio.mp3 audio.wav --model turbo - If the speech is not English, name the language, for example:
whisper japanese.wav --language Japanese - To translate non-English speech into English, add the translate task (the README uses the
mediummodel for this, becauseturbodoes not support translation):whisper japanese.wav --model medium --language Japanese --task translate - To see every option, including the output settings, run
whisper --help. - To call it from Python instead, the README example is:
import whisper model = whisper.load_model("turbo") result = model.transcribe("audio.mp3") print(result["text"])
The README explains that transcribe() reads the whole file and processes it in sliding 30-second windows, performing an autoregressive sequence-to-sequence prediction on each window.
Choosing a Whisper model size
The README lists these models. Speed is relative to the large model, measured on an A100 GPU by the project; real speed depends on your hardware and the audio.
| Model | Parameters | Required VRAM | Relative speed |
|---|---|---|---|
| tiny | 39 M | ~1 GB | ~10x |
| base | 74 M | ~1 GB | ~7x |
| small | 244 M | ~2 GB | ~4x |
| medium | 769 M | ~5 GB | ~2x |
| large | 1550 M | ~10 GB | 1x |
| turbo | 809 M | ~6 GB | ~8x |
English-only variants (tiny.en, base.en, small.en, medium.en) exist for the four smaller sizes. According to the README, turbo is an optimised version of large-v3 and is not trained for translation.
Step-by-step: transcribe with the SpeechRecognition package
- Install the package (and PyAudio only if you want microphone input).
- To check your microphone is visible, call
sr.Microphone.list_microphone_names()afterimport speech_recognition as sr. - For a quick live try, the package page suggests running
python -m speech_recognition. - Choose the engine. The same recogniser object exposes the engines listed in the next section; pick one that keeps audio local if your consent terms require it.
Output and how to read it
With Whisper’s Python interface the transcript text is in result["text"], as in the example above. The command-line tool writes transcript files for the audio you give it; whisper --help lists the available output options. Treat every machine transcript as a first draft: listen back while reading, correct names and technical terms, mark inaudible passages, and apply your study’s transcription conventions before coding. Do not report a transcript as verbatim unless a person has verified it against the audio.
Troubleshooting
- Error about ffmpeg or a file that cannot be read. ffmpeg is a required dependency of Whisper; install it with the platform command above and reopen the terminal.
- Install fails while building
tiktoken. The README says a Rust toolchain may be needed when no prebuilt wheel exists for your platform. - Out of memory on a GPU. Pick a smaller model; the table above gives the approximate VRAM each needs.
- Wrong language or no translation. Pass
--languageexplicitly; use a model other thanturbofor the translate task. - SpeechRecognition cannot find a microphone. PyAudio is needed for microphone input; confirm the device appears in
sr.Microphone.list_microphone_names(). - Python version errors. Whisper’s README expects Python 3.8 to 3.11; SpeechRecognition’s page lists Python 3.9 and later. Use a virtual environment for each.
Free alternatives: engines you can reach from Python
The SpeechRecognition page lists the engines it can call and marks which work offline. “Offline” here means the recognition runs on your machine without sending audio to a service; engines not marked offline are connected services with their own terms, so read each provider’s terms and data-handling policy before using one with participant audio.
| Engine (as listed on the package page) | Listed as offline? |
|---|---|
| CMU Sphinx | Yes |
| Snowboy | Yes |
| Vosk | Yes |
| OpenAI Whisper (local) | Yes |
| OpenAI Whisper API | No (hosted service) |
| Google Speech Recognition | No |
| Google Cloud Speech API | No |
| Wit.ai | No |
| Microsoft Azure Speech | No |
| Houndify | No |
| IBM Speech to Text | No |
| Groq Whisper API | No |
| Cohere Transcribe API | No |
FAQ
Is Whisper AI free to use?
The open-source Whisper model and code are released under the MIT licence, so you can download and run them on your own computer without a licence fee. That is separate from any hosted Whisper service, whose terms are set by the provider that runs it; check that provider’s own page. Running locally still costs your own computer’s processing time and, for larger models, GPU memory.
Where can I get voice typing online?
Voice typing is live dictation: speech recognition applied to a microphone stream while you type. Where it is offered depends on your device, browser and word-processing software, and each vendor documents its own feature. For research material, check in that documentation whether the audio is processed on your device or sent to a server, and match that to your consent and data-management plan. For recorded interviews, a local tool such as Whisper (above) avoids sending audio anywhere.
Can I use speech recognition on confidential interviews?
Only if how and where the audio is processed is consistent with your participants’ consent and your ethics approval. Offline engines keep audio on your machine; connected services do not.
Is speech recognition the same as transcription?
Speech recognition is the automated step; transcription as a research method also includes checking, formatting and conventions. See transcription conventions in qualitative research.
Sources
- OpenAI Whisper repository README, github.com/openai/whisper, read 2026-11-07.
- SpeechRecognition project page, pypi.org/project/SpeechRecognition, read 2026-11-07.







