Coder Social home page Coder Social logo

karinbrisker / video-subtitler Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 1.0 3.88 MB

Automatically Generating Multilingual Subtitles Using OpenAI's Whisper and Google-Translator

Python 100.00%
asr audio ffmpeg google-translate-api multilingual openai-whisper subtitles transcribe translation video whisper

video-subtitler's Introduction

Video Subtitler ๐Ÿฟ

Adding Subtitles to Your Videos Made Easy ๐ŸŽ‰

Overview

The demand for multilingual subtitling has significantly increased with the growth of online video platforms and global communication. It is an essential part of video production that allows hearing-impaired viewers and people who speak different languages to enjoy and comprehend video content.

To address this need, the video-subtitler project is available on GitHub as an open-source Python project. The project utilizes powerful libraries such as ffmpeg and openAI whisper to handle various video formats and recognize text in different languages.

This repository provides an automated solution for generating subtitles in multiple languages for videos. It includes an interactive interface using Gradio, allowing users to input a video file and select the source and target languages for the subtitles.

Installation

  1. Clone this repository using git clone https://github.com/KarinBrisker/video-subtitler.git
  2. Install the required packages using pip install -r requirements.txt

Usage

The video-subtitler project provides a command-line interface for adding subtitles to videos in multiple languages. To use the project, you will need to have a video file and a text file containing the subtitles in the target languages. The following command will add subtitles to a video:

python main.py <path_to_video> --output_dir <output_directory> --input_language <input_language> --output_language <output_language>

Make sure to replace <path_to_video> with the actual path to your video file, <output_directory> with the directory where you want to save the output file, <input_language> with the code of the language spoken in the video (or leave it blank for language detection), and <output_language> with the code of the language for the subtitles.

For example, if you have saved your video file as myvideo.mp4 in the same directory as your Python file, and you want to generate Spanish subtitles for it, you can use the following command:

python main.py myvideo.mp4 --output_dir output --input_language English --output_language Spanish

Demo

You can try out a demo of the video subtitler here!

demo status

input video translated video translated video

Acknowledgements

Contributing

Contributions to this repository are welcome! ๐Ÿ˜‡

If you find a bug or have a feature request, please open an issue on the repository or submit a pull request.

License

This project is licensed under the MIT License

video-subtitler's People

Contributors

karinbrisker avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

shukehi

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.