def set_time(self, time):
        '''
        Update the length of the buffer in seconds
        :param time: number of seconds
        :return: self
        '''
        self.length = int(time*self.sample_rate)
        return self
Update the length of the buffer in seconds
        :param time: number of seconds
        :return: self