Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes for robovision #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions fixes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
activate the virtualenv and run the following commands

pip uninstall opencv-contrib-python

pip install opencv-contrib-python==3.3.0.9
16 changes: 16 additions & 0 deletions speech.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import speech_recognition as sr

r = sr.Recognizer()
with sr.Microphone() as source:
print("Speak Anything :")
audio = r.listen(source,timeout=1,phrase_time_limit=10)
print('Done, Please wait while we are processing what you said...')
try:
text = r.recognize_google(audio)
print("You said : {}".format(text))
except:
print("Sorry we could not recognize what you said. You can try again.")