YouTube's auto-generated captions are a great product, but one problem is that they can't tell speakers apart in podcasts with multiple people. I'm building something that also works with YouTube transcripts, and it has the same problem.
You can even just plug in the Youtube link with a short prompt.
Bear in mind that thinking that plugging in the transcripts will help the Gemini model in any way frequently results in mistranscriptions being included and actually compromises the diarizations.
The prompt I use is...
"Please transcribe, diarize, and speaker identify the speakers from the Youtube video."
Another thing I've learned is that long-worded prompts also interfere with the results in weird ways.