4 ms·
Can also just fetch the subs already in YouTube rather than retranscribing. eg: yt-dlp --write-auto-subs --skip-download "https://www.youtube.com/watch?v=7xTGN
by paulirish 1y ago
Can also just fetch the subs already in YouTube rather than retranscribing. eg:
yt-dlp --write-auto-subs --skip-download "https://www.youtube.com/watch?v=7xTGNNLPyMI https://www.youtube.com/watch?v=7xTGNNLPyMI"
- toomuchtodo 1y agoIt's a good call out. I leverage yt-dlp as a library for downstream tooling (archival of media to long term storage repositories), and always recommend folks rely on yt-dlp whenever possible due to the ecosystem of folks grinding to keep their extractors current. Their maintainers are both helpful and responsive. (with that said, I do not want to diminish OP's work in any way; great job! "What I cannot build, I do not understand" - Feynman)
- paulirish 1y agoSame, yup. OP is indeed already using yt-dlp for the video download. (Then Whisper for transcribing, Ollama/lmstudio/OpenAI for summarizing)
- deleted 1y ago[deleted]
- hiAndrewQuinn 1y agoMinus the summarization, that is the same pipeline I use in [1] for generating listening practice Anki flashcards for foreign language students. It surprised me that nobody had really built out a program I could find around yt-dlp and Whisper for this kind of use case even a few years after it came out. [1]: https://github.com/hiAndrewQuinn/audio2anki https://github.com/hiAndrewQuinn/audio2anki
- Jerry2 1y agoYep. You can also automatically save them if you use mpv to watch YT: https://github.com/nick-s-b/mpv-transcript https://github.com/nick-s-b/mpv-transcript discovered this script yesterday.
- adamgordonbell 1y agoRecently, I was working on a similar project and I found that grabbing the transcripts quickly leads to your IP being blocked for the transcripts. I ended up doing the same as this person, downloading the MP4s and then transcribing myself. I was assuming it was some sort of anti LLM scraper feature they put in place. Has anyone used this --write-auto-subs flag and not been flagged after doing 20 or so videos?
- hamiecod 1y ago—-write-auto-subs gets your IP banned for 12/24 hours if you download video subtitles in bulk but if the subtitles are downloaded with sufficient time gap in between, the ban is not triggered. My startup has to utilize youtube transcriptions so we just subscribe to a youtube transcriptor api hosted on rapidapi that downloads subtitles. 1$ per 1000 reqs. Pretty cheap
- MysticOracle 1y agoYep, this happened to me & got IP banned for a day.
- ldenoue 1y agoUnless you fetch directly from your browser. It works by getting the YouTube json including the captions track. And then you get the baseUrl to download the xml. I wrote this webapp that uses this method: it calls Gemini in the background to polish the raw transcript and produce a much better version with punctuation and paragraphs. https://www.appblit.com/scribe https://www.appblit.com/scribe Open source with code to see how to fetch from YouTube servers from the browser https://ldenoue.github.io/readabletranscripts/ https://ldenoue.github.io/readabletranscripts/
- thangalin 1y agosystemctl start tor yt-dlp --proxy socks5://127.0.0.1:9050 --write-subs --write-auto-subs --skip-download [URL] See: https://github.com/noobpk/auto-change-tor-ip https://github.com/noobpk/auto-change-tor-ip
- mckirk 1y agoI've found the YT transcripts to be severely lacking sometimes, in accuracy and features. Especially speaker identification is really useful if you want to e.g. summarize podcasts or interviews, so if this project here delivers on that then it's definitely better than the YT transcripts.
- stanleykm 1y agoI’ve had some success with running them through another LLM to have it clean up the transcription errors based on the context. But this obviously does nothing for speaker identitication.
- paulirish 1y agoAn approach I've been using recently is to rely on pyannote/tinydiarize only for the speaker_turn timestamps, but prefer the larger model (or in this case YT's autotranscript) for the actual text.
- ldenoue 1y agoCheck out https://ldenoue.github.io/readabletranscripts/ https://ldenoue.github.io/readabletranscripts/ and the website https://www.appblit.com/scribe https://www.appblit.com/scribe that use Gemini to post correct the raw transcripts
- meerab 1y agoYT transcripts definitely lack speaker ID. LLMs can infer speakers from context but miss nuance without proper speaker recognition. I have been tackling this while building VideoToBe.com. My current pipeline is Download Video -> Whisper Transcription with diarization -> Replace speaker tags with AI generated speaker ID + human fallback. Reliable ML speaker identification is still surprisingly hard. For podcast summarization, speaker ID is a game-changer vs basic YT transcripts.
- rpastuszak 1y agoIIRC YT also has a "private" API you can call directly (or via an npm package: youtube-transcribe). (I'm using it in https://butter.sonnet.io https://butter.sonnet.io)
- entelechy0 1y ago[dead]