Code Monkey home page Code Monkey logo

auto-sub's Introduction

AutoSub

Automatically subtitle a video from almost any language to your native language with at least 70% of precision.

Setup

Just clone this repository, run python -r requeriments.txt to install dependences and then you already can use it.

Usage and Resources

This script has support for a lot of languages, take a look in python main.py --languages to see all supported languages or python main.py --has-lang japan to search for a especific country.

You can use the script by passing the video path to script:

python main.py -f ~/Desktop/my_personal_show_eps1.mp4

You also can set a from_language (video) and to_language (srt). If you no set langs then the default is from japanese to portuguese for now.

python main.py --file ~/Desktop/my_anime_eps1.mp4 --from-language ja --to-language en

The script will generate files into tmp folder inside projet. First create a .wav file with audio of video, then analisys and create separeted chunks of each non-silence detection. Now we check each chunk, recognize if there is speak, translate to target language and then finally write it on srt file.

After copy the srt and finish with it, you can cleanup the tmp folder easly just run

python main.py --cleanup

TO-DO

Here I'm separating the to-do list that still need work on

Fixes

  • Improve the voice recognize (currently the precision is just around 50%)
  • Small texts for a very fast time instead showing a whole sentence for few seconds
  • Huge texts at once for long time instead showing slowly parts of text in small times

Features

Contribute

You can contribue with this project, just fork it, make a branch and open a PR.

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details

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.