TUI-first tool for transcribing, translating, and analyzing audio/video media
Project description
mediascribe
TUI-first tool for transcribing, translating, and analyzing audio/video media.
mediascribe takes audio or video files and produces transcriptions, translations, subtitles, and AI-powered analysis. It supports local (faster-whisper) and cloud (OpenAI) transcription, speaker diarization, multi-language translation, and customizable prompt profiles.
Install
From PyPI (recommended)
pipx install mediascribe # isolated install
pip install mediascribe # or into current environment
With optional extras
pip install mediascribe[tui] # Textual TUI interface
pip install mediascribe[diarize] # speaker diarization (pyannote.audio)
pip install mediascribe[all] # everything
From Homebrew (after first PyPI release)
brew tap shawnpetros/mediascribe
brew install mediascribe
Note: This requires the tap repo to exist — see Publishing > Homebrew for setup instructions.
From source
git clone https://github.com/shawnpetros/mediascribe.git
cd mediascribe
make install # editable install with dev tools
Requirements
- Python 3.12+
- FFmpeg 6+ — install via
brew install ffmpegorapt install ffmpeg - OpenAI API key — for translation and API transcription mode
Quick Start
# Transcribe a video (auto-detects language)
mediascribe transcribe video.mp4
# Transcribe Japanese audio → English subtitles
mediascribe transcribe podcast.mp3 --lang ja --translate en
# Use the anime profile with multiple output formats
mediascribe transcribe anime.mkv --translate en --profile anime --formats srt,vtt
# Translate an existing SRT file
mediascribe translate subtitles.srt --target en --profile anime
# Batch process a folder
mediascribe batch ./recordings/ --translate en --formats srt,txt,json
# Enable speaker diarization and AI analysis
mediascribe transcribe meeting.mp4 --diarize --analyze --formats srt,txt,json
# Launch the interactive TUI
mediascribe tui
Configuration
# Show current settings
mediascribe config show
# Set your API key
mediascribe config set openai_api_key sk-...
# Initialize config directory with profile templates
mediascribe config init
# List available profiles
mediascribe config profiles
Configuration is loaded from (highest priority first):
- CLI flags
- Environment variables (
MEDIASCRIBE_*) .envfile in working directory~/.config/mediascribe/config.toml- Built-in defaults
Profiles
Profiles are named config presets. Built-in profiles: general, anime, podcast, meeting.
Create custom profiles as TOML files in ~/.config/mediascribe/profiles/:
# ~/.config/mediascribe/profiles/lectures.toml
description = "University lecture transcription"
[transcription]
mode = "local"
model = "large-v3"
[translation]
target_language = "en"
enable_review = true
custom_instructions = """
Preserve technical terminology accurately.
Format mathematical expressions clearly.
"""
[output]
formats = ["srt", "txt", "json"]
Development
git clone https://github.com/shawnpetros/mediascribe.git
cd mediascribe
make install # install editable + dev deps
make test # run test suite (184 tests)
make lint # run ruff linter
make format # auto-format code
make typecheck # run mypy
make check # all of the above
make build # build sdist + wheel
make help # show all targets
Make Targets
| Target | Description |
|---|---|
make install |
Install package in editable mode with dev extras |
make install-all |
Install with all optional extras (tui, diarize, dev) |
make test |
Run test suite |
make test-cov |
Run tests with coverage report |
make lint |
Run ruff linter |
make format |
Auto-format code with ruff |
make typecheck |
Run mypy type checker |
make check |
Run all checks (lint + format + types + tests) |
make build |
Build sdist and wheel |
make build-check |
Build and validate distribution with twine |
make publish-test |
Publish to TestPyPI |
make publish |
Publish to PyPI |
make clean |
Remove all build/cache artifacts |
make version |
Show current package version |
Publishing
Fully automated (recommended)
The entire release pipeline is automated. To ship a new version:
# 1. Bump version in both files
# - pyproject.toml: version = "0.2.0"
# - src/mediascribe/__init__.py: __version__ = "0.2.0"
# 2. Commit and merge to main
git add -A && git commit -m "release: v0.2.0"
git push
What happens automatically on merge to main:
- release.yml detects the version change in
pyproject.toml, creates av0.2.0tag - publish.yml triggers on the new tag:
- Runs full CI (tests, lint, typecheck)
- Builds sdist + wheel
- Smoke tests the built wheel (CLI loads, commands respond)
- Publishes to PyPI via trusted publisher (OIDC)
- Creates a GitHub Release with auto-generated notes
- Updates the Homebrew tap formula with the new version + SHA256
One-time setup
PyPI: Configure trusted publisher in your PyPI project settings to trust the publish.yml workflow from your GitHub repo.
Homebrew tap:
- Create a GitHub repo named
shawnpetros/homebrew-mediascribewith aFormula/directory - Add a repo secret
HOMEBREW_TAP_TOKENin the mediascribe repo — a personal access token withreposcope on the tap repo - Optionally set a repo variable
HOMEBREW_TAP_REPOif the tap is at a different path (defaults toshawnpetros/homebrew-mediascribe)
After setup, users install via:
brew tap shawnpetros/mediascribe
brew install mediascribe
Manual publishing
make build-check # build + validate
make publish-test # upload to TestPyPI first
make publish # upload to PyPI
Architecture
Input File(s)
│
▼
[Detect] → file type, duration, codec
│
▼
[Normalize] → 16kHz mono WAV
│
▼
[Transcribe] → segments (overlap-chunked + validated + deduped)
│
├──▶ [Diarize] → speaker labels (optional)
│
▼
[Timing] → subtitle timing optimization
│
▼
[Translate] → target language (optional, batched + context overlap)
│
▼
[Review] → AI quality check (optional)
│
▼
[Analyze] → summary, topics, action items (optional)
│
▼
[Export] → SRT, VTT, TXT, JSON
See docs/SPEC.md for the full specification and docs/PROJECT.md for implementation status.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mediascribe-0.2.0.tar.gz.
File metadata
- Download URL: mediascribe-0.2.0.tar.gz
- Upload date:
- Size: 76.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ec347f517ada80c460dec79ee121c3f5fd8ebcca1e89715ddcf5e4fe1e0a72f
|
|
| MD5 |
d8f1d18ded580e9ad32c30241f9a1899
|
|
| BLAKE2b-256 |
6d568d124c65db27b52f4a98537d5f275e7d9d2852220b6615241437aa47bdd4
|
Provenance
The following attestation bundles were made for mediascribe-0.2.0.tar.gz:
Publisher:
publish.yml on shawnpetros/mediascribe
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mediascribe-0.2.0.tar.gz -
Subject digest:
1ec347f517ada80c460dec79ee121c3f5fd8ebcca1e89715ddcf5e4fe1e0a72f - Sigstore transparency entry: 995158051
- Sigstore integration time:
-
Permalink:
shawnpetros/mediascribe@91562c3416cf8a44e3362e9a5f9ce5d3c4018808 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/shawnpetros
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@91562c3416cf8a44e3362e9a5f9ce5d3c4018808 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file mediascribe-0.2.0-py3-none-any.whl.
File metadata
- Download URL: mediascribe-0.2.0-py3-none-any.whl
- Upload date:
- Size: 63.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b40569822925dc9436362abdb3928a6f0f70b16105d346c38eeee240b48d51f9
|
|
| MD5 |
c039634a6c3f5f9fd243e0d7bc093f1b
|
|
| BLAKE2b-256 |
d77d53aa3a08a600d0e21248cea0b8b3fa4b73b25a5cf599f691b442cfaa8e5f
|
Provenance
The following attestation bundles were made for mediascribe-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on shawnpetros/mediascribe
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mediascribe-0.2.0-py3-none-any.whl -
Subject digest:
b40569822925dc9436362abdb3928a6f0f70b16105d346c38eeee240b48d51f9 - Sigstore transparency entry: 995158057
- Sigstore integration time:
-
Permalink:
shawnpetros/mediascribe@91562c3416cf8a44e3362e9a5f9ce5d3c4018808 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/shawnpetros
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@91562c3416cf8a44e3362e9a5f9ce5d3c4018808 -
Trigger Event:
workflow_dispatch
-
Statement type: