2023-08-05 10:20:45 -04:00
2023-07-30 15:43:54 -04:00
2023-08-02 19:07:53 -04:00
2023-07-30 13:05:26 -04:00
2023-08-02 19:07:53 -04:00
2023-08-05 09:26:23 -04:00
wip
2023-08-04 10:46:46 -04:00
2023-07-30 11:34:29 -04:00
2023-08-04 12:38:25 -04:00
wip
2023-08-04 10:46:46 -04:00
wip
2023-08-04 10:46:46 -04:00
2023-07-31 11:41:15 -04:00
2023-08-05 09:26:23 -04:00
2023-08-05 10:20:45 -04:00

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!

  • yt-dlp - download audio tracks of youtube videos
  • ffmpeg - decompress audio
  • whisper.cpp - transcribe audio to text
  • chunk.py - break text into parts and prepare each part for LLM summarization
  • can-ai-code - leverage interview_cuda or `interview-llamacpp`` executor to run LLM inference
  • compare.py - prepare LLM outputs for webapp
  • compare-app.py - summary viewer webapp

This project is under active development and is not ready for production use.

DEMO @ HF Space

Video Transcript Datasets

Filename Title Whisper Model URL
ufo.txt Subcommittee on National Security, the Border, and Foreign Affairs Hearing small.en https://www.youtube.com/watch?v=KQ7Dw-739VY
aoe-grand-finale.txt GRAND FINAL $10,000 AoE2 Event (The Resurgence) medium.en https://www.youtube.com/watch?v=jnoxjLJind4

Creating a Dataset

Download with yt-dlp

Download the audio track:

pip install yt-dlp
yt-dlp -f "bestaudio[ext=m4a]" --extract-audio  'https://www.youtube.com/watch?v=<video>'

Transcode with ffmpeg

Convert the audio track to wav:

ffmpeg -i *.m4a -hide_banner -vn -loglevel error -ar 16000 -ac 1 -c:a pcm_s16le -y resampled.wav

Transcribe with whisper.cpp

Transcribe the wav to txt:

main -m ../models/ggml-medium.en.bin -f resampled.wav -t 32 -otxt
Description
No description provided
Readme 32 MiB
Languages
Python 99.5%
Dockerfile 0.5%