Project Introduction: Subtitle
Subtitle is an open-source project designed to streamline the generation of subtitles for various types of video content. This innovative tool aims to make content translation more accessible by providing seamless subtitle solutions powered by advanced AI technology. Created as a hobby project, it holds potential utility for a wider audience seeking efficient subtitle generation.
Key Features
-
Open-source: Subtitle is freely available for anyone to use, modify, and distribute. This openness ensures that users can tailor the tool to their specific needs and share improvements with the community.
-
Self-hosted: Users can run this tool on their own servers, which grants them increased control over the process and ensures their privacy is maintained.
-
AI-powered: By leveraging cutting-edge machine learning techniques, Subtitle produces accurate and natural-sounding subtitles, enhancing the accessibility and reach of video content.
-
Multilingual Support: The tool supports a broad spectrum of languages, making it versatile for use worldwide and enabling content creators to reach diverse audiences.
-
Easy Integration: Subtitle is designed to integrate smoothly into existing workflows, minimizing disruption and allowing users to adopt the tool with minimal setup.
Installation
To get started with Subtitle, you'll first need to install FFmpeg, an essential component. On Linux, this can be achieved with the command:
sudo apt install ffmpeg
Running the Script
The Subtitle script can be run from the command line. Use the following command, replacing <filepath | video_url>
with your video file's path or URL:
python subtitle.py <filepath | video_url> [--model <modelname>]
If you do not specify a model, the script will default to the 'base' model.
Available Models
Subtitle offers various models tailored to specific needs, such as:
- tiny.en
- base
- small.en
- medium
- large-v1
Models with .en
suffix are optimized for English videos. These options allow users to select the model best suited to their task, balancing performance and speed.
Advanced Options
For more in-depth customization, the whisper
binary provides additional parameters:
- Define threads and processors for computation
- Set audio processing duration and offsets
- Choose output formats like .txt, .vtt, .srt, etc.
- Enable translation from source language to English
- Adjust performance settings like beam size and decoder thresholds
Example Command
To use the whisper binary and generate subtitles in a VTT file, input:
./whisper -m models/ggml-tiny.en.bin -f Rev.mp3 out.wav -nt --output-vtt
This command processes the Rev.mp3
file and outputs the results in the .vtt format.
License and Contribution
Subtitle is distributed under the MIT License, encouraging innovation and development within the open-source community. Contributions and feedback are welcome.
Credits and References
Subtitle builds upon the Whisper project by OpenAI, and it references notable GitHub repositories and publications:
Contact and Support
The project is developed by Ved Gupta, who is open to feedback and support inquiries. For questions or support, reach out via email at [email protected].
Subtitle is a powerful tool born out of curiosity and a passion for development, embodying the spirit of innovation and accessibility for video content creators globally.