The Whisper Video2SRT repository focuses on converting video files (formats supported by FFmpeg) into .srt subtitle files. It incorporates the OpenAI Whisper large-v3 model via the HuggingFace pipeline, enabling optimizations. While the main GitHub version provides timestamping and SRT file output functionalities, they are not integrated (as of the time), and this version lacks optimizations.
-
Place your video files into the
video_input
folder. -
Run the
video2srt.ipynb
orvideo2srt.py
script.
-
Install Homebrew (if not already installed): Run this in Terminal:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
-
Add Homebrew to PATH (if needed):
- For Zsh (default shell):
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zshrc eval "$(/opt/homebrew/bin/brew shellenv)"
- For Bash:
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.bash_profile
- Install FFmpeg:
brew install ffmpeg
- Download FFmpeg:
- Visit FFmpeg's official website.
- Choose and download the Windows build.
- Extract and Place FFmpeg:
- Extract the downloaded file to a folder, for example,
C:\\FFmpeg
.
- Add FFmpeg to PATH:
- Type "Environment Variables" in the search bar on the Start menu.
- Click on "Edit the system environment variables" or "Edit environment variables for your account".
- Under 'System Variables', find and select the 'Path' variable, then click 'Edit'.
- Click 'New' and add the path to the
bin
folder inside your FFmpeg folder (e.g.,C:\\FFmpeg\\bin
). - Click 'OK' to close all dialog boxes.
Remember to restart your IDE after installing FFmpeg.
Run this command:
pip install -r requirements.txt