mpv-sub-fastwhisper is an mpv script that transcribes video audio into SRT subtitles using faster-whisper and can automatically translate them via the GPT API.
- faster-whisper
- Published at
- Jan 13, 2025
- 46
- Stars
- 1,413
- Download
- Synced at
- 13d ago
Latest release
faster-whisperJan 13, 2025, 01:19 PMDownloads slow? Switch the source anytime above
README
Project Overview
mpv-sub-fastwhisper is a subtitle-generation script integrated into mpv that uses faster-whisper to transcribe video audio and output SRT subtitles. After generating subtitles, the script also tries to translate them through the GPT API, making it quick to get subtitled playback. It suits users who want to generate subtitles right during playback.
One step during playback and mpv writes the subtitles for you.
Key Features
- Speech transcription: uses faster-whisper to transcribe video audio into SRT subtitles
- Automatic translation: tries to translate the generated subtitles via the GPT API
- Script integration: runs as an mpv script, generating subtitles during playback
Target Audience
- Users watching videos without subtitles
- Users of mpv who need transcribed subtitles
- Users with local speech-to-text and translation needs
Quick Start
- Install faster-whisper and FFmpeg
- Place the script in mpv's scripts directory
- Fill in the GPT API configuration in the script or its options
- Open a video in mpv and trigger subtitle generation
- The generated subtitle file is saved alongside the video
Core Advantages
- Local transcription: transcription happens on your machine, with no video upload
- Translation included: it tries to translate after transcribing, saving a second pass
- Fits playback: it generates inside mpv, so you wait for subtitles while watching
System Requirements
| Item | Requirement |
|---|---|
| OS | Any platform that runs mpv |
| Dependencies | faster-whisper, FFmpeg |
| Runtime | mpv |
| Optional | The GPT API (subtitle translation) |
Notes
- GPT API settings must be filled in yourself in the script or its options
- Transcription speed and accuracy depend on your machine and the model used
- Using online translation incurs the corresponding API costs
Release history
Sort