Video trimming for Educational Content in Low-Production Environments
conda create --name whisperx python=3.11
conda activate whisperx
conda install pytorch==2.0.0 torchaudio==2.0.0 pytorch-cuda=11.8 -c pytorch -c nvidia
conda install pytorch==2.0.0 torchvision==0.15.0 torchaudio==2.0.0 -c pytorch
pip install torch==2.0.0 torchvision==0.15.1 torchaudio==2.0.1
pip install torch==2.0.0 torchvision==0.15.1 torchaudio==2.0.1 --index-url https://download.pytorch.org/whl/rocm5.4.2
pip install torch==2.0.0 torchvision==0.15.1 torchaudio==2.0.1
pip install torch==2.0.0 torchvision==0.15.1 torchaudio==2.0.1 --index-url https://download.pytorch.org/whl/cu118
pip install torch==2.0.0 torchvision==0.15.1 torchaudio==2.0.1 --index-url https://download.pytorch.org/whl/c
See other methods here.
It also requires the command-line tool ffmpeg
to be installed on your system, which is available from most package managers:
# on Ubuntu or Debian
sudo apt update && sudo apt install ffmpeg
# on Arch Linux
sudo pacman -S ffmpeg
# on MacOS using Homebrew (https://brew.sh/)
brew install ffmpeg
# on Windows using Chocolatey (https://chocolatey.org/)
choco install ffmpeg
# on Windows using Scoop (https://scoop.sh/)
scoop install ffmpeg
Partially taken from WhisperX Installation Guide.
pip install git+https://github.com/m-bain/whisperx.git
If already installed, update package to most recent commit
pip install git+https://github.com/m-bain/whisperx.git --upgrade
Some users face installation failures due to an error with ctranslate
version not being satisfied.
This can be fixed with the following
pip install git+https://github.com/m-bain/whisperx.git@9b9e03c4cc88ddfbbdf5f896918e57dc0298db41