def close_stream ( self ) : self . keep_listening = False self . stream . stop ( ) self . stream . close ( )
how to prevent python from closing
Closes the stream . Performs cleanup .
def close_stream(self):
		""" Closes the stream. Performs cleanup. """
		self.keep_listening = False
		self.stream.stop()
		self.stream.close()