gen-subs  by TejasQ

Generate subtitles for videos using secure, on-device ML

Created 2 years ago
251 stars

Top 99.8% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides a secure, on-device solution for generating video and audio subtitles using machine learning models. It targets users prioritizing data privacy and offline functionality, offering a self-contained alternative to cloud-based transcription services with benefits like multilingual support and customizable output formats.

How It Works

Gen-subs leverages downloadable, on-device machine learning models to perform speech-to-text transcription. This approach eliminates the need for internet connectivity or reliance on external APIs like OpenAI, ensuring all processing and data remain local for enhanced security and privacy. Users can select from various model sizes, balancing computational resources against subtitle accuracy.

Quick Start & Requirements

Installation is handled via Node Package Manager (npm) or Yarn, requiring npx to run. The primary command is npx gen-subs for <mediaFile>. The first execution necessitates downloading a machine learning model. Additional commands manage model downloads (npx gen-subs models), listing (npx gen-subs models ls), and purging (npx gen-subs models purge). Options exist for burning subtitles into video (burn-in) or embedding them into metadata (embed).

Highlighted Details

  • Privacy-Focused: All ML models run locally; no user data is transmitted off-device.
  • Extensive Multilingual Support: Includes English, Chinese, French, German, Spanish, Russian, Japanese, Korean, and many others.
  • Flexible Output: Generates standard .srt files, advanced .ass files with focus word highlighting, burns subtitles directly onto video, or embeds them in video metadata.
  • Configurable Models: Offers a range of model sizes (40MB to >2GB) allowing users to choose between faster, smaller models or more accurate, larger ones.

Maintenance & Community

The project encourages community contributions via issues and pull requests. While specific community channels (like Discord/Slack) or a formal roadmap are not detailed, the author seeks sponsorship on GitHub to support full-time development and education.

Licensing & Compatibility

Described as "free and open source software," though a specific license (e.g., MIT, Apache) is not explicitly stated in the provided text. This suggests permissive terms for use and modification, but users should verify explicit licensing for commercial or closed-source integration.

Limitations & Caveats

The default, small English model (40MB) is noted to be basic and may produce inaccurate results. For improved accuracy, users must download and select larger, more capable models. The project relies on the Node.js ecosystem (npx).

Health Check
Last Commit

2 years ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
0 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.