Back to glossary

Term

Whisper initial_prompt

The `initial_prompt` parameter lets you pass Whisper a keyword list or sample sentence before transcription. The model treats this text as context and recognises the included terms far more reliably.

Whisper initial_prompt — explained in more detail

initial_prompt is an optional text parameter when calling a Whisper model (locally via whisper/faster-whisper, or through the OpenAI API). Whisper interprets the content as if it had just heard that text immediately before the audio it is about to transcribe. Effect: proper names, technical terms and specific spellings contained in the hint are preferred during decoding because they sit inside the current language and vocabulary context. It is not fine-tuning and not real training — the model weights remain unchanged. The hint only affects the single call and requires no additional infrastructure.

Example / Practical context

Anyone speaking regularly about in-house product names, tooling or code feeds Whisper a short keyword list — typically ten to fifteen terms, comma- or sentence-separated. “Debbie Runner” reliably becomes “DEVI Runner”; “Heiko” turns back into “Haiku”. With Whisper-small the list is hard-capped: beyond ~15 terms general transcription quality degrades because the model loses focus. Whisper-medium and -large tolerate more (around 20–25 terms), but the parameter is not arbitrarily scalable.

Fine-tuning permanently alters the model weights and requires training data, GPU time and evaluation — initial_prompt is merely a temporary, per-request context hint. A downstream correction layer (e.g. an LLM cleaning up Whisper output) handles word splits and hallucinations that a glossary hint cannot fix. The language parameter and condition_on_previous_text are other Whisper knobs, but not substitutes — they control language and context window, not domain vocabulary.

Entdecke mehr

Themenuebersicht