Otto is a voice assistant originally developed for my Raspberry Pi to control my room from an online UI. He updates his phrases dictionary automatically based on your microphone input.
If you have Git installed, you can run the following from your terminal:
git clone https://github.com/matthiaaas/otto-assistant.git
That will clone this repository and download it to your computer.
You can download the zip file using your browser of course.
This script uses some external libraries. Use pip to install all required packages. The easiest way to do this is by running the following from your terminal:
pip install -r requirements.txt
Simply run the run.py
script by double-clicking or executing from your command prompt.
python run.py
Now you can use the assistant by saying the default keyword "Otto" followed by your command or question. Wait after the keyword "Otto" for the beep sound.
Note: Otto is in English by default. In some cases it might be useful to change the keyword to a word that's typical for your language. You can also change the language, see here.
Weather
Otto, what's the weather like?
News
Otto, what are the news?
Info
Otto, who is Barack Obama?
To stop the assistant just close the window or - when using the terminal - interrupt the program with the shortcut ctrl + c
.
You can easily change the keyword, language or city by editing the settings.py
. Navigate into the assistant
directory and open the python script in your editor of choice.
default
# keyword for waking up
KEYWORD = "otto"
updated: keyword is now "Anna"
# keyword for waking up
KEYWORD = "anna"
Note: Use lowercase letters.
default
# language you want to speak and get answered in
LANGUAGE = "en-US"
updated: language is now German
# language you want to speak and get answered in
LANGUAGE = "de-DE"
default
# location used for weather requests and more
LOCATION = "berlin"
updated: loaction is now "Hamburg"
# location used for weather requests and more
LOCATION = "hamburg"
default
# openweatherapi key from their site
# (necessary for weather requests)
WEATHER_API_KEY = ""
updated: your individual api key (keep it secret) You can create your own free key here!
# openweatherapi key from their site
# (necessary for weather requests)
WEATHER_API_KEY = "0abc1def2ghi3jkl4mno5pqr6stu"
Note: Use lowercase letters.
Feel free to start new pull requests. I appreciate improved code :) Please take a look at Gitmoji for all your commits for consistent messages.
If you wish to have a specific feature supported, start a new issue.
Take a look at the TODO.md for a list of all planned improvements and features - feel free to contribute!
Take a look at the TROUBLESHOOTING.md!