@staticmethod
    def get_pyaudio():
        try:
            import pyaudio
        except ImportError:
            raise AttributeError("Could not find PyAudio; check installation")
        from distutils.version import LooseVersion
        if LooseVersion(pyaudio.__version__) < LooseVersion("0.2.9"):
            raise AttributeError("PyAudio 0.2.9 or later is required (found version {0})".format(pyaudio.__version__))
        return pyaudio
Imports the pyaudio module and checks its version. Throws exceptions if pyaudio can't be found or a wrong version is installed
dataset/ETHPy150Open Uberi/speech_recognition/speech_recognition/__init__.py/Microphone.get_pyaudio