mirror of
https://github.com/jlengrand/tldw.git
synced 2026-03-10 08:51:17 +00:00
ef9ece02d32b4e2d92b170ed3f632edfd9dc7667
Too Long, Didnt Watch
WIP experiments in summarizing long youtube videos.
Whats going on here?
- Downloaded https://www.youtube.com/watch?v=KQ7Dw-739VY
- Used whisper.cpp to transcribe audio to text (see
ufo-clean.txt) - Trim the relevant section of text (see
ufo-clean-parts.txt) - Break text into chunks
- Summarize each chunk
- Profit?
Step-by-step
Download audio (m4a)
pip install yt-dlp
yt-dlp -f "bestaudio[ext=m4a]" --extract-audio 'https://www.youtube.com/watch?v=jnoxjLJind4'
Transcode audio (wav)
ffmpeg -i *.m4a -hide_banner -vn -loglevel error -ar 16000 -ac 1 -c:a pcm_s16le -y resampled.wav
Transcribe with whisper.cpp
main -m ../models/ggml-medium.en.bin -f resampled.wav -t 32 -otxt
Chunk
Process
Description
Languages
Python
99.5%
Dockerfile
0.5%