Skip to content

Latest commit

 

History

History
86 lines (55 loc) · 2.54 KB

README.md

File metadata and controls

86 lines (55 loc) · 2.54 KB

Whisper Makefile

Test Status

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.

Motivation

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.

Prerequisites

  • you have a Windows system
  • you have python installed (>= version 3.10)
  • you have ffmpeg installed
  • you have git installed

CUDA

If your system supports cuda, install the drivers. You can check which Cuda version is installed with

nvcc --version

or using

nvidia-smi

Installation

Make 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

How to run whisper

After activating the .venv environment by running. Here is how to activate it on Windows:

.\.venv\Scripts\Activate.ps1

You 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.

Issues

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 False

Notes

Here 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