video_to_text_VTT
Extract speech from a video (or audio) file and generate real, timestamped WebVTT/SRT subtitles — or plain text if that's all you want.
What's new in v2.0.0
- 🧠 Whisper-powered (via
faster-whisper) instead of the old Google Web Speech API wrapper: runs offline, supports ~100 languages, and is far more accurate — especially for non-English audio. - 🎬 Actually produces
.vtt/.srtfiles with real timestamps (v1 only ever wrote a single blob of plain text, despite the name). - 📁 Batch mode: point it at a folder and it transcribes every video/audio file inside.
- ▶️ YouTube/URL input: pass a URL and it downloads + transcribes it
(needs the optional
yt-dlpextra). - 🖥️ CPU or GPU (
--device cpu|cuda|auto).
Installation
From PyPI
pip install video-to-text-vtt
# optional, for YouTube/URL input:
pip install "video-to-text-vtt[youtube]"
Then run as: vtt_run [OPTIONS] path/to/YourVideo or python -m video_to_text_VTT [OPTIONS] path/to/YourVideo
With poetry
git clone https://github.com/momalekiii/VTT.git
cd VTT
poetry install
poetry run vtt_run [OPTIONS] path/to/YourVideo
With pip locally
git clone https://github.com/momalekiii/VTT.git
cd VTT
pip install -r requirements.txt
python main.py [OPTIONS] path/to/YourVideo
Usage
# Single video -> subtitles.vtt (auto-detected language)
vtt_run my_video.mp4
# Force language, write srt instead
vtt_run my_video.mp4 -lang fa --format srt
# Bigger/more accurate model, on GPU
vtt_run my_video.mp4 --model medium --device cuda
# Only transcribe a slice of the file
vtt_run my_video.mp4 --offset 30 --duration 60
# Whole folder, batch mode, all formats, into an output directory
vtt_run ./my_videos --format all -o ./subtitles
# Straight from a YouTube link
vtt_run "https://youtube.com/watch?v=..." --format vtt
Options
--duration FLOAT— audio length to transcribe, in seconds--offset FLOAT— how far from the start to begin, in seconds-lang, --language TEXT— language code (e.g.en,fa,es); omit to auto-detect--model [tiny|base|small|medium|large-v3]— Whisper model size (accuracy vs. speed)--device [auto|cpu|cuda]-o, --output TEXT— output file (single input) or output directory (folder/batch input)--format [vtt|srt|txt|all]--help— show this message and exit
Migrating from v1
The CLI is backward-compatible for the common case (python main.py path/to/video),
but the default output is now a real .vtt file instead of a .txt file. Pass
--format txt if you want the old plain-text behavior.
About
Extract Speech/Text from Video — now with real subtitles, offline Whisper transcription, batch processing, and YouTube support.
Topics
python, python3, speech-recognition, whisper, video-to-text, subtitles, vtt, srt
Metadata
Release files for video-to-text-vtt 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| video_to_text_vtt-2.0.0.tar.gz | 6.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| video_to_text_vtt-2.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.1 kB
Release files / video_to_text_vtt-2.0.0.tar.gz
| Download URL | video_to_text_vtt-2.0.0.tar.gz |
|---|---|
| Size | 6.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fbcb1ea74958820c4a48ec74aff9acd919a16b607a6f8b7a18b90963f1583f8c
|
|
BLAKE2b-256 checksum How to use checksums |
608a334230e33c12701577e9bb3586cb248947faf80ce0ac45e7ba920fd614c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.5.1 CPython/3.11.3 Darwin/27.0.0
|
Release files / video_to_text_vtt-2.0.0-py3-none-any.whl
| Download URL | video_to_text_vtt-2.0.0-py3-none-any.whl |
|---|---|
| Size | 8.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c3bf5cdbc9122149db06916c3974253ba1fc9625747c1bbcf7c8ef7e79acea95
|
|
BLAKE2b-256 checksum How to use checksums |
1f0b8cb336bb212eff810fda12b51622c4df84a6310907f2270350471f566338
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.5.1 CPython/3.11.3 Darwin/27.0.0
|