Created by Matthew Tang, Robert Quitt, Christianna Xu, Emma Yokota
CalHacks - 3rd Place for Best Use of Google Cloud API Prize
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.
Provides video subtitles to translate any language to any language
- Extract the URL of the video using a Google Chrome extension
- Download
mp4
video from url and split into 30sec segments - Convert
mp4
toflac
(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
- 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
- Everything works end to end
- This is a utility that is quite practical and is ready to be used
- 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
- Streaming capabilities to process audio partitions asynchronously
- Touching up styles/CSS