This repository contains a Makefile to install whisper CLI on Windows. Whisper allows you to generate and even translate subtitles for various media files.
Alternately you can also run the whisper cli directly via docker. See jo-hoe/whisper-docker-cli for more details.
The installation is straightforward, but it needs multiple commands, which are not all on a single page summarized for Windows. This repo automates the installation steps using a virtual environment.
- you have a Windows system
- you have python installed (>= version 3.10)
- you have ffmpeg installed
- you have git installed
If your system supports cuda, install the drivers. You can check which Cuda version is installed with
nvcc --versionor using
nvidia-smiMake sure you have make installed.
-
for an installation with CUDA support run
make install_cuda
-
for an installation without CUDA support run
make install_cpu
After activating the .venv environment by running.
Here is how to activate it on Windows:
.\.venv\Scripts\Activate.ps1You can use the whisper CLI.
To create subtitles for a file you run
whisper <input filename or path>Run whisper --help to get a description of the other arguments.
Some models have an issue with the subtitles going out of sync.
Use the --condition_on_previous_text False parameter to address this issue.
Here is an example with this parameter and German input video, which will be translated into English subtitles.
whisper 'pathToMyGermanVideo.mp4' --language German --task translate --condition_on_previous_text FalseHere are the sources for the Makefile commands
- the plain whisper installation is documented on their webpage
- the pytorch command was built using the pytorch website