Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

additional.txt #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions additional.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
def wishMe():
hour = int(datetime.datetime.now().hour)
if hour>=0 and hour<12:
# speak("Good Morning!")
speech_BY_machine("Good Morning!, jay swaminarayan")

elif hour>=12 and hour<18:
speech_BY_machine("Good Afternoon!, jay swaminarayan")

else:
speech_BY_machine("Good Evening!, jay swaminarayan")
speech_BY_machine(f" hello Sir, i am jarvis your personal artificial intelligence assistant, Please tell me how may I help you")
engine.say("I am Jarvis Sir. Please tell me how may I help you")

def NewsFromBBC():

speech_BY_machine("here top news for you")
main_url = " https://newsapi.org/v1/articles?source=bbc-news&sortBy=top&apiKey=4dbc17e007ab436fb66416009dfb59a8"
open_bbc_page = requests.get(main_url).json()
article = open_bbc_page["articles"]
results = []

for ar in article:
results.append(ar["title"])

for i in range(len(results)):
print(i + 1, results[i])
from win32com.client import Dispatch
speak = Dispatch("SAPI.Spvoice")
speak.Speak(results)