Official documentation
whisper/transcribe.py: decoding defaults and command-line options (openai/whisper)
OpenAI, GitHub (openai/whisper), 2026
Read the originalRead on October 17, 2026
- What it is
- The source file that holds Whisper's transcribe function and its command-line interface. It sets the default models, devices, sampling temperatures and thresholds, and the help text for each option.
- How much weight it carries
- The code that the open-source package runs, so its defaults are authoritative for that release. It describes the code, not measured accuracy, and defaults may change in later releases.
Facts taken from this source
- Whisper's transcribe code treats a segment as silence, and skips it, when its no-speech probability is above one threshold and its average log probability is below another.
“If the no_speech probability is higher than this value AND the average log probability over sampled tokens is below `logprob_threshold`, consider the segment as silent” (Docstring for the no_speech_threshold argument of the transcribe function, in whisper/transcribe.py)
- The openai-whisper command line runs on an NVIDIA GPU (CUDA) only when PyTorch can detect one, and otherwise falls back to the CPU.
“parser.add_argument("--device", default="cuda" if torch.cuda.is_available() else "cpu", help="device to use for PyTorch inference")” (Command-line options (--device))
- Turning off condition_on_previous_text can make the text inconsistent across windows, but makes the model less likely to get stuck in a failure loop.
“disabling may make the text inconsistent across windows, but the model becomes less prone to getting stuck in a failure loop” (transcribe() parameters: condition_on_previous_text)
- When openai-whisper runs on a CPU, it warns that FP16 is not supported there and uses FP32 instead.
“FP16 is not supported on CPU; using FP32 instead” (Model decoding setup)
- Whisper's initial prompt can give the model custom vocabulary or proper nouns, which makes those words more likely to be transcribed correctly.
“a context for transcription, e.g. custom vocabularies or proper nouns to make it more likely to predict those word correctly.” (transcribe() parameters: initial_prompt)
- In openai-whisper, the language is left unset by default, and the program then detects the spoken language itself.
“language spoken in the audio, specify None to perform language detection” (Command-line options (--language))
- openai-whisper saves its model files to ~/.cache/whisper unless you set a different folder with --model_dir.
“the path to save model files; uses ~/.cache/whisper by default” (Command-line options (--model_dir))
- Whisper can retry a segment with a sequence of higher sampling temperatures when a decode fails its quality checks.
“which will be successively used upon failures according to either `compression_ratio_threshold` or `logprob_threshold`.” (transcribe() parameters: temperature)
- The openai-whisper command-line tool has a --max_line_count option, which sets the maximum number of lines in a segment. The help text says it requires word timestamps to be turned on.
“(requires --word_timestamps True) the maximum number of lines in a segment” (Command-line argument parser, --max_line_count option)
- The openai-whisper command-line tool has a --max_line_width option, which sets the maximum number of characters in a line before the line breaks. The help text says it requires word timestamps to be turned on.
“(requires --word_timestamps True) the maximum number of characters in a line before breaking the line” (Command-line argument parser, --max_line_width option)
- The Whisper command-line tool writes all available output formats when no output format is specified.
“format of the output file; if not specified, all available formats will be produced” (Command-line options, --output_format)
- The openai-whisper command-line tool's output format option accepts srt and vtt, along with txt, tsv, json, jsonl and all.
“choices=["txt", "vtt", "srt", "tsv", "json", "jsonl", "all"]” (Command-line argument parser, --output_format option)
- The openai-whisper command line turns its starting temperature and its fallback increment into a list of temperatures that runs up to 1.0, which the decoder tries in turn when a decode fails.
“temperature = tuple(np.arange(temperature, 1.0 + 1e-6, increment))” (Command-line options, after argument parsing)
- The openai-whisper command-line tool has a --word_timestamps option, which the source marks as experimental. It extracts word-level timestamps and refines the results based on them.
“(experimental) extract word-level timestamps and refine the results based on them” (Command-line argument parser, --word_timestamps option)
- When openai-whisper loads its model on the CPU while CUDA is available, it prints a warning that says inference is running on the CPU.
“Performing inference on CPU when CUDA is available” (transcribe(), device check after the model is loaded)
- When no language is set, Whisper's transcribe function detects the spoken language from up to the first 30 seconds of audio.
“Detecting language using up to the first 30 seconds” (transcribe() function, language detection block)
- In OpenAI's open-source Whisper command line, the --no_speech_threshold option defaults to 0.6.
“"--no_speech_threshold", type=optional_float, default=0.6, help="if the probability of the” (Command-line options, argparse definition of --no_speech_threshold)
- In Whisper's transcribe function, a segment counts as silent when its no-speech probability is above the no_speech_threshold setting and its average log probability is below logprob_threshold.
“If the no_speech probability is higher than this value AND the average log probability over sampled tokens is below ... consider the segment as silent” (transcribe() parameter documentation in whisper/transcribe.py)
Pages that rest on this source
- Transcribe Audio With Whisper, ChatGPT or GeminiGuide
- How does speech recognition know when you stop talking?Question
- What are the best Whisper settings for accuracy?Question
- Why does Whisper make up words nobody said?Question
- How to Run Whisper Locally on Your Own ComputerGuide
- Can Whisper AI run offline?Question
- How do you transcribe audio with timestamps for free?Question
- What is NVIDIA Parakeet, and is it better than Whisper?Question
- What is the best GPU for Whisper?Question
- Why is Whisper not using my GPU?Question
- How to Transcribe Audio to TextGuide
- Video to Text: Transcribe Videos and YouTubeGuide
- Multilingual Dictation: Two Languages, Auto-Detect, MixingGuide
- How do you dictate foreign names and words correctly?Question
- How do you transcribe a lecture recording?Question
- Why does speech recognition get names and jargon wrong?Question
- Transcribe and Translate Audio in Other LanguagesGuide
- How do you translate a voice recording into English text?Question
- How do you install Whisper AI?Question
- How do you make subtitles with Whisper?Question
- Is Whisper AI Safe? Privacy and Security ExplainedGuide
- Captions and Subtitles: Formats, Rules and ToolsGuide
- How do you add automatic captions to YouTube Shorts?Question
- How to Translate Audio and Video to English TextGuide