docling-project/docling · error · ImportError
whisper_s2t is not installed. Please install it via `pip ins
Error message
whisper_s2t is not installed. Please install it via `pip install 'whisper-s2t-reborn[pyav]>=1.7.1'`.
What it means
The whisper_s2t transcriber (_WhisperS2TModel) imports the optional `whisper_s2t` package (the whisper-s2t-reborn distribution with the pyav extra, pinned >=1.7.1) when enabled and re-raises ImportError with the exact pip spec otherwise. It is a constructor-time missing-optional-dependency error for the faster batched ASR engine.
Source
Thrown at docling/pipeline/asr_transcriber.py:535
"""Transcriber using WhisperS2T with CTranslate2 backend for high-speed inference."""
def __init__(
self,
enabled: bool,
artifacts_path: Path | None,
accelerator_options: AcceleratorOptions,
asr_options: InlineAsrWhisperS2TOptions,
):
self.enabled = enabled
_log.info(f"artifacts-path: {artifacts_path}")
_log.info(f"accelerator_options: {accelerator_options}")
if self.enabled:
try:
import whisper_s2t # type: ignore
except ImportError:
raise ImportError(
"whisper_s2t is not installed. Please install it via "
"`pip install 'whisper-s2t-reborn[pyav]>=1.7.1'`."
)
self.whisper_s2t = whisper_s2t
self.asr_options = asr_options
raw_device = decide_device(
accelerator_options.device,
supported_devices=asr_options.supported_devices,
)
self.device, self.device_index = self._parse_device(raw_device)
_log.info(
f"Available device for WhisperS2T: {self.device} (index: {self.device_index})"
)
self.model_identifier = asr_options.repo_idView on GitHub (pinned to 61d76f1ff3)
Solutions
- Install exactly what the message asks: pip install 'whisper-s2t-reborn[pyav]>=1.7.1'
- Or switch asr_options back to an engine already installed (standard whisper via the asr extra)
Example fix
# before # InlineAsrWhisperS2TOptions selected, package missing # after pip install 'whisper-s2t-reborn[pyav]>=1.7.1'
Defensive patterns
Strategy: try-catch
Validate before calling
def whisper_s2t_available() -> bool:
try:
import whisper_s2t # noqa: F401
return True
except ImportError:
return False Try / catch
try:
_WhisperS2TModel(...)
except ImportError as e:
if 'whisper-s2t' in str(e):
raise SystemExit("pip install 'whisper-s2t-reborn[pyav]>=1.7.1'") from e
raise Prevention
- Add whisper-s2t-reborn[pyav]>=1.7.1 explicitly to your dependency set when selecting the s2t engine
- Probe for the engine before enabling InlineAsrWhisperS2TOptions
When it happens
Trigger: Enabling InlineAsrWhisperS2TOptions in an environment where whisper-s2t-reborn[pyav] is not installed — note the plain `asr` extra installs openai-whisper/mlx-whisper, not necessarily this engine, so selecting s2t requires its own install.
Common situations: Opting into the faster whisper_s2t engine for bulk audio transcription; assuming `docling[asr]` covers every ASR engine; fresh environments after copying config that selects s2t.
Related errors
- whisper is not installed. Please install it via `pip install
- The 'mail-parser' package is required to process email files
- The 'beautifulsoup4' package is required to process HTML fil
- The 'pylatexenc' package is required to process LaTeX files.
- The 'marko' package is required to process Markdown files. I
AI-assisted analysis of docling-project/docling@61d76f1ff3 (2026-08-14).
Data as JSON: /api/errors/53bc7d89f620f0d5.
Report an issue: GitHub.