A project to create a modular digital assistant with voice support licensed under MIT License
Notice: This program is still very much under development. Everything is provided as is and will probably change a lot by later versions.
Setting up a Python virtual environment as described here is strongly recommended. Only tested for Python >= 3.8. Windows is currently not supported for the speech client, will come back soon
- Clone the repository to a place of your liking
- Install pyaudio manually for your system as described here
- Windows needs to install pyaudio using winpip
pip install pipwin pipwin install pyaudio
- OSX needs to install pyaudio using brew
brew install portaudio pip install pyaudio
- Windows needs to install pyaudio using winpip
- Install requirements from requirements.txt
pip install -r requirements.txt
- Set up given tokens and configurations in your configuration directory, e.g.
\AppData\Local\derilion\icarus\settings.ini
on Windows or$HOME/.config/icarus_base/settings.ini
in linux - Run
python main.py
For general usage a given text or speech input will be processed and a response will be given on the same channel. By default a command line client is included and can respond to text queries based on the installed skills.
The currently only supported hotword to activate voice interaction is 'Jarvis'.
Skill files need to be copied to the icarus/skills/
directory. When Icarus is restarted it will automatically recognize skills and enable them.
Client files need to be copied to the icarus/Clients/
directory. When Icarus is restarted it will automatically recognize clients and enable them.
For Skills a straightforward API is given via inheritance. Inherit from icarus.skills.superclient.SuperClient
, set values for self.id and the skill can be loaded.
General parameters which should be set are:
self.id
: unique idself.name
: skill name shown in userspaceself.version
: version revision of the skillself.creator
: credit to yourself (and to blame you ofc)self.phrases
: array of example sentences used to recognize if a phrase should be mapped to your skill
Functions you should implement are:
def setup(self)
: Function is loaded before the skill is used, use to set up skill tokens etc.def main(self, message)
: Function is called if a new message has been received and given to the skill. AContext
object will be given, which offers message information inContext.msg
and the option to respond in text viaContext.send(str)
Configuration data can be loaded using self.get_config('ID_HERE')
. A dictionary can be saved between program runs using self.save_dict(DICTIONARY)
and later be loaded using self.load_dict(DICTIONARY)