def update(frames): if self.stream.is_active(): slice = self.left.get_sample_slice(frames, frames + self.window) self.stream.write(slice.raw_data) y = np.array(slice.get_array_of_samples()) / 1000000 # yft = np.abs(np.fft.fft(y)) / self.window lf.set_ydata(y) return lf,