This is a simple virtual assistant that can do variety of task like opening Google maps , telling weather and temperature information , sending email, create an instant meeting and much more just using voice command!
- pyttsx3 is a text-to-speech conversion library in Python.
- Unlike alternative libraries, it works offline, and is compatible with both Python 2 and 3.
- pip install pyttsx3
- If you recieve errors such as No module named win32com.client,
- No module named win32, or No module named win32api, you will need to additionally install pypiwin32.
import pyttsx3
engine = pyttsx3.init()
engine.say("I will speak this text")
engine.runAndWait()
Library for performing speech recognition, with support for several engines and APIs, online and offline.
- pip install SpeechRecognition
import speech_recognition as sr
engine = pyttsx3.init('sapi5')
voices = engine.getProperty('voices')
engine.setProperty('voice', voices[0].id)
The selenium package is used to automate web browser interaction from Python.
- pip install selenium
from selenium import webdriver from selenium.webdriver.common.keys import Keys
browser = webdriver.Firefox()
browser.get('http://www.yahoo.com') assert 'Yahoo' in browser.title
elem = browser.find_element_by_name('p') # Find the search box elem.send_keys('seleniumhq' + Keys.RETURN)
browser.quit()
The tkinter package (“Tk interface”) is the standard Python interface to the Tk GUI toolkit.
Both Tk and tkinter are available on most Unix platforms, as well as on Windows systems.
(Tk itself is not part of Python; it is maintained at ActiveState.)
- pip install tk
from tkinter import *
root=Tk()
root.geometry("700x550")
root.resizable(0,0)
root.mainloop()