O'Reilly logo

Python Multimedia Beginner's Guide by Ninad Sathaye

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action - adding echo effect

Let's write code to add an echo effect to an input audio. The code is very similar to the one in the AudioEffects.py file discussed in earlier section. Just to simplify the matter, we will use the code in file EchoEffect.py file for easier understanding. Later, you can easily integrate this with the code in AudioEffects.py.

  1. Download the file EchoEffect.py that has the source code to add audio echo effect. The file contains class AudioEffects whose constructor has the following code.
    def __init__(self): self.is_playing = False # Flag used for printing purpose only. self.error_msg = '' #the flag that determines whether to use # a gst Controller object to adjust the # intensity of echo while playing the audio. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required