def __exit__(self, type, value, traceback):
    self._audio_stream.stop_stream()
    self._audio_stream.close()
    self.closed = True
    self._buff.put(None)
    self._audio_interface.terminate()
def __exit__(self, type, value, traceback):
    self._audio_stream.stop_stream()
    self._audio_stream.close()
    self.closed = True
    self._buff.put(None)
    self._audio_interface.terminate()