Metadata-Version: 2.4
Name: makesub
Version: 0.1.0
Summary: Generate SRT subtitles from video/audio files using Whisper
Author-email: Akshay Gupta <hi@akshaygpt.com>
License: MIT
Project-URL: Homepage, https://github.com/akshaygpt/makesub
Keywords: subtitles,srt,whisper,transcription,video
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS
Classifier: Topic :: Multimedia :: Video
Classifier: Topic :: Multimedia :: Sound/Audio :: Speech
Classifier: Environment :: Console
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: openai-whisper>=20231117
Requires-Dist: torch>=1.12

# makesub

Generate SRT subtitle files from any video or audio file using [OpenAI Whisper](https://github.com/openai/whisper).

## Requirements

- Python 3.9+
- [ffmpeg](https://ffmpeg.org/) — install via Homebrew on macOS:

```bash
brew install ffmpeg
```

## Installation

```bash
pip install makesub
```

> **Apple Silicon (M1/M2/M3):** Install PyTorch first to get the MPS-accelerated build:
> ```bash
> pip install torch
> pip install makesub
> ```

## Usage

```bash
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

```bash
# 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
