diff --git a/pliers/stimuli/audio.py b/pliers/stimuli/audio.py index 629325ee..a5f58611 100644 --- a/pliers/stimuli/audio.py +++ b/pliers/stimuli/audio.py @@ -82,3 +82,8 @@ def save(self, path): path (str): Filename to save audio data to. ''' self.clip.write_audiofile(path, fps=self.sampling_rate) + + def close(self): + if self.clip: + self.clip.close() + self.clip = None