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
EchoEffect.pythat has the source code to add audio echo effect. The file contains class
AudioEffectswhose 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. ...