Open tabindumbe opened 3 years ago
Hi tabindumbe, Is it showing any kind of error in the terminal?
No error in the terminal
Sent from my iPhone
On 21 Apr 2021, at 10:11, Mak @.***> wrote:
Hi tabindumbe, Is it showing any kind of error in the terminal?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Hello sir i have a problem with the Jarvis coding. My code takes in input, recognizes input but doesn't give out voice output
import pyttsx3 #pip install pyttsx3 import speech_recognition as sr import datetime import wikipedia
engine = pyttsx3.init()
def speak(audio): engine.say(audio) engine.runAndWait()
def time_(): Time=datetime.datetime.now().strftime('%I:%M:%S') speak ("The current time is") speak(Time)
def date_(): year = datetime.datetime.now().year month = datetime.datetime.now().month date = datetime.datetime.now().day speak("The current date is") speak(date) speak(month) speak(year)
def wishme(): speak("Welcome back Mac-Roy!") time() date()
def TakeCommand(): r = sr.Recognizer() with sr.Microphone() as source: print("Listening...") r.pause_threshold = 1 audio = r.listen(source) try: print("Recognizing...") query = r.recognize_google(audio, language='en-pk') print(query)
if name == "main":