yt-srt-gen
yt-srt-gen is a tool for downloading YouTube videos, generating subtitles using OpenAI Whisper, and translating them into another language (e.g., English) automatically.
Features
- Download YouTube videos using
yt-dlp. - Generate subtitles with OpenAI Whisper.
- Translate subtitles to a target language using
googletrans. - Supports multiple subtitle formats:
srt,vtt,txt,tsv,json.
Installation
pip install yt-srt-gen
Install openai-whisper if not installed.
pip install openai-whisper
yt-srt-gen requires openai-whisper, but it doesn't ship it as a dependency to save up disk space when
both packages are needed separately and installed via pipx.
Usage
yt-srt-gen <YouTube URL> [OPTIONS]
Arguments
<YouTube URL>: URL of the YouTube video.
Options
--source-language,-s: Language spoken in the audio.--target-language,-t: Language for translated subtitles.--output-format,-f: Subtitle output format (txt,vtt,srt,tsv,json,all, default:srt).--whisper-args,-w: Additional arguments to pass to openai-whisper.
Examples
yt-srt-gen https://www.youtube.com/watch?v=dQw4w9WgXcQ --source-language es --target-language en --output-format srt
yt-srt-gen https://www.youtube.com/watch?v=dQw4w9WgXcQ -s sr -t en -w "--model small --fp16 False"
This will download the video, generate Spanish subtitles, and append English translations.
Metadata
Release files for yt-srt-gen 0.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| yt_srt_gen-0.1.9.tar.gz | 15.9 kB | Without provenance | Details for yt_srt_gen-0.1.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| yt_srt_gen-0.1.9-py3-none-any.whl | Python 3 | none | any | Details for yt_srt_gen-0.1.9-py3-none-any.whl |
Total release size: 32.2 kB
Release files / yt_srt_gen-0.1.9.tar.gz
| Download URL | yt_srt_gen-0.1.9.tar.gz |
|---|---|
| Size | 15.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f4abd540463abedc509a596c81462ce01d9e723a730d205429df3b9f6e28b40c
|
|
BLAKE2b-256 checksum How to use checksums |
316c22371a71a8014a769a7934f777252df9fa97c39036234dbeca70ee8b9099
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / yt_srt_gen-0.1.9-py3-none-any.whl
| Download URL | yt_srt_gen-0.1.9-py3-none-any.whl |
|---|---|
| Size | 16.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
90cbdfe14e1de35381f67c0c9dc818d12a654d4fa3e7362d896140bf8717698b
|
|
BLAKE2b-256 checksum How to use checksums |
addca0e445a319096216da83f55e5e38a4dbe000be35ae9c1982393d8992294d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for yt-srt-gen 0.1.9
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.