#installtations : pyautogui, speech_recognition
import pyautogui as auto
import time
import datetime
import webbrowser
import pyttsx3
import speech_recognition as sr
engine = pyttsx3.init()
def talk(text):
engine.say(text)
engine.runAndWait()
listener = sr.Recognizer()
link = "{this should be changed as per requirement}"
webbrowser.open(link)
time.sleep(7)
auto.hotkey('ctrl','e')
auto.hotkey('ctrl','d')
auto.click(1359,581)
time.sleep(1)
auto.click(1735, 978)
cutime = time_stamp = datetime.datetime.now().strftime('%Y-%m-%d-%H-%M-%S')
auto.screenshot(f'chat{cutime}.png')
def write():
try:
with sr.Microphone() as source:
print('What should we write')
talk('What should we write')
voice = listener.listen(source)
info = listener.recognize_google(voice)
info = info.capitalize()
auto.click(1658, 888)
time.sleep(1)
auto.typewrite(info, interval=0.1)
auto.click(1847, 882)
except:
pass
write()