# Note: All the variables to this image are optional. # See README for more information. # To use, copy this file to 'whisper.env' and uncomment/set your values. # Whisper model to use for transcription (default: base) # Options: tiny, tiny.en, base, base.en, small, small.en, medium, medium.en, # large-v1, large-v2, large-v3, large-v3-turbo, turbo # - Models are downloaded from HuggingFace on first start and cached in the # /var/lib/whisper Docker volume. # - large-v3-turbo is recommended if you need better accuracy than 'base' # without the full resource cost of large-v3. # - Use an '.en' variant (e.g. base.en) for a slight speed boost on English-only audio. # WHISPER_MODEL=base # Default language for transcription (default: auto) # - Set to a BCP-47 language code (e.g. en, fr, de, zh, ja, es) to skip # language autodetection and improve speed/accuracy for known-language audio. # - Leave as 'auto' or unset to autodetect the language from each audio file. # WHISPER_LANGUAGE=auto # HTTP port for the transcription API (default: 9000) # WHISPER_PORT=9000 # Compute device (default: cpu) # Options: cpu, cuda, auto # - cpu: Use CPU for inference (default, works everywhere) # - cuda: Use NVIDIA GPU (requires the :cuda image tag and NVIDIA Container Toolkit) # - auto: Automatically detect GPU; falls back to CPU if unavailable # WHISPER_DEVICE=cpu # Quantization / compute type (default: int8 on CPU, float16 on CUDA) # - int8 Fastest on CPU; good accuracy. Recommended for CPU deployments. # - float16 Recommended for GPU (CUDA). Fast and accurate on NVIDIA GPUs. # - int8_float16 Mixed precision; useful on newer CPUs with AVX512 or on GPU. # - float32 Highest precision; slowest. Rarely needed. # WHISPER_COMPUTE_TYPE=int8 # Number of CPU threads used for inference (default: 2) # - Increase on hosts with many cores to improve throughput for concurrent requests. # - Set to the number of physical CPU cores for best single-request latency. # WHISPER_THREADS=2 # Optional API key to require Bearer token authentication on all requests. # - Fresh installs with a mounted /var/lib/whisper volume auto-generate a key. # - Existing installs with no key remain open for backward compatibility. # - When set, every request must include: -H "Authorization: Bearer " # - Set explicitly empty (WHISPER_API_KEY=) to disable authentication. # - Use 'docker exec whisper_manage --showkey' to display the key. # - Use 'docker exec whisper_manage --getkey' for scripts. # - Keep this secret if you expose the server to the internet. # WHISPER_API_KEY= # Log level (default: INFO) # Options: DEBUG, INFO, WARNING, ERROR, CRITICAL # WHISPER_LOG_LEVEL=INFO # Beam size for transcription and translation decoding (default: 5) # - Controls how many candidate sequences are explored simultaneously during # decoding. Higher values can improve accuracy at the cost of more CPU/memory. # - Use 1 for fastest (greedy) decoding; 5 is a good accuracy/speed balance. # WHISPER_BEAM=5 # Maximum beam size allowed for the per-request beam override (default: 10) # - Requests may set beam=N as a local faster-whisper extension. # - Set to 0 to allow any positive request beam value. # WHISPER_MAX_REQUEST_BEAM=10 # Maximum uploaded audio file size in MB (default: 1024) # - Requests larger than this limit are rejected with HTTP 413. # - Set to 0 to disable the upload size limit. # WHISPER_MAX_UPLOAD_MB=1024 # Local-only mode: disable all HuggingFace model downloads (default: unset) # - When set to any non-empty value (e.g. true), faster-whisper will only use # models already present in the /var/lib/whisper cache volume and will not # attempt to contact HuggingFace. Useful for air-gapped or offline deployments. # - Leave unset (default) to allow automatic model downloads on first start. # WHISPER_LOCAL_ONLY= # Enable word-level timestamps globally (default: unset / false) # - When set to 'true', all transcription requests will include word-level # timestamps in the verbose_json output (a 'words' array in each segment # with per-word start/end times and confidence scores). # - Can also be enabled per-request by passing word_timestamps=true in the # API call, without setting this variable. # WHISPER_WORD_TIMESTAMPS= # --- Speaker Diarization (optional) --- # Enable speaker diarization to identify who is speaking in each segment. # Uses sherpa-onnx with pyannote segmentation-3.0 ONNX models. # ONNX models (~45 MB total) are auto-downloaded on first use. # Diarization is not supported in streaming mode (silently skipped). # WHISPER_DIARIZATION=true # Exact number of speakers (if known). Improves clustering accuracy. # Leave unset or -1 for automatic detection. # WHISPER_DIARIZE_NUM_SPEAKERS= # Clustering threshold for automatic detection (default: 0.5). # Lower = more speakers, higher = fewer. Ignored when exact speaker count is set. # WHISPER_DIARIZE_THRESHOLD=0.5 # Anonymous aggregate usage counts (default: enabled) # Set to 1 to disable. # WHISPER_DISABLE_USAGE_COUNTS=1