Overview
VideoDB’s Timeline Architecture makes it easy to personalize content to meet users’ requirements. If users prefer not to include curse words in their content, VideoDB allows for these words to be either removed or replaced with a sound overlay such as beep sound. This task, typically complex for video editors, can be accomplished with just a few lines of code using VideoDB. This technique can also serve as a valuable Content Moderation component for any social content platform, ensuring that content meets the preferences and standards of its audience.
Prerequisites
Install Dependencies
You’ll also need a VideoDB API_KEY, which can be obtained from the VideoDB console.
Connect to VideoDB
Connect to VideoDB using your API key. This establishes a session for uploading and manipulating video and audio files:Source Content
For this tutorial, let’s take the Joe Rogan clip, where he is trying to trick siri into using curse words 🤣Index the video
Find out the curse words with the spoken Index.Create Beep Asset
We have a sample beep sound in this folder,beep.wav. For those looking to add a more playful or unique touch, replacing the beep with alternative sound effects, such as a quack or any other sound, can make the content more engaging and fun.
Moderation
Get Transcript
Retrieve the transcript from the indexed video to analyze each word:Finding the Curse Words
We’ll use few NLP techniques to identify all variations of any offensive words, eliminating the need to manually find and include each form. Additionally, by analyzing the transcript, you can gain insights into how these sounds are transcribed, acknowledging the possibility of errors.Filter words and Create Fresh Timeline
First we will identify the timestamps to beep, and then let’s create a timeline using theTrack and Clip pattern. Add the video clip to the main track, then loop through the transcript to add beep overlays wherever curse words are detected.
Review and Share Your Moderated Video
Finally, watch and share your new stream:The Real Power of Programmable Streams
If you have videos pre-uploaded and indexed, running this beep pipeline is real-time. So, based on your users’ choices or your platform’s policy, you can use information from spoken content to automatically moderate.Explore Full Notebook
Open the complete implementation in Google Colab with all code examples.