{"record":{"id":"efe6fc9bb9f99622","repo":"Graphify-Labs/graphify","slug":"video-transcription-requires-faster-whisper-run","errorCode":null,"errorMessage":"Video transcription requires faster-whisper. Run: pip install 'graphifyy[video]'","messagePattern":"Video transcription requires faster-whisper\\. Run: pip install 'graphifyy\\[video\\]'","errorType":"exception","errorClass":"ImportError","httpStatus":null,"severity":"error","filePath":"graphify/transcribe.py","lineNumber":28,"sourceCode":"\nVIDEO_EXTENSIONS = {'.mp4', '.mov', '.webm', '.mkv', '.avi', '.m4v', '.mp3', '.wav', '.m4a', '.ogg'}\nURL_PREFIXES = ('http://', 'https://', 'www.')\n\n_DEFAULT_MODEL = \"base\"\n_TRANSCRIPTS_DIR = str(_out_path(\"transcripts\"))\n_FALLBACK_PROMPT = \"Use proper punctuation and paragraph breaks.\"\n\n\ndef _model_name() -> str:\n    return os.environ.get(\"GRAPHIFY_WHISPER_MODEL\", _DEFAULT_MODEL)\n\n\ndef _get_whisper():\n    try:\n        from faster_whisper import WhisperModel\n        return WhisperModel\n    except ImportError as exc:\n        raise ImportError(\n            \"Video transcription requires faster-whisper. \"\n            \"Run: pip install 'graphifyy[video]'\"\n        ) from exc\n\n\ndef _get_yt_dlp():\n    try:\n        import yt_dlp\n        return yt_dlp\n    except ImportError as exc:\n        raise ImportError(\n            \"YouTube/URL download requires yt-dlp. \"\n            \"Run: pip install 'graphifyy[video]'\"\n        ) from exc\n\n\ndef is_url(path: str) -> bool:\n    \"\"\"Return True if the string looks like a URL rather than a file path.\"\"\"","sourceCodeStart":10,"sourceCodeEnd":46,"githubUrl":"https://github.com/Graphify-Labs/graphify/blob/7fe58b0b0f3873be9a21c30106b8b8527c353aa6/graphify/transcribe.py#L10-L46","documentation":"Raised by _get_whisper (graphify/transcribe.py) when `from faster_whisper import WhisperModel` fails. Video transcription is optional functionality gated behind the [video] extra, so the import is deferred until actually needed and this ImportError tells you the extra was not installed. The original ImportError is chained as __cause__.","triggerScenarios":"Calling any transcription API that goes through _get_whisper (e.g. transcribing a local video file) in an environment where faster-whisper is not installed.","commonSituations":"Base install pip install graphifyy then attempting video ingestion; CPU-only machines where faster-whisper was skipped to avoid pulling CUDA wheels; CI environments trimmed to minimum deps.","solutions":["pip install 'graphifyy[video]' exactly as the message says.","If you only need audio from URLs, still install the same extra (it also provides yt-dlp).","On constrained machines verify the install succeeded: python -c \"from faster_whisper import WhisperModel\".","If the import fails despite install, check for ctranslate2/tokenizers binary-incompatibility errors in the chained cause."],"exampleFix":"# before\npip install graphifyy\ntranscribe(\"demo.mp4\")  # ImportError\n\n# after\npip install 'graphifyy[video]'\ntranscribe(\"demo.mp4\")","handlingStrategy":"validation","validationCode":"def whisper_available() -> bool:\n    try:\n        from faster_whisper import WhisperModel  # noqa: F401\n    except ImportError:\n        return False\n    return True\n\nif path.endswith((\".mp4\", \".mkv\", \".webm\")) and not whisper_available():\n    raise SystemExit(\"video support missing: pip install 'graphifyy[video]'\")","typeGuard":"def can_transcribe_video() -> bool:\n    return whisper_available()","tryCatchPattern":"try:\n    text = transcribe(media_path)\nexcept ImportError as e:\n    if 'graphifyy[video]' in str(e):\n        raise SystemExit(\"Video extra not installed. Run: pip install 'graphifyy[video]'\") from e\n    raise","preventionTips":["Install 'graphifyy[video]' on any node that ingests video.","Feature-flag video ingestion behind an availability check.","Test the faster_whisper import in environment validation scripts."],"tags":["video","transcription","installation","optional-dependencies"],"backgroundTag":null,"analyzedSha":"7fe58b0b0f3873be9a21c30106b8b8527c353aa6","analyzedAt":"2026-08-14T19:23:21.323Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}