mirror of
https://github.com/metafy-social/python-scripts.git
synced 2024-11-30 15:31:10 +00:00
13 lines
360 B
Python
13 lines
360 B
Python
import wikipedia
|
|
import pyttsx3
|
|
engine = pyttsx3.init('sapi5')
|
|
voices = engine.getProperty('voices')
|
|
engine.setProperty('voice', voices[0].id)
|
|
def speak(audio):
|
|
engine.say(audio)
|
|
engine.runAndWait()
|
|
query = input("What You Want To Ask ??")
|
|
results = wikipedia.summary(query, sentences=2)
|
|
speak("According to Wikipedia\n")
|
|
print(results)
|
|
speak(results) |