Updated script available at https://www.rushworth.us/lisa/?p=6854
While Microsoft does not provide a way to export the transcript from Stream videos (thus recorded Teams meetings), it is possible to get something a nicer than the select/copy/paste from the transcript box. Click the video settings and select “Show transcript”
Display the browser developer tools – In Firefox, select the “Web Developer” sub-menu from the browser menu and select “Web Console”
This console is often used for displaying errors in a website, but it can also be used to send commands to the browser. There’s a “>>” prompt – click next to it and you’ll have a flashing cursor.
Paste this into the console:
window.angular.element(window.document.querySelectorAll('.transcript-list')).scope().$ctrl.transcriptLines.map((t) => { return t.eventData.text; })
… and hit enter. Another line will appear below what you’ve entered. Right-click on that new entry and select “Copy Object”. Now paste into a text editor or Microsoft Word.
The output could use a little cleanup. You’ll see “\r\n” anywhere there’s a newline. This
Becomes “a new tip to make things quicker. So\r\nshare your knowledge” … you could replace “\r\n” with a space (I find the newlines to be superfluous) or use a regex replacement to replace “\\r\\n” (literal string, the backslash escapes the backslash to retain it) with “\n” (an actual newline)
Each time-stamped bit of the transcript is in a separate set of quotes – I’ve got a quick replacement that takes
",\n "
And replaces it with a newline … so
Becomes
Depending on the target audience … for me, that’s where I stop. To send the transcript to someone else, I manually clean up the spaces and quote before the first line and the quote-comma on the last line.
Hi Lisa, thank you for this article, I found it very useful for extracting transcripts I then used for my Uni project. Actually, I found it so useful, that I referenced your page in the project:
Rushworth, L. (2019) ‘Extracting the Transcript from Microsoft Stream Videos’, Lisa’s Home Page [Blog]. Available at https://www.rushworth.us/lisa/?p=5681 (Accessed 10th July)
😉
Cool, I got a citation! I’m glad you found the article useful too 🙂
Happy Monday!
–L
Hi Lisa – I tried using the code above to copy the transcript from a Stream video (I don’t have the ability to download it for whatever reason) and I get the following error message “Uncaught TypeError: Cannot read property ‘text’ of undefined at :1:140 at Array.map () at :1:108” – I’m not a programmer so I have no idea what it means. Is this anything you can help me out with?
Hi Beth! It looks like there’s no text property in one (or more) of the lines of your transcript. Try the code I posted at https://www.rushworth.us/lisa/?p=6649 — it produces output that doesn’t need as much clean-up and should just skip over elements that don’t have text content.