diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 0000000..6d29ee8 --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +jarvis.py \ No newline at end of file diff --git a/.idea/Python-Voice-Assistant.iml b/.idea/Python-Voice-Assistant.iml index 74d515a..9bec52b 100644 --- a/.idea/Python-Voice-Assistant.iml +++ b/.idea/Python-Voice-Assistant.iml @@ -4,7 +4,7 @@ - + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 7842331..db8786c 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,4 +1,7 @@ - + + + \ No newline at end of file diff --git a/jarvis.py b/jarvis.py index 480749d..16c410a 100644 --- a/jarvis.py +++ b/jarvis.py @@ -195,6 +195,22 @@ def NasaNews(API_KEY): except FileNotFoundError: print(f"Error: {filePath} not found.") + elif 'quote' in query: + quote_api_url = "https://zenquotes.io/api/random" + res = requests.get(quote_api_url) + if res.status_code == 200: + data = res.json() + if data: + quote = data[0]['q'] + author = data[0]['a'] + speak(f"Here is the quote from the author {author}") + speak(f"{quote}") + else: + speak("Sorry , but there might be some network issue") + else: + speak("Failed to Fetch the quote due to some of the issues") + + elif 'internet speed' in query: st = speedtest.Speedtest() dl = bytes_to_mb(st.download())