Universal Subtitler
Inspiration
Our team member enjoys watching Kdramas but has difficulty finding subtitles. In general, there is a lack of consistent video translation across online video platforms. Videos are minimally captioned/subtitled and beyond YouTube, it is largely nonexistent.
What it does
Provides video subtitles to translate any language to any language
How we built it
- Extract the URL of the video using a Google Chrome extension
- Download
mp4video from url and split into 30sec segments - Convert
mp4toflac(lossless audio) usingffmpeg - Create a transcript of the audio in the native language using Google Speech to Text API
- Translate transcript to target language using Google Translate API
- Inject captions to video player via Google Chrome extension
Challenges we ran into
- None of us have ever made a Google Chrome extension before so that was a learning experience for us all
- Extracting the audio in <1min segments was challenging because Google's API requires the audio clips to be <1min
- Extracting the video source links from the page was a difficult task
Accomplishments that we're proud of
- Everything works end to end
- This is a utility that is quite practical and is ready to be used
What we learned
- Message passing in Chrome sandboxes (popup window vs page window)
- Learning external programs like ffmpeg and using it with JavaScript
- Learning WebVTT API to add subtitles to the video player
- Learning how to interact with Google Speech to Text and Translate APIs
What's next for usub
- Streaming capabilities to process audio partitions asynchronously
- Touching up styles/CSS
Log in or sign up for Devpost to join the conversation.