You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I personally feel that the code written to open the web browser in speech.py is too long. There is actually no need to specify the path of the chrome installation. Just the use the web browser module and it would open it in the default browser. If you want to open it with chrome, set chrome as default browser. Hope you'd fix this.
The text was updated successfully, but these errors were encountered:
yes you are true this could be done with this code
import speech_recognition as sr
recognizer = sr.Recognizer()
microphone = sr.Microphone()
with microphone as source:
print("Speak now...")
recognizer.adjust_for_ambient_noise(source)
audio = recognizer.listen(source)
response = recognizer.recognize_google(audio).lower()
#now you can use the variable response
#plz correct the indentation of the code in your editor
plz let me know if this code works for you and other viewers
@Empireofprogrammers , I am thankful that you commented on this issue. The code you have written however would not do anything related to the web browser. The code you have written is actually for recognizing the input given by the user. What I meant was that to simply : import webbrowser
and simply use this module to open any web url by : webbrowser.open('www.yourlink.com')
I hope you'd test this yourself and see the results.
I personally feel that the code written to open the web browser in speech.py is too long. There is actually no need to specify the path of the chrome installation. Just the use the web browser module and it would open it in the default browser. If you want to open it with chrome, set chrome as default browser. Hope you'd fix this.
The text was updated successfully, but these errors were encountered: