How to Install PyAudio & Speech Recognition| Fix error: Microsoft Visual C++ 14.0 is required.

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 พ.ย. 2024

ความคิดเห็น • 17

  • @anonymous-bi6jn
    @anonymous-bi6jn 2 ปีที่แล้ว

    Really impressed!the way you explained everything in a detailed manner

    • @BrandonJacobson
      @BrandonJacobson  2 ปีที่แล้ว

      Thank you for the positive feedback.

  • @oshinechandra8720
    @oshinechandra8720 2 ปีที่แล้ว +1

    Thank you so much. I was facing this ERROR: PyAudio-0.2.11-cp38-cp38-win_amd64.whl is not a supported wheel on this platform. It turned out I have python 3.7.4 and I was installing the wrong version of pyaudio. The correct version for me: PyAudio-0.2.11-cp37-cp37m-win_amd64.whl

  • @CountMordecai
    @CountMordecai 3 ปีที่แล้ว

    This was a great help. Thank you so much. I was really stuck while doing a project with this.

  • @McKane_CL
    @McKane_CL ปีที่แล้ว

    I have error in the following line: with sr.Microphone() as source:
    Could not find PyAudio; check installation
    I have installed pyaudio in every possible way and it still won't run, is it because of the environment, I have python 3.9 and 3.11 in vs.
    Has anyone encountered the same problem?

    • @BrandonJacobson
      @BrandonJacobson  ปีที่แล้ว

      I'm assuming you tried this video all the way through and it still didn't work?

    • @McKane_CL
      @McKane_CL ปีที่แล้ว

      @@BrandonJacobson didn´t work. I have 3 versions of python installed. This is bad?

    • @BrandonJacobson
      @BrandonJacobson  ปีที่แล้ว

      @@McKane_CL No, not necessarily. My video explains using the .whl file for Windows 64-bit, did you install the right .whl file?

    • @McKane_CL
      @McKane_CL ปีที่แล้ว

      @@BrandonJacobson yes.

  • @mariogreco3143
    @mariogreco3143 ปีที่แล้ว

    Hi bro! Excellent content! I get this 2 errors:
    Traceback (most recent call last):
    File "C:\Users\mgreco\PycharmProjects\VoiceToTxt\test.py", line 13, in listen
    recognizer.adjust_for_ambient_noise(source)
    File "C:\Users\mgreco\PycharmProjects\VoiceToTxt\venv\lib\site-packages\speech_recognition\__init__.py", line 383, in adjust_for_ambient_noise
    assert source.stream is not None, "Audio source must be entered before adjusting, see documentation for ``AudioSource``; are you using ``source`` outside of a ``with`` statement?"
    AssertionError: Audio source must be entered before adjusting, see documentation for ``AudioSource``; are you using ``source`` outside of a ``with`` statement?
    During handling of the above exception, another exception occurred:
    Traceback (most recent call last):
    File "C:\Users\mgreco\PycharmProjects\VoiceToTxt\test.py", line 27, in
    listen(recognizer, micro)
    File "C:\Users\mgreco\PycharmProjects\VoiceToTxt\test.py", line 11, in listen
    with micro as source:
    File "C:\Users\mgreco\PycharmProjects\VoiceToTxt\venv\lib\site-packages\speech_recognition\__init__.py", line 189, in __exit__
    self.stream.close()
    AttributeError: 'NoneType' object has no attribute 'close'
    Do you know what could be causing this? PyAudio and speechrecognition installed correctly.
    Collecting pyaudio
    Using cached PyAudio-0.2.13-cp310-cp310-win_amd64.whl (164 kB)
    Installing collected packages: pyaudio
    Successfully installed pyaudio-0.2.13
    Installing collected packages: speechrecognition
    Successfully installed speechrecognition-3.10.0

    • @mariogreco3143
      @mariogreco3143 ปีที่แล้ว

      My code:
      from typing import Any, List, Tuple
      import speech_recognition as sr
      recognizer = sr.Recognizer()
      micro = sr.Microphone()
      def listen(recognizer, micro):
      while True:
      try:
      with micro as source:
      print('Listening...')
      recognizer.adjust_for_ambient_noise(source)
      recognizer.dynamic_energy_threshold = 3000
      audio = recognizer.listen(source, timeout=5.0)
      response = recognizer.recognize_google(audio)
      print(response)
      return response
      except sr.WaitTimeoutError:
      pass
      except sr.UnknownValueError:
      pass
      except sr.RequestError:
      print('Network error.')
      while True:
      listen(recognizer, micro)

    • @BrandonJacobson
      @BrandonJacobson  ปีที่แล้ว

      Have you tried commenting out the adjust_for_ambient_noise to see if that fixes the problem? I'll try and look up the documentation to see if the library has changed the method names too.

  • @rajumodi2536
    @rajumodi2536 2 ปีที่แล้ว

    thank you sir , it helped me .

  • @prashantsrivastava9956
    @prashantsrivastava9956 ปีที่แล้ว

    thanx a lot....

  • @alirad8996
    @alirad8996 2 ปีที่แล้ว

    thank you

  • @joelisaiahbobai4331
    @joelisaiahbobai4331 3 ปีที่แล้ว

    pls i need ur help