Inspired by the following exchange on Twitter, in which someone captures and posts a valuable video onto Twitter, but doesn't have the resources to easily transcribe it for the hearing-impaired:
The instructions and code below show how to use command-line tools/scripting and Amazon's Transcribe service to transcribe the audio from online video. tl;dr: AWS Transcribe is a pretty amazing service!
(note: you should obviously not do this as one big old bash script, but I wrote this up as an example of what CLI can do if you have some weird elaborate needs)
Sign-up for Amazon Web Services: https://aws.amazon.com
Install:
- youtube-dl - for fetching video files from social media services
- awscli - for accessing various AWS services, specfically S3 (for storing the video and its processed transcription) and Transcribe
- curl - for downloading from URLs
- jq - for parsing JSON data
- ffmpeg - for media file conversion, e.g. extracting mp3 audio from video
- Find a tweet containing a video you like
- Get that tweet's URL, e.g. https://twitter.com/JordanUhl/status/1085669288051175424
- Use youtube-dl to download the video from that tweet and save it to disk, e.g.
cardib.mp4 - Because AWS Transcribe requires we send it an audio file, use ffmpeg to extract the audio from
cardib.mp4and save it tocardib.mp3 - Because AWS Transcribe only works on audio files stored on AWS S3, we use
awsclito uploadcardiob.mp3to an online S3 bucket, eg. http://data.danwin.com/tmp/cardib.mp3 - Use
awsclito access the AWS Transcribe API and start a transcription job - Wait a couple of minutes
- Use awscli to get the details of the initiated (and hopefully, finished) transcription job
- Use jq

Wow, I really owe you a coffee sometime. I feel like I find myself in your footsteps all the time. Thanks for posting this!