Skip to main content

Musical Recording Captioning

Caption recordings of musical theater, concerts, or any video that has lyrics on Genius.

How it works

  1. Fetches all track lyrics for an album from the Genius API
  2. Transcribes the audio locally using Whisper (via faster-whisper) to get word-level timestamps
  3. Fuzzy-matches each lyric line to the transcript to determine timing
  4. Writes a .srt subtitle file

All processing after the initial Genius lyrics fetch runs entirely offline.

Prerequisites

Installation

pip install musicalrecordingcaptioning

Or from source:

git clone https://github.com/you/MusicalRecordingCaptioning
cd MusicalRecordingCaptioning
python -m venv .venv && source .venv/bin/activate
pip install -e .

The installer automatically downloads the default Whisper model (small) so the first run works offline.

Configuration

Copy .env.example to .env and fill in your token:

GENIUS_ACCESS_TOKEN=your_token_here

Or pass it directly via --genius-token.

Usage

# Basic usage (token from .env, auto-detects language)
mrc recording.mp4 --url https://genius.com/albums/Lin-manuel-miranda/Hamilton

# Specify language explicitly for faster, more accurate transcription
mrc recording.mp4 --url https://genius.com/albums/Lin-manuel-miranda/Hamilton --language en

# French show
mrc spectacle.mp4 --url https://genius.com/albums/... --language fr

# Specify output file and a larger model for better accuracy
mrc show.mp4 --url https://genius.com/albums/Claude-michel-schonberg/Les-miserables-original-broadway-cast-recording \
    --output les-mis.srt --model medium --language fr

# Also caption dialogue and non-song audio with the raw Whisper transcript
mrc recording.mp4 --url https://genius.com/albums/Lin-manuel-miranda/Hamilton --keep-transcription

# Pass token explicitly
mrc concert.mp3 --url https://genius.com/albums/Anais-mitchell/Hadestown \
    --genius-token abc123

Options

Option Default Description
--url required Genius album URL (https://genius.com/albums/...)
--genius-token from .env Genius API access token
--output <input>.srt Output SRT file path
--model small Whisper model: tiny, base, small, medium, large
--language auto-detect Audio language as ISO 639-1 code (e.g. en, fr, de)
--keep-transcription off Fill gaps between songs with raw Whisper transcript captions

Caption format

Lyric lines are wrapped with ♪ symbols (♪ lyrics here ♪), matching standard subtitle convention for sung content. When --keep-transcription is enabled, dialogue and non-song audio appear as plain text captions.

Whisper models

Model Size Notes
tiny ~75 MB Fastest, least accurate
base ~145 MB Good for clear speech
small ~466 MB Default. Handles singing and background music well
medium ~1.5 GB High accuracy, slower
large ~3.1 GB Best accuracy, slow

Only the small model is downloaded at install time. Other models are downloaded on first use when specified via --model.

Metadata

Release files for musicalrecordingcaptioning 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for musicalrecordingcaptioning 0.1.1
File Size Uploaded
musicalrecordingcaptioning-0.1.1.tar.gz 9.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for musicalrecordingcaptioning 0.1.1
File Interpreter ABI Platform
musicalrecordingcaptioning-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 18.9 kB

Release files / musicalrecordingcaptioning-0.1.1.tar.gz

Download URL musicalrecordingcaptioning-0.1.1.tar.gz
Size 9.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ebae70ebd846d5f4bef532ea7da43c5e7cf1668a517f487d7e02bf36c7310e62
BLAKE2b-256 checksum
How to use checksums
0f775c38adc78a58ad4578b90bff807ebeca0a59d06e1816f2963013daa6f596
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 4, 2026.

Transparency log

Release files / musicalrecordingcaptioning-0.1.1-py3-none-any.whl

Download URL musicalrecordingcaptioning-0.1.1-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8b40ff9cd1c2d7b3cf597e6fe2616de0eb4c31ccd9fbd3656904b7233d275555
BLAKE2b-256 checksum
How to use checksums
6119e4bc0b8141eab7b39318f45eb7ea8a7e4864bb4513b8191f3b73754b1681
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 4, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page