Just what I was looking for! But I am getting a CORS error because I am running the code from localhost. Apparently, you embedded your code in the youtube video page from which you are getting the transcript, somehow. Do you have some code to get around the CORS error to make your code more generally applicable?