Answers for "how to search on wikipedia with speech recognition and speak the result with python"

0

how to search on wikipedia with speech recognition and speak the result with python

import wikipedia
import pyttsx3
import speech_recognition as sr
recognizer = sr.Recognizer()
microphone = sr.Microphone()
with microphone as source:
    print("plz speak...")
    a = recognizer.adjust_for_ambient_noise(source)
    audio = recognizer.listen(source)
    response = recognizer.recognize_google(audio).lower()
word = response
result = wikipedia.summary(word)
print(result)
pyttsx3.speak(result)
Posted by: Guest on October-19-2021

Code answers related to "how to search on wikipedia with speech recognition and speak the result with python"

Python Answers by Framework

Browse Popular Code Answers by Language