Skip to content

Instantly share code, notes, and snippets.

@KhanradCoder
Last active March 1, 2024 15:30
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save KhanradCoder/846f4dad00d2f8538f91b3e1896212d3 to your computer and use it in GitHub Desktop.
Save KhanradCoder/846f4dad00d2f8538f91b3e1896212d3 to your computer and use it in GitHub Desktop.
Simple implementation of speech recognition in python
# Install speech_recognition with pip install speech_recognition
# Install pyaudio with pip install pyaudio
# Make sure you look up full instructions for installing pyaudio
import speech_recognition as sr
recognizer = sr.Recognizer()
mic = sr.Microphone()
with mic as source:
audio = recognizer.listen(source)
output = recognizer.recognize_google(audio)
print(output)
@SysKeyyy
Copy link

peech_recognition.UnknownValueError am getting tis error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment