Git Product home page Git Product logo

ai-captions's Introduction

GitHub issues GitHub forks GitHub stars GitHub license

Ai Captions

Create captions for videos using AI.

Description

This small project uses OpenAI's whisper AI to generate captions for videos.

Getting Started

Dependencies

  • FFmpeg
  • Python

Installing

  • Clone the repo
  • Install python from here if you have not already installed it.
  • You can install FFmpeg from here or use your package manager to install it.
  • Install the requirements by running py setup.py inside of the project directory.

Executing program

  • If you have not already, run the setup.py file to install the required packages.
python setup.py
  • Then run the main.py with your own arguments.
python main.py -v <video path> -m <whisper model name> -p (-p is optional)
  • Example
python main.py -v video.mp4 -m tiny.en -p
  • Arguments

    • -v or --video - The path to the video file.
    • -m or --model - The name of the model to use. (The list of models can be found below)
    • -p or --preview - If you want to preview the generated video.
  • Models

Size Parameters English-only model Multilingual model Required VRAM Relative speed
tiny 39 M tiny.en tiny ~1 GB ~32x
base 74 M base.en base ~1 GB ~16x
small 244 M small.en small ~2 GB ~6x
medium 769 M medium.en medium ~5 GB ~2x
large 1550 M N/A large ~10 GB 1x

For English-only applications, the .en models tend to perform better, especially for the tiny.en and base.en models. These models are provided by OpenAI. More Info

It may take some time to run for the first time since the AI model needs to be downloaded.

The output of the program will be in the output folder. There will be a video called output.mp4 inside of the folder. There will also be a transcript file called captions.vtt and an audio file called audio.mp3.

Help

Make an Issue to report a bug or request a feature.

Authors

@GodModed

Version History

  • 0.3
    • Using ffmpeg instead of moviepy
    • Increased speed by so much
  • 0.2
    • Added the ability to preview the generated video.
    • Added better argument parsing.
  • 0.1.1
    • Fixed video getting cut off
  • 0.1.0
    • Initial Release

License

This project is licensed under the GNU General Public License v3.0 License.

Acknowledgments

ai-captions's People

Contributors

godmoded avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ai-captions's Issues

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.