title: Unable to install speech_recognition(pyaudio)
body: <p><em><strong>STEP BY STEP PROCCES of how i got the error</strong></em></p>
  <p>The command I ran:</p>
  <p><code>pip install SpeechRecognition</code></p>
  <p>Log:</p>
  <pre><code>WARNING: Ignoring invalid distribution -p (c:\python310\lib\site-packages)
  WARNING: Ignoring invalid distribution - (c:\python310\lib\site-packages)
  WARNING: Ignoring invalid distribution -p (c:\python310\lib\site-packages)
  WARNING: Ignoring invalid distribution -ip (c:\python310\lib\site-packages)
  WARNING: Ignoring invalid distribution - (c:\python310\lib\site-packages)
  Collecting SpeechRecognition
    Using cached SpeechRecognition-3.8.1-py2.py3-none-any.whl (32.8 MB)
  WARNING: Ignoring invalid distribution -p (c:\python310\lib\site-packages)
  WARNING: Ignoring invalid distribution -ip (c:\python310\lib\site-packages)
  WARNING: Ignoring invalid distribution - (c:\python310\lib\site-packages)
  Installing collected packages: SpeechRecognition
  WARNING: Ignoring invalid distribution -p (c:\python310\lib\site-packages)
  WARNING: Ignoring invalid distribution -ip (c:\python310\lib\site-packages)
  WARNING: Ignoring invalid distribution - (c:\python310\lib\site-packages)
  Successfully installed SpeechRecognition-3.8.1
  WARNING: Ignoring invalid distribution -p (c:\python310\lib\site-packages)
  WARNING: Ignoring invalid distribution -ip (c:\python310\lib\site-packages)
  WARNING: Ignoring invalid distribution - (c:\python310\lib\site-packages)
  </code></pre>
  <p>The code I wrote:</p>
  <pre><code>import pyttsx3
  import speech_recognition as sr 
  Assistant = pyttsx3.init('sapi5')
  voices = Assistant.getProperty('voices')
  Assistant.setProperty('voices',voices[0].id)
  
  print('voice set to ' + voices[0].id)
  
  def Speak(audio):
      print(&quot;      &quot;)
      Assistant.say(audio)
      print(&quot;      &quot;)
      Assistant.runAndWait()
  
  def takecommand():
      command = sr.Recognizer()
      with sr.Microphone() as source:
          print(&quot;listening...........&quot;)
          command.pause_threshold(1)
          audio = command.listen(source)
  
          try:
              print(&quot;Recognizing&quot;)
              query = command.recognize_google(audio,language='en-in')
              print(f&quot;You said : {query}&quot;)
          except Exception as error:
              print('please say that again , sir?')
              return None
          
          return query
  
  Speak(&quot;Hello ,sir&quot;)
  takecommand()
  </code></pre>
  <p>The error I got:</p>
  <pre><code>      
  Traceback (most recent call last):
    File &quot;C:\Python310\lib\site-packages\speech_recognition\__init__.py&quot;, line 108, in get_pyaudio
      import pyaudio
  ModuleNotFoundError: No module named 'pyaudio'
  
  During handling of the above exception, another exception occurred:
  
    File &quot;d:\coding\Artificial intelligence COURSE\JARVIS\app.py&quot;, line 33, in &lt;module&gt;
      takecommand()
    File &quot;d:\coding\Artificial intelligence COURSE\JARVIS\app.py&quot;, line 17, in takecommand
      with sr.Microphone() as source:
    File &quot;C:\Python310\lib\site-packages\speech_recognition\__init__.py&quot;, line 79, in __init__
      self.pyaudio_module = self.get_pyaudio()
    File &quot;C:\Python310\lib\site-packages\speech_recognition\__init__.py&quot;, line 110, in get_pyaudio
      raise AttributeError(&quot;Could not find PyAudio; check installation&quot;)
  AttributeError: Could not find PyAudio; check installation
  </code></pre>
  <p>I tried:</p>
  <pre><code>pip install PyAudio
  </code></pre>
  <p>and I got:</p>
  <pre><code>WARNING: Ignoring invalid distribution -ip (c:\python310\lib\site-packages)
  WARNING: Ignoring invalid distribution - (c:\python310\lib\site-packages)
  WARNING: Ignoring invalid distribution -p (c:\python310\lib\site-packages)
  WARNING: Ignoring invalid distribution -ip (c:\python310\lib\site-packages)
  WARNING: Ignoring invalid distribution - (c:\python310\lib\site-packages)
  WARNING: Skipping PyAudio as it is not installed.
  PS D:\coding\Artificial intelligence COURSE\JARVIS&gt; pip install PyAudio
  WARNING: Ignoring invalid distribution -p (c:\python310\lib\site-packages)
  WARNING: Ignoring invalid distribution -ip (c:\python310\lib\site-packages)
  WARNING: Ignoring invalid distribution - (c:\python310\lib\site-packages)
  WARNING: Ignoring invalid distribution -p (c:\python310\lib\site-packages)
  WARNING: Ignoring invalid distribution -ip (c:\python310\lib\site-packages)
  WARNING: Ignoring invalid distribution - (c:\python310\lib\site-packages)
  Collecting PyAudio
    Using cached PyAudio-0.2.11.tar.gz (37 kB)
    Preparing metadata (setup.py) ... done
  Using legacy 'setup.py install' for PyAudio, since package 'wheel' is not installed.
  WARNING: Ignoring invalid distribution -p (c:\python310\lib\site-packages)
  WARNING: Ignoring invalid distribution -ip (c:\python310\lib\site-packages)
  WARNING: Ignoring invalid distribution - (c:\python310\lib\site-packages)
  Installing collected packages: PyAudio
      Running setup.py install for PyAudio ... error
      ERROR: Command errored out with exit status 1:
       command: 'C:\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '&quot;'&quot;'C:\\Users\\Toshiba\\AppData\\Local\\Temp\\pip-install-kcd0evem\\pyaudio_a0f1c2c379a74eaf8d4dab779f566e4e\\setup.py'&quot;'&quot;'; __file__='&quot;'&quot;'C:\\Users\\Toshiba\\AppData\\Local\\Temp\\pip-install-kcd0evem\\pyaudio_a0f1c2c379a74eaf8d4dab779f566e4e\\setup.py'&quot;'&quot;';f = getattr(tokenize, '&quot;'&quot;'open'&quot;'&quot;', open)(__file__) if os.path.exists(__file__) else io.StringIO('&quot;'&quot;'from setuptools import setup; setup()'&quot;'&quot;');code = f.read().replace('&quot;'&quot;'\r\n'&quot;'&quot;', '&quot;'&quot;'\n'&quot;'&quot;');f.close();exec(compile(code, __file__, '&quot;'&quot;'exec'&quot;'&quot;'))' install --record 'C:\Users\Toshiba\AppData\Local\Temp\pip-record-6pe_k76o\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Python310\Include\PyAudio'
           cwd: C:\Users\Toshiba\AppData\Local\Temp\pip-install-kcd0evem\pyaudio_a0f1c2c379a74eaf8d4dab779f566e4e\
      Complete output (17 lines):
      running install
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-3.10
      copying src\pyaudio.py -&gt; build\lib.win-amd64-3.10
      running build_ext
      building '_portaudio' extension
      creating build\temp.win-amd64-3.10
      creating build\temp.win-amd64-3.10\Release
      creating build\temp.win-amd64-3.10\Release\src
      C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG 
  /MD -DMS_WIN64=1 -IC:\Python310\include -IC:\Python310\Include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um -IC:\Program Files 
  obuild\temp.win-amd64-3.10\Release\src/_portaudiomodule.obj
      _portaudiomodule.c
      C:\Python310\include\pyconfig.h(117): warning C4005: 'MS_WIN64': macro redefinition
      src/_portaudiomodule.c: note: see previous definition of 'MS_WIN64'
      src/_portaudiomodule.c(29): fatal error C1083: Cannot open include file: 'portaudio.h': No such file or directory
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
      ----------------------------------------
  ERROR: Command errored out with exit status 1: 'C:\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '&quot;'&quot;'C:\\Users\\Toshiba\\AppData\\Local\\Temp\\pip-install-kcd0evem\\pyaudio_a0f1c2c379a74eaf8d4dab779f566e4e\\setup.py'&quot;'&quot;'; __file__='&quot;'&quot;'C:\\Users\\Toshiba\\AppData\\Local\\Temp\\pip-install-kcd0evem\\pyaudio_a0f1c2c379a74eaf8d4dab779f566e4e\\setup.py'&quot;'&quot;';f = getattr(tokenize, '&quot;'&quot;'open'&quot;'&quot;', open)(__file__) if os.path.exists(__file__) else io.StringIO('&quot;'&quot;'from setuptools import setup; setup()'&quot;'&quot;');code = f.read().replace('&quot;'&quot;'\r\n'&quot;'&quot;', '&quot;'&quot;'\n'&quot;'&quot;');f.close();exec(compile(code, __file__, '&quot;'&quot;'exec'&quot;'&quot;'))' install --record 'C:\Users\Toshiba\AppData\Local\Temp\pip-record-6pe_k76o\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Python310\Include\PyAudio' Check the logs for full command output.     
  WARNING: Ignoring invalid distribution -p (c:\python310\lib\site-packages)
  WARNING: Ignoring invalid distribution -ip (c:\python310\lib\site-packages)
  WARNING: Ignoring invalid distribution - (c:\python310\lib\site-packages)
  </code></pre>