Skip to content

Commit 76e0382

Browse files
Update distl-whisper deps (#3568)
1 parent 2436711 commit 76e0382

1 file changed

Lines changed: 13 additions & 4 deletions

File tree

notebooks/distil-whisper-asr/distil-whisper-asr.ipynb

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,19 @@
7070
},
7171
"outputs": [],
7272
"source": [
73-
"%pip install -q \"transformers==4.57.6\" \"torch==2.8\" \"onnx!=1.16.2\" --extra-index-url https://download.pytorch.org/whl/cpu\n",
74-
"%pip install -q \"git+https://github.com/huggingface/optimum-intel.git\"\n",
75-
"%pip install -q \"openvino>=2025.1.0\" \"datasets<4.0.0\" \"gradio>=4.19,<6\" \"librosa\" \"soundfile\" \"torchcodec\"\n",
76-
"%pip install -q \"nncf>=2.16.0\" \"jiwer\"\n",
73+
"%pip install -q \"openvino>=2025.1.0\" \"nncf>=2.16.0\"\n",
74+
"%pip install -q \"git+https://github.com/huggingface/optimum-intel.git\" \"transformers==4.57.6\" \"torch==2.8\" \"onnx!=1.16.2\" \"datasets<4.0.0\" \"jiwer\" \"gradio>=4.19,<6\" \"librosa\" \"soundfile\" \"torchcodec\" --extra-index-url https://download.pytorch.org/whl/cpu\n",
75+
"\n",
76+
"\n",
77+
"# transformers' ASR pipeline imports torchcodec whenever it is installed, but torchcodec needs\n",
78+
"# system-wide \"full-shared\" FFmpeg libraries. If they are missing (typical on CI), importing it\n",
79+
"# raises at runtime and breaks the pipeline. Probe it here and, if it can't load, remove it so the\n",
80+
"# pipeline falls back to soundfile/librosa decoding.\n",
81+
"try:\n",
82+
" import torchcodec # noqa: F401\n",
83+
"except Exception:\n",
84+
" %pip uninstall -q -y torchcodec\n",
85+
"\n",
7786
"\n",
7887
"import requests\n",
7988
"from pathlib import Path\n",

0 commit comments

Comments
 (0)