The idea to build this robot came from the Iron Man movie. Jarvis, an intelligent robot that talks to Iron Man and obeys his orders. Why don't we have these robots? I do not know, so we can build our own robot.
I have no idea to choose a name, so I named my robot "No Name". Or maybe I call him Soldier because It looks cool!
While writing this robot, many ideas came to my mind, but I did not write them all down and I do not remember some of them, so I'll check the project from time to time and add new things.
This robot is currently designed and implemented on my system and in accordance with the programs installed on my system, so you need to know a little bit of Python and Linux to run this robot on yours and change it to work on your os.
This robot absolutely needs to be programmed to behave the way you like. It can do whatever you like, I personally connected my room lamp to the robot with an Arduino board and a bit of wiring, and I can turn the lamp on and off with my own voice But you can do anything else with this robot and add new features. Just write enough script for what you want to do and add it to the robot's brain.
So if it does something unexpected, do not panic and start reading the source code and look for bugs!!!
Maybe later I will try to write this robot for other operating systems
I am using ubuntu so you can only use these commands on debian based systems. If you are using another system, find a way to install the following packages in your system and If anything goes wrong, just Google it.
First you should install required python libraries using pip3 install --upgrade -r requirements.txt
then install following packages:
sudo apt install python3-wheel python3-setuptools python3-pip swig
sudo apt install espeak ffmpeg python3-pyqt5 python3-alsaaudio python3-pyaudio python3-pocketsphinx python3-gi
You can run different scripts for different modes:
file | description |
---|---|
soldier_chat.py | You need to chat with the robot to communicate with it |
soldier_voice.py | You need to use your voice to talk to it |
soldier_gui.py | In this case, it has a user interface and It supports both chat and voice, but cannot use both modes at the same time. |
just run one of them an enjoy. |
for creating the Soldier's icon in desktop and your application menu, you have to copy soldier.desktop to /home/your username/.local/share/applications
. (Don't forget to edit desktop file before copying it!)
-
Talk to Me : hello Answer : Well, hello
I am listening : my boy Answer : Welcome home, sir! -
Uses shell commands to play and pause rhythmbox music. (you should have installed rhytmbox on your system!)
Talk to Me : play music Answer : On it!
Talk to Me : Stop music Answer : On it!
Talk to Me : Next Track Answer : Right away, sir!
I am listening : Previous Track Answer : Right away, sir! -
Talk to Me : what time is it? Answer : The time is 4 43 am
-
Talk to Me : What is IOT? Answer : Do you want me to google that for you?
Talk to Me : yes Answer : Right away, sir! Created new window in existing browser session.Uses youtube.py to find the first search result for the last user input in above case, and opens it in a new tab on firefox.
-
I am listening : Google what is the answer to life? Answer : Right away, sir! Created new window in existing browser session.
Talk to Me : Search youtube for banana Answer : On it! Created new window in existing browser session.
Talk to Me : Search for gas station on google maps Answer : On it! Created new window in existing browser session. -
Put your wallpapers in folder named wallpapers, so bot will change your desktop background to one of them when you want.
I am listening : change wallpaper Answer : On it!
-
Talk to Me : increase valume to * Answer : Right away, sir!
I am listening : decrease valume to * Answer : Right away, sir! -
I am listening : open nautilus Answer : Right away, sir!
Talk to Me : take me to /etc Answer : Sure thing! (Opens /etc in nautilus)
I am listening : take me home Answer : Sure thing! (Opens ~ in nautilus)
I am listening : open calculator Answer : Sure thing! -
I am listening : exit / quit / bye / goodbye Answer : Sure thing, goodbye!
-
Standard replies for unrecognized/unmatched inputs.
⚠️ Warning: This repository is just a project for my freetime and it comes with absolute no support and I do not take responsibility for any problems caused by the robot.
💡 Tip: I have to tell this again, This robot is not capable of learning and you have to add new and desired sentences to the robot using AIML language. Maybe in the future I will add "how to add new sentences to bot" in the wiki section.
- add support for other os
- review scripts and edit them
- add more AI files from other robots
- add wiki
- add more pictures for mainwindow
- maybe an installer?
- add soldier-assistant to run script and make .desktop file
- pack the scripts to be neat
- fix icon
- make a script-handler that aiml files call it to run other programs