YouTube audio download and faster-whisper transcription pipeline.
Project description
ytpipe
YouTube audio download and transcription pipeline.
ytpipe downloads audio from YouTube (videos, playlists, channels) and transcribes locally using faster-whisper. Designed for practical, repeatable ingestion of YouTube content into clean on-disk datasets.
Features
- One-command pipeline: download + transcribe in one step
- Robust downloads powered by yt-dlp (videos, playlists, channels)
- Fast local transcription via faster-whisper (CPU or NVIDIA GPU)
- VAD enabled by default for better quality and faster processing
- Multiple output formats: JSON, TXT, SRT, VTT subtitles
- Parallel processing for batch transcription (multi-CPU and multi-GPU)
Requirements
- Python >= 3.10
- FFmpeg (must be in PATH or provided via
--ffmpeg) - Optional: NVIDIA GPU + CUDA for acceleration
Installation
CPU only (default)
pip install ytpipe
GPU support (NVIDIA CUDA)
pip install "ytpipe[gpu]"
Quick Start
Full pipeline (download + transcribe)
ytpipe pipeline -s "https://www.youtube.com/watch?v=VIDEO_ID" --out data
Download only
ytpipe download -s "https://www.youtube.com/watch?v=VIDEO_ID" --out data/raw
Download from channel (with limit)
# Download 5 videos from a channel
ytpipe pipeline -s "https://www.youtube.com/@ChannelName" --out data --max 5
# Or download only (without transcription)
ytpipe download -s "https://www.youtube.com/@ChannelName" --out data/raw --max 10
Transcribe only
ytpipe transcribe --audio-dir data/raw/audio --out data/transcripts
Output Structure
data/
raw/
audio/
VIDEO_ID.m4a
VIDEO_ID.info.json
manifest.jsonl
downloaded.txt
transcripts/
VIDEO_ID.json
VIDEO_ID.txt
CLI Options
Common options
| Option | Description |
|---|---|
--model |
Whisper model: small, medium, large-v3 (default: medium) |
--device |
Device: cpu, cuda, auto (default: cpu) |
--language |
Language hint (e.g., en). Auto-detects if not set |
--output-format |
Output formats: json,txt,srt,vtt (default: json,txt) |
GPU acceleration
ytpipe transcribe --audio-dir data/raw/audio --device cuda --compute-type float16
Parallel processing
# CPU parallel (4 workers)
ytpipe transcribe --audio-dir data/raw/audio --workers 4
# Multi-GPU
ytpipe transcribe --audio-dir data/raw/audio --device cuda --workers 2
Python API
from pathlib import Path
from ytpipe import (
DownloadConfig,
TranscriptionConfig,
download_sources,
transcribe_directory,
)
# Download
items = download_sources(
sources=["https://www.youtube.com/watch?v=VIDEO_ID"],
config=DownloadConfig(out_dir=Path("data/raw")),
)
# Transcribe
results = transcribe_directory(
audio_dir=Path("data/raw/audio"),
out_dir=Path("data/transcripts"),
config=TranscriptionConfig(model="medium"),
)
Troubleshooting
- FFmpeg not found: Install FFmpeg and add to PATH, or use
--ffmpeg /path/to/ffmpeg - GPU not detected: Ensure NVIDIA drivers are installed and
nvidia-smiworks - DLL errors on Windows: Use
--device cpu(default) to avoid CUDA dependencies
License
MIT License
Project details
Release history Release notifications | RSS feed
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 ytpipe-0.1.6.tar.gz.
File metadata
- Download URL: ytpipe-0.1.6.tar.gz
- Upload date:
- Size: 63.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45fbf342ed15ab7dabbb529e29a839f3b25a6ed39790116d25e4e7d5d9a6c9da
|
|
| MD5 |
ec1f49397b134768bb5a184d6426e6bd
|
|
| BLAKE2b-256 |
0b545e577e58f890b82f3bb7df664b639ea6ac3b92de620471617d81fe490cbc
|
File details
Details for the file ytpipe-0.1.6-py3-none-any.whl.
File metadata
- Download URL: ytpipe-0.1.6-py3-none-any.whl
- Upload date:
- Size: 52.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61df3aa73fbc0a1f960a0e14532669ed1b4a32f8e2c9f8055ce5689c8b445128
|
|
| MD5 |
3b59f86ba6dda6a62159ae13a3a9cd02
|
|
| BLAKE2b-256 |
795d9e638276732d2faf8f4961ebfbed2fc78c4dda24bf978c8041862d89f346
|