Examples

The clip package includes a few examples. These small programs illustrate various ways the package can be used, in some cases integrating other Python packages.

auto_subtitle.py

  • Description:

    An example that uses a speech-to-text library to try to add subtitles to a clip automatically. This example uses vosk because it works offline and provides easy access to timing of individual words.

    Install vosk before running:

    pip install vosk
    
  • Features used in this example:

  • View auto_subtitle.py on github.

bounce.py

  • Description:

    An example that creates two videos: one that shows a block of text bouncing around the screen and one with some mesmerizing colors.

  • Features used in this example:

  • View bounce.py on github.

noise_reduce.py

  • Description:

    An example that shows a way to reduce noise in the audio of a clip.

  • Features used in this example:

  • View noise_reduce.py on github.

text_to_speech.py

  • Description:

    An example that uses a text-to-speech library to generate spoken word from a string input.

    Install pyttsx4 before running:

    pip install pyttsx4
    
  • Features used in this example:

  • View text_to_speech.py on github.