Welcome to the SubtitleGenerator repository! This project leverages the power of AI to create subtitles quickly and efficiently. Using OpenAI's Whisper model, it supports multiple languages and offers batch processing with GPU acceleration. Generate SRT and WebVTT subtitles instantly for your videos.
- AI-Powered: Utilizes OpenAI Whisper for accurate transcription.
- Multi-Language Support: Generate subtitles in various languages.
- Batch Processing: Process multiple video files at once.
- GPU Acceleration: Speed up the transcription process using GPU.
- Format Support: Generate subtitles in SRT and WebVTT formats.
- Python: The primary programming language for development.
- OpenAI Whisper: For speech recognition and transcription.
- FFmpeg: For video processing.
- PyTorch: To handle machine learning tasks.
- Natural Language Processing: For effective subtitle generation.
To get started with SubtitleGenerator, follow these steps:
-
Clone the Repository:
git clone https://github.com/rakib-0/SubtitleGenerator.git cd SubtitleGenerator
-
Install Dependencies: Ensure you have Python installed. Then, install the required packages:
pip install -r requirements.txt
-
Download the Model: Download the Whisper model from the Releases section. Extract the files and place them in the
models
directory. -
Set Up FFmpeg: Make sure FFmpeg is installed on your system. You can download it from FFmpeg's official site.
Once you have set up the repository, you can start generating subtitles.
-
Prepare Your Video Files: Place your video files in the
videos
directory. -
Run the Subtitle Generator: Execute the following command to generate subtitles:
python generate_subtitles.py --input videos/your_video.mp4 --output subtitles/your_subtitle.srt
-
Batch Processing: To process multiple videos, use the batch command:
python batch_process.py --input videos/ --output subtitles/
-
Select Language: You can specify the language for transcription using the
--language
option:python generate_subtitles.py --input videos/your_video.mp4 --output subtitles/your_subtitle.srt --language en
-
View Generated Subtitles: The generated subtitles will be saved in the specified output directory. You can view them using any text editor or subtitle player.
We welcome contributions to enhance SubtitleGenerator. To contribute:
- Fork the repository.
- Create a new branch:
git checkout -b feature/YourFeature
- Make your changes and commit them:
git commit -m "Add Your Feature"
- Push to the branch:
git push origin feature/YourFeature
- Create a Pull Request.
Please ensure that your code adheres to the project's style guidelines.
This project is licensed under the MIT License. See the LICENSE file for details.
For questions or feedback, please reach out to the maintainer:
- Name: Rakib
- Email: rakib@example.com
- GitHub: rakib-0
Feel free to visit the Releases section for updates and downloads.
- Thanks to OpenAI for providing the Whisper model.
- Special thanks to the FFmpeg team for their incredible video processing tool.
By using SubtitleGenerator, you can simplify the process of adding subtitles to your videos. This tool not only saves time but also enhances accessibility for your audience. Enjoy creating and sharing your content!