Skip to main content

Generate SRT subtitles from video/audio files using Whisper

Project description

makesub

Generate SRT subtitle files from any video or audio file using OpenAI Whisper.

Requirements

  • Python 3.9+
  • ffmpeg — install via Homebrew on macOS:
brew install ffmpeg

Installation

pip install makesub

Apple Silicon (M1/M2/M3): Install PyTorch first to get the MPS-accelerated build:

pip install torch
pip install makesub

Usage

makesub video.mp4

Output is written alongside the input file: video.srt

Options

makesub <filepath> [options]

  --model    Model to use: tiny, base, small, medium, large (default: base)
  --language Language code, e.g. en, fr, ja. Use 'auto' to detect (default: en)
  --output   Output .srt path or directory (default: alongside input file)
  --device   Force compute device: cpu, mps, cuda (default: auto)
  --verbose  Stream decoded segments in real time

Examples

# Use a more accurate model
makesub lecture.mp4 --model medium

# Auto-detect language
makesub interview.mp4 --language auto

# Save subtitle to a specific location
makesub clip.mp4 --output ~/Desktop/clip.srt

Models

Model Size Speed Accuracy
tiny 75 MB fastest lower
base 145 MB fast good
small 465 MB medium better
medium 1.5 GB slow great
large 3 GB slower best

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

makesub-0.1.0.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

makesub-0.1.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file makesub-0.1.0.tar.gz.

File metadata

  • Download URL: makesub-0.1.0.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.0

File hashes

Hashes for makesub-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1a01f7a4f4f5f5f4cd3408b8c87291d7efadb3d2357d9d4e5f2e821dd00cc0ff
MD5 eefe512ecbda279f4630aa8fc4f4681a
BLAKE2b-256 d5d5933316cdb61ac9903516f1694795ac8e985c9f343e93a580e3781ca16e66

See more details on using hashes here.

File details

Details for the file makesub-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: makesub-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.0

File hashes

Hashes for makesub-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ece4fd2a1a4a0aa5172f138a1f5836a3d52ef9a1266e38009b12be63e50b6ce9
MD5 0c53e88fd60761057b7742c4de372f9d
BLAKE2b-256 e37a15d0f4d10b706bf18855dcf037f9b3e6fb17e39efb51bac9ebb5796a91aa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page