Giter VIP home page Giter VIP logo

vidsubspy's Introduction

VidSubsPy

automated video subtitles creation using whisperx, moviepy and optional chatGPT for translation

Overview

This Python library provides a comprehensive solution for generating subtitles for videos in different languages. It leverages:

  • WhisperX ASR for speech-to-text transcription.
  • ChatGPT for optional translation of the transcription.
  • MoviePy for generating videos with subtitles.

Core Functionalities

1. Video to Transcript (vid2transcript.py)

This script converts a given video file into a transcript file (json). It uses WhisperX ASR for the transcription process.

Usage:

python vid2transcript.py --input_video /path/to/video.mp4 --output_transcript /path/to/transcript.json

2. Translate Transcript (translatetranscript.py)

This script translates an existing transcript file into another language. The translation is done using ChatGPT.

Usage:

python translatetranscript.py --input_transcript /path/to/transcript.json --output_transcript /path/to/translated_transcript.json --target_language es

3. Transcript to Subtitled Video (transcript2subvid.py)

This script takes a transcript file and an original video to generate a new video with subtitles. The subtitles are generated using the MoviePy library.

Usage:

python transcript2subvid.py --input_transcript /path/to/transcript.json --input_video /path/to/video.mp4 --output_video /path/to/video_with_subtitles.mp4

Installation

pip install -r requirements.txt

Dependencies

  • Whisper X ASR
  • ChatGPT (Optional for translation)
  • MoviePy

vidsubspy's People

Contributors

carnifexer avatar

Stargazers

yesj1234 avatar  avatar  avatar  avatar  avatar Alireza Furutanpey avatar

Watchers

 avatar

Forkers

krotosz6

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.