-2

This the code I wrote for speech recognition after successful installation of necessary libraries.

import speech_recognition as sr
import pyttsx3

r = sr.Recognizer()

with sr.Microphone() as source:
    print('Please Speak: ')
    audio = r.listen(source)
    try:
        text = r.recognize_google(audio)
        print(f'Did you told: {text}')

    except:
        print('Could not understand')

I am not able to understand what these horrible error means. Repeatedly am installing pyaudio but that is not working. enter image description here

This is the gift am getting while installing pyaudio. enter image description here

  • 2
    Does this answer your question? [I can't install pyaudio on Windows? How to solve "error: Microsoft Visual C++ 14.0 is required."?](https://stackoverflow.com/questions/52283840/i-cant-install-pyaudio-on-windows-how-to-solve-error-microsoft-visual-c-14) – Luke Darcy Jul 26 '21 at 20:49

1 Answers1

0

From my own experience, installing pyaudio directly through pip doesn't work. The top answer (by Foad) on this thread is what worked for me.

Luke Darcy
  • 43
  • 7