Code Monkey home page Code Monkey logo

whisper_automations's Introduction

Installation

All of these scripts assume that you have followed my guide to installing and using Whisper. These scripts should be placed alongside the whisper, whisper-large-v3, and whisper.cpp repository folders.

To download these scripts and their dependencies, copy and paste the following commands into your bash terminal.

# Install Dependencies
sudo apt update
sudo apt install ffmpeg wget



# Download Scripts
wget https://github.com/Valkryst/Whisper_Automations/blob/main/extract_audio.sh
wget https://github.com/Valkryst/Whisper_Automations/blob/main/generate_subtitles.sh
wget https://github.com/Valkryst/Whisper_Automations/blob/main/regenerate_model.sh



# Modify the script permissions to allow them to be run.
chmod +x extract_audio.sh
chmod +x generate_subtitles.sh
chmod +x regenerate_model.sh

Usage

  1. If it has been some time since you have pulled the latest whisper-large-v3 model, you can run ./regenerate_model.sh to update and regenerate it.
  2. Copy your video files into the same directory as the scripts, and run ./extract_audio.sh. This will extract only the first audio track of each video file in the directory, and it will convert that audio track to a 16kHz .wav file as required by Whisper.
  3. Run ./generate_subtitles.sh to generate an .srt file for each of the .wav files. This may take a significant amount of time.

Notes

  • The generate_subtitles.sh script will attempt to automatically detect the source file's language and, if necessary, translate it to English.
  • The subtitles will never be perfect, but they do seem to work reasonably well.

whisper_automations's People

Contributors

valkryst avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.