Audio version — Estimated duration: 9 min 14 sec

Configuration

All settings in Whisper Dictate are variables at the top of the script (lines 28-44 in whisper-dictate-v2.py). You can change any of them with a text editor before running the script.

Config Location

Open whisper-dictate-v2.py and look for the section starting with:

# ── Config ────────────────────────────────────────────────────────────────────
HOTKEY_CODE  = "KEY_RIGHTALT"
MODEL_SIZE   = "medium"
...
MIN_DURATION = 0.3
# ─────────────────────────────────────────────────────────────────────────────

Everything above the separator line is configurable.

Quick Reference Table

VariableDefaultWhat It Controls
HOTKEY_CODE"KEY_RIGHTALT"Which keyboard key triggers recording
MODEL_SIZE"medium"Whisper model size (accuracy vs speed)
SAMPLE_RATE16000Audio capture rate (don’t change unless you know what you’re doing)
DEVICE"cuda"GPU ("cuda") or CPU ("cpu") for transcription
COMPUTE_TYPE"int8_float16"How model weights are stored (memory usage vs speed)
LANGUAGENoneSpoken language (None = auto-detect)
SHOW_NOTIFYTrueDesktop pop-ups on/off
MIN_DURATION0.3Minimum recording time in seconds (filters accidental taps)

HOTKEY_CODE — Choose Your Hotkey

Default: "KEY_RIGHTALT"

This is the key you hold to dictate. Any key on your keyboard can be used.

Common Hotkeys

CodePhysical KeyNotes
KEY_RIGHTALTRight AltDefault — convenient for thumb
KEY_RIGHTCTRLRight CtrlAlso easy for thumb
KEY_CAPSLOCKCaps LockYou won’t accidentally hit it
KEY_F9F9Function row — unlikely to conflict
KEY_RIGHTMETARight Super/WinUsually opens app menu — beware conflicts
KEY_LEFTMETALeft Super/WinUsually opens app menu — beware conflicts
KEY_COMPOSECompose/Menu keyOften unused
KEY_LEFTCTRLLeft CtrlMay conflict with Ctrl+C, Ctrl+V, etc.

How to Find Your Key Code

python3 -m evdev.evtest

This opens an interactive key tester. Press the key you want to use and look for the KEY_* name printed to the terminal. For example, pressing the Right Alt key shows:

Event: time 12345.678901, type 1 (EV_KEY), code 100 (KEY_RIGHTALT), value 1

The code name (KEY_RIGHTALT) is what you put in your config.

Best Practices

  • Avoid modifiers used by applications — Left Ctrl conflicts with copy/paste shortcuts, Super/Windows key opens menus
  • Use a key you can press with your non-dominant hand — You’ll be holding it for several seconds while speaking
  • Avoid keys you type frequently — You don’t want to accidentally start recording while typing normally

MODEL_SIZE — Accuracy vs Speed

Default: "medium"

Whisper comes in several sizes. Larger models are more accurate but slower and use more VRAM (video memory).

Model Comparison

SizeParametersSpeed (RTX 3050)VRAMAccuracyBest For
tiny39 million~1 second~1 GBLowestQuick commands, low-end GPUs
base74 million~2 seconds~1 GBMediumBalanced on limited hardware
small244 million~3 seconds~2 GBGoodEveryday use on 4GB GPUs
medium769 million~5 seconds~5 GBGreatDefault — best for 6GB GPUs
large-v31.55 billion~10 seconds~10 GBBestMaximum accuracy, high-end GPUs

How to Choose

  1. Check your GPU memory: Run nvidia-smi and look at the “Memory-Usage” for your GPU.
  2. Pick the largest model that fits: If you have 6GB VRAM like an RTX 3050, medium is the sweet spot. large-v3 requires 10GB+.
  3. CPU users: Use tiny or base — transcription takes 5-20x longer on CPU.

Storage

Models are cached in the ./models/ directory in your project folder. Space used:

ModelDisk Space
tiny~300 MB
base~600 MB
small~2 GB
medium~6 GB
large-v3~12 GB

DEVICE — GPU or CPU

Default: "cuda"

Controls whether transcription runs on your NVIDIA GPU or on your CPU.

ValueHardwareSpeed
"cuda"NVIDIA GPU (requires CUDA toolkit)Fast
"cpu"System CPU5-20x slower

GPU Notes

  • You need an NVIDIA GPU with at least 4GB VRAM for small or larger models
  • CUDA toolkit must be installed: nvidia-smi should show driver version
  • If you get “CUDA out of memory” errors, try a smaller model or switch to CPU

CPU Notes

  • Works on any system, even without a GPU
  • medium model takes ~1-2 minutes on a modern CPU
  • tiny model takes ~5-10 seconds on CPU
  • The script will still work for dictation, just with a delay between releasing the key and text appearing

COMPUTE_TYPE — Memory Quantization

Default: "int8_float16"

This controls how model weights are stored in GPU memory. Different formats trade off VRAM usage against speed and accuracy.

TypeVRAM SavedSpeedNotes
"int8"MostFastSlight accuracy loss
"int8_float16"MediumFastDefault — good balance, safe for RTX 3050
"float16"SomeFastestMay cause NaN/infinity errors on some GPUs
"float32"NoneSlowestFull precision, rarely needed outside research

If you see NaN errors or incorrect output: Switch to "int8_float16" or "int8". Some GPUs have issues with full float16.

If you have limited VRAM and need a larger model: Use "int8" — it reduces model size the most.


LANGUAGE — Auto-Detect or Fixed

Default: None

None = automatic language detection. Whisper listens to the first 30 seconds of audio and determines the language on its own. This adds ~0.5 seconds to transcription.

Set a specific language code to skip detection and improve accuracy:

CodeLanguage
"en"English
"hi"Hindi
"mr"Marathi
"es"Spanish
"fr"French
"de"German
"zh"Chinese
"ja"Japanese
"ko"Korean

When to set a language:

  • You always speak the same language
  • Auto-detection adds noticeable delay
  • Whisper confuses your language with a similar one (e.g., Ukrainian with Russian)

Full list: https://github.com/openai/whisper/blob/main/whisper/tokenizer.py


SHOW_NOTIFY — Desktop Notifications

Default: True

Controls whether desktop pop-ups appear for recording status.

ValueBehavior
TrueShow notifications (requires libnotify-bin)
FalseNo notifications, terminal output only

Notification events:

  • Model loading (startup)
  • “Ready” (model loaded)
  • “Recording…” (hotkey pressed)
  • “Transcribing…” (hotkey released)
  • “Typed” (text injected)
  • “Copied to clipboard” (fallback used)
  • “Nothing detected” (too short or no speech)

MIN_DURATION — Accidental Tap Filter

Default: 0.3

The minimum recording duration in seconds. If you press and release the hotkey in less than this time, nothing is transcribed.

Why this exists: You might accidentally brush the hotkey while typing normally. Without this filter, every accidental tap would trigger a transcription of silence or background noise.

Recommendations:

  • 0.3 — Good default. Filters accidental taps, doesn’t interfere with intentional use
  • 0.5 — More aggressive filtering, requires a deliberate press
  • 0.1 — Minimal filtering, captures even brief utterances

Internal Variables (Not User-Configurable)

These are set inside the code and affect behavior:

VariableDefaultPurpose
_stream_interval2.0Seconds between live preview transcriptions during recording
_stream_idx0Tracks which audio chunks have been previewed; resets each recording
_lockthreading.Lock()Thread safety lock — prevents race conditions

You can change _stream_interval if you want more or less frequent live previews. A shorter interval (e.g., 1.0) gives more real-time feedback but uses more GPU time. A longer interval (e.g., 5.0) conserves GPU resources but shows less feedback.


Best Practices Summary

GoalSettings
Fastest transcriptionMODEL_SIZE = "tiny", COMPUTE_TYPE = "int8_float16", LANGUAGE = "en"
Highest accuracyMODEL_SIZE = "large-v3", COMPUTE_TYPE = "float16", LANGUAGE = "en"
Low VRAM usageMODEL_SIZE = "tiny", COMPUTE_TYPE = "int8"
CPU-only systemDEVICE = "cpu", MODEL_SIZE = "tiny"
Quiet operationSHOW_NOTIFY = False

Now see common-issues if you run into issues, or components to understand how each config option is used internally.