mirror of
https://github.com/jlengrand/tldw.git
synced 2026-03-10 08:51:17 +00:00
048b346370841cdd55ca6ec253cec18b118ee3b2
TL/DW: Too Long, Didnt Watch
YouTube contains an incredible amount of knowledge, much of which is locked inside multi-hour videos. Let's extract and summarize with AI!
Pieces
diarize.py- download, transcribe and diarize audio- First uses yt-dlp to download audio(optionally video) from supplied URL
- Next, it uses ffmpeg to convert the resulting
.m4afile to.wav - Then it uses faster_whisper to transcribe the
.wavfile to.txt - After that, it uses pyannote to perform 'diarorization'
- Finally, it'll send the resulting txt to an LLM endpoint of your choice for summarization of the text.
- Goal is to support OpenAI/Claude/Cohere/Groq/local OpenAI endpoint (oobabooga/llama.cpp/exllama2) so you can either do a batch query to X endpoint, or just feed them one at a time. Your choice.
chunker.py- break text into parts and prepare each part for LLM summarizationroller-*.py- rolling summarization- can-ai-code - interview executors to run LLM inference
compare.py- prepare LLM outputs for webappcompare-app.py- summary viewer webapp
Setup
- Linux
- X
- Create a virtual env:
python -m venv - Launch/activate your virtual env:
. .\scripts\activate.sh pip install -r requirements.txt
- Windows
- X
- Create a virtual env:
python -m venv - Launch/activate your virtual env:
. .\scripts\activate.ps1 pip install -r requirements.txt
Credits
Description
Languages
Python
99.5%
Dockerfile
0.5%