47 lines
1.6 KiB
Markdown

# Media Transcriber
A local media transcription service that indexes a video library and transcribes it with a local Whisper server. Designed to run unattended on a home server.
> Personal tooling project — works for my own media library, not packaged for general use.
## How It Works
1. **Scan**`indexer` walks the media directory, probes each video (duration, size), and records which files are already transcribed
2. **Transcribe** — the `worker` pulls pending files, sends audio to a local Whisper server, and saves transcripts next to the source
3. **Continuous** — a loop mode keeps the library up to date as new media arrives
## Commands
```bash
python mt.py scan # (re)index the media library
python mt.py transcribe # process all pending videos once
python mt.py continuous # run the worker in a loop
python mt.py status # show library/transcription stats
```
## Project Structure
| Path | Description |
|------|-------------|
| `mt.py` | CLI entry point |
| `src/indexer.py` | Library scanning and indexing |
| `src/worker.py` | Transcription worker (one-shot and continuous) |
| `systemd/` | `media-transcriber.service` and `whisper-server.service` units |
| `setup.sh` | Initial environment setup |
## Deployment
Install the systemd units for an unattended setup:
```bash
sudo cp systemd/media-transcriber.service systemd/whisper-server.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now whisper-server media-transcriber
```
## Requirements
- Python 3.10+
- A running Whisper server (see `systemd/whisper-server.service`)
- `ffmpeg` for audio probing/extraction