Last active
November 2, 2022 14:37
-
-
Save SULAIMAN-5-AHMED/6668ae4cae23cf9f87111ea5cf69e13e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import speech_recognition as sr | |
import webbrowser | |
recog = sr.Recognizer() | |
with sr.Microphone() as source: | |
print('WHAT DO YOU WANT TO SEARCH: ') | |
audio = recog.listen(source) | |
try: | |
text = recog.recognize_google(audio) | |
print(f'YOUR SAID: {text}') | |
except: | |
print("SORRY ALOT OF NOISE!") | |
webbrowser.open_new('https://www.google.com/search?q=' + text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment