Live data from Hacker News

Show HN: Bulk Creation of Transcripts from YouTube Playlists with Whisper

github.com

21–30 of 45 posts

Re: Show HN: Bulk Creation of Transcripts from YouTube Playlists with Whisper

#21

Earlier quoted context omitted.

Thanks, I haven’t seen an easy and reliable way to do this using open source stuff yet. Theoretically just separating out speakers seems like it wouldn’t be that hard; just compute a bunch of FFTs to arrive at a sort of frequency-based “voice fingerprint” for each speaker and then use something like XGboost to match up the audio for each second to one of the speakers. The problem is then what do you with that informa…

The whisperX project has most of it covered they are integrating the new v3 model waiting for a ccp GGUF version also there is a workaround for the latest speaker diarization but it has an active user base working on it https://github.com/m-bain/whisperX

I was dismayed to learn that this requires OpenAI API keys for speaker diarization.

Re: Show HN: Bulk Creation of Transcripts from YouTube Playlists with Whisper

#22

Earlier quoted context omitted.

The whisperX project has most of it covered they are integrating the new v3 model waiting for a ccp GGUF version also there is a workaround for the latest speaker diarization but it has an active user base working on it https://github.com/m-bain/whisperX

I was dismayed to learn that this requires OpenAI API keys for speaker diarization.

Does it? I only see references to HuggingFace api keys so it can do a one time download of some additional models.

Re: Show HN: Bulk Creation of Transcripts from YouTube Playlists with Whisper

#23
post #10

Hoping this can help me cut down the time I need to use on watching YT videos for uni. Outputting 20-30 mins into a .txt and feeding it to ChatGPT for summarizing. Thanks!

Not for uni but I was thinking similar. Find or create a playlist, have this tool transcribe it, feed all that into ChatGPT or similar, have to output a summary, either brief (i.e., highlights) or full depth & breadth of all the videos.

Re: Show HN: Bulk Creation of Transcripts from YouTube Playlists with Whisper

#24
I don't have any experience with Python. Can someone point me to definitive (and idiot-proof) tutorials for Win 10 Pro and Mac OS? Maybe using Docker?

I just don't know but am willing to try. I'd rather ask here than be subjected to a search and its SEO hell (read: SERPs of questionable results).

Or perhaps there's a way to use Digial Ocean or similar so I'm not tying up my local machine?

Re: Show HN: Bulk Creation of Transcripts from YouTube Playlists with Whisper

#25
post #18
post #11

I could've sworn I had seen a Google/YouTube announcement somewhere that there was going to be readable/searchable transcripts coming. Is it what's already been rolled out? The current YouTube transcripts seem almost useless to me; limited to a small part of the screen real estate, and seem only searchable using the full page search built into web browsers.

In the description of videos I see a "Show Transcript" button. I believe this is automatically generated. It's not grouped into sentences though, so there is room for improvement.

These are the automatic transcripts generated by YouTube mentioned by other commenters. Their accuracy leaves something to be desired compared to Whisper based transcripts.

Re: Show HN: Bulk Creation of Transcripts from YouTube Playlists with Whisper

#26

I don't have any experience with Python. Can someone point me to definitive (and idiot-proof) tutorials for Win 10 Pro and Mac OS? Maybe using Docker? I just don't know but am willing to try. I'd rather ask here than be subjected to a search and its SEO hell (read: SERPs of questionable results). Or perhaps there's a way to use Digial Ocean or similar so I'm not tying up my local machine?

Just install Anaconda:

https://www.anaconda.com/download

For windows or Mac. If you do it on Windows it’s probably easier if you let it add it to your Windows system path. Then you should be able to open PowerShell and type “python” and not get an error. Once you can do that, just run these commands on Windows:

  git clone https://github.com/Dicklesworthstone/bulk_transcribe_youtube_videos_from_playlist
  cd bulk_transcribe_youtube_videos_from_playlist
  python -m venv venv
  cd venv
  .\Scripts\activate  
  python -m pip install --upgrade pip
  python -m pip install wheel
  cd ..
  pip install -r requirements.txt
Then edit the file " bulk_transcribe_youtube_videos_from_playlist.py" to modify the URL (if you want a playlist, edit that URL and change the `convert_single_video = 1` part to be 0 instead) and finally run it with:

  python bulk_transcribe_youtube_videos_from_playlist.py

Re: Show HN: Bulk Creation of Transcripts from YouTube Playlists with Whisper

#27

Earlier quoted context omitted.

Thanks, I haven’t seen an easy and reliable way to do this using open source stuff yet. Theoretically just separating out speakers seems like it wouldn’t be that hard; just compute a bunch of FFTs to arrive at a sort of frequency-based “voice fingerprint” for each speaker and then use something like XGboost to match up the audio for each second to one of the speakers. The problem is then what do you with that informa…

The whisperX project has most of it covered they are integrating the new v3 model waiting for a ccp GGUF version also there is a workaround for the latest speaker diarization but it has an active user base working on it https://github.com/m-bain/whisperX

Thanks, took a look at it. Seems quite heavy though, lots of huge dependencies like pytorch and torchaudio, and seems like the speaker diarization requires a GPU if I'm not mistaken. And as another poster pointed out, it does require a Huggingface API key as well.

I wanted to keep my script lighter weight and also GPU optional (i.e., a GPU will work and make it faster, but it also works acceptably with just the CPU). I really feel in my gut that the speaker diarization doesn't need to be so complicated or hard once you already have the accurate timestamps of each transcribed segment and the underlying audio file-- no reason why it shouldn't be able to run fine on a CPU and get good enough accuracy.

Re: Show HN: Bulk Creation of Transcripts from YouTube Playlists with Whisper

#28
post #10

Hoping this can help me cut down the time I need to use on watching YT videos for uni. Outputting 20-30 mins into a .txt and feeding it to ChatGPT for summarizing. Thanks!

Coincidentally I threw something together this weekend that attempts to do just that. [0] It's really simple - just extracts subtitles and feeds it to ChatGPT to generate a markdown "article".

[0] https://vreader.va.reichard.io/

[1] https://gitea.va.reichard.io/evan/VReader

Re: Show HN: Bulk Creation of Transcripts from YouTube Playlists with Whisper

#29
post #18
post #11

I could've sworn I had seen a Google/YouTube announcement somewhere that there was going to be readable/searchable transcripts coming. Is it what's already been rolled out? The current YouTube transcripts seem almost useless to me; limited to a small part of the screen real estate, and seem only searchable using the full page search built into web browsers.

In the description of videos I see a "Show Transcript" button. I believe this is automatically generated. It's not grouped into sentences though, so there is room for improvement.

Right, but it opens up a small page element that isn't very aesthetically pleasing to read from, and feels fairly useless.

Re: Show HN: Bulk Creation of Transcripts from YouTube Playlists with Whisper

#30
post #29
post #18

Earlier quoted context omitted.

In the description of videos I see a "Show Transcript" button. I believe this is automatically generated. It's not grouped into sentences though, so there is room for improvement.

Right, but it opens up a small page element that isn't very aesthetically pleasing to read from, and feels fairly useless.

That’s true. But I coincidentally also made another mini project a few months ago for making those built-in transcripts much nicer to read from. You may find it useful:

https://github.com/Dicklesworthstone/youtube_transcript_clea...

Now that I think about it, this would work equally well for the transcripts generated by my new tool. I should just include that html file in my new repo as an added feature.

Post reply on HN