{"record":{"id":"53bc7d89f620f0d5","repo":"docling-project/docling","slug":"whisper-s2t-is-not-installed-please-install-it-vi","errorCode":null,"errorMessage":"whisper_s2t is not installed. Please install it via `pip install 'whisper-s2t-reborn[pyav]>=1.7.1'`.","messagePattern":"whisper_s2t is not installed\\. Please install it via `pip install 'whisper-s2t-reborn\\[pyav\\]>=1\\.7\\.1'`\\.","errorType":"exception","errorClass":"ImportError","httpStatus":null,"severity":"error","filePath":"docling/pipeline/asr_transcriber.py","lineNumber":535,"sourceCode":"    \"\"\"Transcriber using WhisperS2T with CTranslate2 backend for high-speed inference.\"\"\"\n\n    def __init__(\n        self,\n        enabled: bool,\n        artifacts_path: Path | None,\n        accelerator_options: AcceleratorOptions,\n        asr_options: InlineAsrWhisperS2TOptions,\n    ):\n        self.enabled = enabled\n\n        _log.info(f\"artifacts-path: {artifacts_path}\")\n        _log.info(f\"accelerator_options: {accelerator_options}\")\n\n        if self.enabled:\n            try:\n                import whisper_s2t  # type: ignore\n            except ImportError:\n                raise ImportError(\n                    \"whisper_s2t is not installed. Please install it via \"\n                    \"`pip install 'whisper-s2t-reborn[pyav]>=1.7.1'`.\"\n                )\n\n            self.whisper_s2t = whisper_s2t\n            self.asr_options = asr_options\n\n            raw_device = decide_device(\n                accelerator_options.device,\n                supported_devices=asr_options.supported_devices,\n            )\n\n            self.device, self.device_index = self._parse_device(raw_device)\n            _log.info(\n                f\"Available device for WhisperS2T: {self.device} (index: {self.device_index})\"\n            )\n\n            self.model_identifier = asr_options.repo_id","sourceCodeStart":517,"sourceCodeEnd":553,"githubUrl":"https://github.com/docling-project/docling/blob/61d76f1ff3f8428065465889f7b4577da7df704c/docling/pipeline/asr_transcriber.py#L517-L553","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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)"],"exampleFix":"# before\n# InlineAsrWhisperS2TOptions selected, package missing\n\n# after\npip install 'whisper-s2t-reborn[pyav]>=1.7.1'","handlingStrategy":"try-catch","validationCode":"def whisper_s2t_available() -> bool:\n    try:\n        import whisper_s2t  # noqa: F401\n        return True\n    except ImportError:\n        return False","typeGuard":null,"tryCatchPattern":"try:\n    _WhisperS2TModel(...)\nexcept ImportError as e:\n    if 'whisper-s2t' in str(e):\n        raise SystemExit(\"pip install 'whisper-s2t-reborn[pyav]>=1.7.1'\") from e\n    raise","preventionTips":["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"],"tags":["asr","whisper-s2t","optional-dependency","installation"],"backgroundTag":null,"analyzedSha":"61d76f1ff3f8428065465889f7b4577da7df704c","analyzedAt":"2026-08-14T23:53:18.727Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}