Basic Examples (2)

Get a video transcript:

transcript=({{"[◼]", "YouTubeTranscript" }})["ewU83vHwN8Y"];
transcript//StringLength

Here is an excerpt:

SeedRandom[332];
lines=StringSplit[transcript,"\n"];
p=RandomInteger[Length[lines]-10];
lines[[p;;p+10]]//StringRiffle[#,"\n"]&

Scope (1)

If the video identifier is not found or the video has no captions Failure object is returned. For example:

({{"[◼]", "YouTubeTranscript" }})["89328ewU83vHwN8Y"]

Applications (3)

Get a video transcript:

transcript=({{"[◼]", "YouTubeTranscript" }})["_yUW-TGGKOc"];

Show the number of characters, words, and lines:

Clear[TextStats];
TextStats[txt_String]:=AssociationThread[{"Characters","Words","Lines"},Through[{StringLength,Length@*TextWords,Length[StringSplit[#,"\n"]]&}[txt]]];
TextStats[transcript]

Summarize the transcript:

LLMResourceFunction["Summarize"][transcript]

Neat Examples (1)

Get a video transcript and show table of themes:

transcript=({{"[◼]", "YouTubeTranscript" }})["_yUW-TGGKOc"];
Clear[GridTableFormFromJSON];
GridTableFormFromJSON[json_String]:=ResourceFunction["GridTableForm"][Dataset[Association/@ImportString[StringReplace[json,{"```json"->"","```"->""}],"JSON"]]/.{x_String:>Style[x,FontFamily->"Times New Roman"]}];
GridTableFormFromJSON[LLMResourceFunction["ThemeTableJSON"][transcript, "article", 30]]