Whisper is good at ordinary speech, but names and technical terms are where it slips: a product name becomes a common word, a person’s name becomes a different name. The fix is not a bigger model — it is a hint. initial_prompt is a short text you give Whisper before it listens, listing the words that matter, so the model favours those spellings when the audio could be heard either way.
Write a short prompt of the words that appear
List only the names and terms that are actually spoken in the recording, in plain words — no grammar needed. For a practice recording in which the speaker talks about Kubernetes deployments, a worked example uses this prompt:
Kubernetes Prometheus deployment pod cluster node
Every word in the prompt should be a word that actually appears in the audio and could be misheard. A 50-word, focused prompt of likely words beats a 500-word dump, and prompts over 200 tokens are truncated silently — so keep it short and test it on a 10-second sample first.
Pass it to Whisper
On the command line, --initial_prompt is an optional text to provide as a prompt for the model: “This influences the transcription style and can improve accuracy for specific terminology, proper nouns, or domain-specific language. The model conditions its predictions on this context.”
whisper practice-names.wav --model base --language English --initial_prompt "Kubernetes Prometheus deployment pod cluster node"
In Python, the same option is a parameter of transcribe(): it is “a text string containing words, phrases, or context that Whisper uses to bias its predictions”, like handing the model a cheat sheet before listening.
result = model.transcribe("practice-names.wav", initial_prompt="Kubernetes Prometheus deployment pod cluster node")
print(result["text"])
| Check | What you should see | If you do not see it |
|---|---|---|
| Prompt | The prompt lists 5-50 key terms that appear in the audio | Trim it — a glossary of hundreds of words does not help |
| Without | Transcribing without the prompt misspells a name or term | The terms may already be clear — the prompt only helps where audio is ambiguous |
| With | Transcribing with the prompt spells Kubernetes and Prometheus correctly | Check the prompt spelling and that the words are actually spoken |
Expected result. We checked a Whisper parameter reference for the –initial_prompt flag and a Whisper prompting guide for the short-prompt advice. We did not run Whisper.
Limits
The prompt is a hint, not a guarantee: if the acoustic signal is completely wrong, no prompt will save it, and if someone says a word but the audio is muffled, the prompt will not force the right spelling. It works by biasing decoding toward the words you list, so it helps with uncommon but phonetically distinct words and does nothing for words that are not spoken at all. A poorly chosen prompt can hurt accuracy — for example, including words that never appear can pull the transcript toward them. The practice-names.wav recording and its prompt are a practice example, not a measured test. We did not run Whisper, so no transcript here is a recorded result.
Sources
- OpenAI Whisper README — pip install -U openai-whisper, ffmpeg requirement, model sizes, Python model.transcribe usage
- Whisper parameter reference (third-party) — –initial_prompt: optional text that can improve accuracy for specific terminology, proper nouns, or domain-specific language
- Whisper initial_prompt guide (third-party) — prompt as a cheat sheet, keep it short, prompts over 200 tokens truncated, hint not a guarantee
