Browse Source

rename project in docs and installation scripts

Nicolas Marcq 8 years ago
parent
commit
a4dd9d2f16

+ 2 - 2
Docs/automated_install.md

@@ -1,4 +1,4 @@
-# JARVIS automated install
+# kalliope automated install
 
 Clone the project
 ```
@@ -26,4 +26,4 @@ Then play the recorded audio file
 play test.wav
 ```
 
-If everything is ok, you can start playing with jarvis. First, 
+If everything is ok, you can start playing with kalliope. First, 

+ 1 - 1
Docs/dev_env_install.md

@@ -1,6 +1,6 @@
 # Dev environment installation
 
-This documentation aims at explaining the step by step manual deployment of JARVIS.
+This documentation aims at explaining the step by step manual deployment of Kalliope.
 
 Tested env
 - Ubuntu 16.04

+ 13 - 21
Docs/jarvis_cli.md → Docs/kalliope_cli.md

@@ -1,44 +1,36 @@
-# JARVIS Command-line interface
+# Kalliope Command-line interface
 
 ## SYNOPSIS
-This is the syntax used to run jarvis from command line
+This is the syntax used to run Kalliope from command line
 ```
-cd /path/to/jarvis
-python jarvis.py command --option <argument>
+cd /path/to/kalliope
+python kalliope.py command --option <argument>
 ```
 
-For example, to start JARVIS we simply use
+For example, to start Kalliope we simply use
 ```
-python jarvis.py start
+python kalliope.py start
 ```
 
 ## ARGUMENTS
 
 ### start
-Start jarvis main program
+Start Kalliope main program
 
 Example usage
 ```
-python jarvis.py start
+python kalliope.py start
 ```
 
-To kill jarvis, you can press "Ctrl-C" on your keyboard.
+To kill Kalliope, you can press "Ctrl-C" on your keyboard.
 
 ### gui
-Launch the jarvis shell Graphical User Interface. 
-The GUI allow you to test your [STT](stt.md) and [TTS](tts.md) that you have configured in [settings.yml](default_settings.md) file of JARVIS.
+Launch the Kalliope shell Graphical User Interface. 
+The GUI allow you to test your [STT](stt.md) and [TTS](tts.md) that you have configured in [settings.yml](default_settings.md) file of Kalliope.
 
 Example usage
 ```
-python jarvis.py gui
-```
-
-### load-events
-Load crontab file with synapses from the brain which they have an event attached as inout signal.
-
-Example usage
-```
-python jarvis.py load-events
+python kalliope.py gui
 ```
 
 ## OPTIONS
@@ -49,7 +41,7 @@ Run a specific synapse from the brain file.
 
 Example usage
 ```
-python jarvis.py start --run-synapse "say hello"
+python kalliope.py start --run-synapse "say hello"
 ```
 
 ### --brain-file BRAIN_FILE

+ 10 - 10
Docs/settings.md

@@ -1,6 +1,6 @@
-# JARVIS settings
+# Kalliope settings
 
-This part of the documentation deals with the main configuration of JARVIS. 
+This part of the documentation deals with the main configuration of Kalliope. 
 This configuration is a file placed at the root of the project tree and called settings.yml.
 
 The syntax used is YAML.
@@ -11,7 +11,7 @@ In the settings.yml, the following settings are tunable:
 
 #### default_trigger
 
-The trigger is the module in charge detecting the hotword that wake up JARVIS.
+The trigger is the module in charge detecting the hotword that wake up Kalliope.
 Common usage of hotword include Alexa on Amazon Echo, OK Google on some Android devices and Hey Siri on iPhones.
 
 Specify the name of the trigger module you want to use.
@@ -19,38 +19,38 @@ Specify the name of the trigger module you want to use.
 default_trigger: "trigger_name"
 ```
 
-Available trigger for JARVIS are:
+Available trigger for Kalliope are:
 - snowboy
 
 #### default_speech_to_text
 
-A Speech To Text(STT) is an engine used to translate what you say into a text that can be processed by JARVIS core. 
-By default, JARVIS use google STT engine.
+A Speech To Text(STT) is an engine used to translate what you say into a text that can be processed by Kalliope core. 
+By default, Kalliope use google STT engine.
 
 You must provide an engine name in this variable following the syntax bellow
 ```
 default_speech_to_text: "stt_name"
 ```
 
-Available STT for JARVIS are:
+Available STT for Kalliope are:
 - google
 - bing
 
 #### default_text_to_speech
 A Text To Speech is an engine used to translate written text into a speech, into an audio stream.
-By default, JARVIS use Pico2wave TTS engine.
+By default, Kalliope use Pico2wave TTS engine.
 
 You must provide a TTS engine name in this variable following the syntax bellow
 ```
 default_text_to_speech: "tts_name"
 ```
 
-Available TTS for JARVIS are:
+Available TTS for Kalliope are:
 - pico2wave
 - voxygen
 
 #### random_wake_up_answers
-When JARVIS detects your trigger/hotword/magic word, he lets you know that he's operational and now waiting for order by answering randomly 
+When Kalliope detects your trigger/hotword/magic word, he lets you know that he's operational and now waiting for order by answering randomly 
 one of the sentences provided in the variable random_wake_up_answers.
 
 This variable must contain a list of string following the syntax bellow

+ 12 - 11
Docs/signals.md

@@ -1,6 +1,6 @@
 # Signals
 
-A signal is an input event triggered by a synapse. When a signal is caught, Jarvis run attached neurons of the synapse.
+A signal is an input event triggered by a synapse. When a signal is caught, Kalliope run attached neurons of the synapse.
 
 The syntax is the following
 ```
@@ -25,13 +25,14 @@ signals:
 ```
 
 > **Important note:** SST engines can misunderstand what you say, or return a text from the speech you said with some spelling mistake.
-For example, if you say "Jarvis please do this", the SST engine can return "JARVICE please do this". The recommended way is to test your STT engine by using the
-[JARVIS GUI](jarvis_cli.md) and see what is the returned text for the given order.
+For example, if you say "Kalliope please do this", the SST engine can return "caliope please do this". The recommended way is to test your STT engine by using the
+[Kalliope GUI](kalliope_cli.md) and see what is the returned text for the given order.
 
-> **Important note:** Jarvis will try to match the order in each synapse of his brain, if an order of one synapse is included in another order of another synapse, then both synapse task will be started by JARVIS.
+> **Important note:** Kalliope will try to match the order in each synapse of his brain, if an order of one synapse is included in another order of another synapse, then both synapse task will 
+be started by Kalliope.
 
 > For example, if you have "test my umbrella" in a synapse A and "test" in a synapse B. When you'll say "test my umbrella", both synapse A and B
-will be started by JARVIS. So keep in mind that is a best practice to use different sentences with more than one word.
+will be started by Kalliope. So keep in mind that is a best practice to use different sentences with more than one word.
 
 ## Event
 
@@ -39,7 +40,7 @@ An event is a way to schedule the launching of a synapse periodically at fixed t
 
 The event system is based on [Linux crontab](https://en.wikipedia.org/wiki/Cron). A crontab is file that specifies shell commands to run periodically
  on a given schedule.
-When you declare an event in the brain, JARVIS will load the crontab file for you for scheduling the launching 
+When you declare an event in the brain, Kalliope will load the crontab file for you for scheduling the launching 
 of the  target synapse.
 
 The syntax of an event declaration in a synapse is the following
@@ -61,12 +62,12 @@ Where a crontab period use the syntax bellow
  * * * * *  
 ```
 
-For example, if we want JARVIS to run the synapse every day a 8 PM. The event would be
+For example, if we want Kalliope to run the synapse every day a 8 PM. The event would be
 ```
 - event: "0 20 * * *"
 ```
 
-Let make a complete example. We want JARVIS to wake us up each morning of working day (Monday to friday) at 7 AM and:
+Let make a complete example. We want Kalliope to wake us up each morning of working day (Monday to friday) at 7 AM and:
 - Wish us good morning
 - Give us the our
 - Play our favourite web radio
@@ -86,12 +87,12 @@ The synapse in the brain would be
       - event: "0 7 * * 1,2,3,4,5"
 ```
 
-After setting up an event, you must restart jarvis
+After setting up an event, you must restart Kalliope
 ```
-python jarvis.py start
+python kalliope.py start
 ```
 
-If the syntax is ok, JARVIS will show you each synapse that he has loaded in the crontab
+If the syntax is ok, Kalliope will show you each synapse that he has loaded in the crontab
 ```
 Synapse "wake up" added to the crontab
 Event loaded in crontab

+ 1 - 1
Docs/trigger.md

@@ -1,6 +1,6 @@
 
 
-With JARVIS project, you can set the Hotword you want. You can create your magic word by connecting to [Snowboy](https://snowboy.kitt.ai/) 
+With Kalliope project, you can set the Hotword you want. You can create your magic word by connecting to [Snowboy](https://snowboy.kitt.ai/) 
 and then download the trained model file.
 
 Once downloaded, place the file in **trigger/snowboy/resources**.

+ 1 - 1
LICENSE.md

@@ -1,6 +1,6 @@
 MIT License
 
-Copyright (c) 2016 JARVIS
+Copyright (c) 2016 KALLIOPE
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal

+ 10 - 8
README.md

@@ -1,13 +1,13 @@
-# Jarvis
+# Kalliope
 
-JARVIS is a modular always-on voice controlled personal assistant designed for home automation.
+Kalliope is a modular always-on voice controlled personal assistant designed for home automation.
 
 TODO: insert video demo EN
 TODO: insert video demo FR
 
-JARVIS can run on a Raspberry Pi and he's multi-lang.
+Kalliope can run on a Raspberry Pi and he's multi-lang.
 
-JARVIS is easy-peasy to use, see the hello world
+Kalliope is easy-peasy to use, see the hello world
 ```
   - name: "Hello world"
     neurons:      
@@ -26,8 +26,8 @@ JARVIS is easy-peasy to use, see the hello world
 ## Usage
 
 - [Configure default settings](Docs/settings.md)
-- [Create the brain of your JARVIS](Docs/brain.md)
-- [Run JARVIS with CLI](Docs/jarvis_cli.md)
+- [Create the brain of your Kalliope](Docs/brain.md)
+- [Run Kalliope with CLI](Docs/kalliope_cli.md)
 
 ## Neurons
 
@@ -39,7 +39,7 @@ A neuron is a plugin that can be used from your **brain.yml**.
 
 ## Contributing
 
-If you'd like to contribute to JARVIS, please read our [Contributing Guide](Docs/contributing.md), which contains the philosophies to preserve, tests to run, and more. 
+If you'd like to contribute to Kalliope, please read our [Contributing Guide](Docs/contributing.md), which contains the philosophies to preserve, tests to run, and more. 
 Reading through this guide before writing any code is recommended.
 
 - Contribute
@@ -47,11 +47,13 @@ Reading through this guide before writing any code is recommended.
 
 ## Credits
 
+> **Meaning of Kalliope** Kalliope means "beautiful voice" from Greek καλλος (kallos) "beauty" and οψ (ops) "voice". In Greek mythology she was a goddess of epic poetry and eloquence, one of the nine Muses.
+
 TODO: Write credits
 
 ## License
 
 Copyright (c) 2016. All rights reserved.
 
-JARVIS is covered by the MIT license, a permissive free software license that lets you do anything you want with the source code, 
+Kalliope is covered by the MIT license, a permissive free software license that lets you do anything you want with the source code, 
 as long as you provide back attribution and ["don't hold you liable"](http://choosealicense.com/). For the full license text see the [LICENSE.md](LICENSE.md) file.

+ 10 - 10
core/CrontabManager.py

@@ -7,14 +7,14 @@ from core.Models import Event
 import logging
 
 logging.basicConfig()
-logger = logging.getLogger("jarvis")
+logger = logging.getLogger("kalliope")
 
 
 class InvalidCrontabPeriod(Exception):
     pass
 
-CRONTAB_COMMENT = "JARVIS"
-JARVIS_ENTRY_POINT_SCRIPT = "jarvis.py"
+CRONTAB_COMMENT = "KALLIOPE"
+KALLIOPE_ENTRY_POINT_SCRIPT = "kalliope.py"
 
 
 class CrontabManager:
@@ -31,7 +31,7 @@ class CrontabManager:
         :return:
         """
         # clean the current crontab from all jarvis event
-        self._remove_all_jarvis_job()
+        self._remove_all_job()
         # load the brain file
         for synapse in self.brain.synapses:
             for signal in synapse.signals:
@@ -56,7 +56,7 @@ class CrontabManager:
     def get_jobs(self):
         return self.my_user_cron.find_comment(CRONTAB_COMMENT)
 
-    def _remove_all_jarvis_job(self):
+    def _remove_all_job(self):
         """
         Remove all line in crontab that are attached to JARVIS
         :return:
@@ -73,7 +73,7 @@ class CrontabManager:
         new_iter = self.my_user_cron.find_comment(CRONTAB_COMMENT)
         sum_job = sum(1 for _ in new_iter)
         while sum_job > 0:
-            self._remove_all_jarvis_job()
+            self._remove_all_job()
 
     def _get_base_command(self):
         """
@@ -88,11 +88,11 @@ class CrontabManager:
         # get parent dir. Now we are in /an/unknown/path/jarvis
         parent_dir = os.path.normpath(cur_script_directory + os.sep + os.pardir)
         # we add the jarvis.py file name
-        real_jarvis_entry_point_path = parent_dir + os.sep + JARVIS_ENTRY_POINT_SCRIPT
+        real_entry_point_path = parent_dir + os.sep + KALLIOPE_ENTRY_POINT_SCRIPT
         # We test that the file exist before return it
-        logger.debug("Real jarvis.py path: %s" % real_jarvis_entry_point_path)
-        if os.path.isfile(real_jarvis_entry_point_path):
-            crontab_cmd = "python %s start --brain-file %s --run-synapse " % (real_jarvis_entry_point_path,
+        logger.debug("Real jarvis.py path: %s" % real_entry_point_path)
+        if os.path.isfile(real_entry_point_path):
+            crontab_cmd = "python %s start --brain-file %s --run-synapse " % (real_entry_point_path,
                                                                               self.brain.brain_file)
             return crontab_cmd
         raise IOError("jarvis.py file not found")

+ 0 - 4
core/MainController.py

@@ -70,10 +70,6 @@ class MainController:
             if trigger.name == self.settings.default_trigger_name:
                 return TriggerLauncher.get_trigger(trigger, callback=self.callback)
 
-    def unpause_jarvis_trigger(self):
-        print "call unpause"
-        self.trigger_instance.unpause()
-
     @staticmethod
     def _get_random_sound(random_wake_up_sounds):
         """

+ 8 - 8
install/install.yml

@@ -4,13 +4,13 @@
   connection: local
   vars:
     - git_url: "git@gitlab.pwit.fr:millionsfortomorrow/jarvis.git"
-    - temp_local_repo: "/tmp/jarvis_repo"
+    - temp_local_repo: "/tmp/kalliope_repo"
 
   tasks:
     - name: clone project in /tmp as standart user
       git:
         repo: "{{ git_url }}"
-        dest: /tmp/jarvis_repo
+        dest: /tmp/kalliope_repo
         accept_hostkey: yes
 
 
@@ -20,8 +20,8 @@
   become: True
   vars:
     - git_url: "git@gitlab.pwit.fr:millionsfortomorrow/jarvis.git"
-    - temp_local_repo: "/tmp/jarvis_repo"
-    - jarvis_install_path: "/usr/lib/jarvis"
+    - temp_local_repo: "/tmp/kalliope_repo"
+    - install_path: "/usr/lib/jarvis"
   tasks:
     - name: Install packages
       apt: name={{ item }} update_cache=yes
@@ -61,17 +61,17 @@
 
     - name: Remove old version if exist
       file:
-        path: "{{ jarvis_install_path }}"
+        path: "{{ install_path }}"
         state: absent
 
     - name: Move repo in /usr/lib
-      command: mv "{{ temp_local_repo }}" "{{ jarvis_install_path }}"
+      command: mv "{{ temp_local_repo }}" "{{ install_path }}"
       when: git_repo_stat.stat.exists
 
     - name: Add entry in /usr/bin
       file:
-        src: "{{ jarvis_install_path }}/jarvis.py"
-        dest: /usr/bin/jarvis
+        src: "{{ install_path }}/kalliope.py"
+        dest: /usr/bin/kalliope
         state: link
         force: True
 

+ 1 - 1
install/install_jarvis.sh

@@ -7,5 +7,5 @@ sudo apt-get install python-pip
 sudo pip install ansible==2.1.1.0
 
 # Install the project
-cd jarvis/install
+cd kalliope/install
 ansible-playbook install.yml -K

+ 0 - 0
jarvis.py → kalliope.py