浏览代码

use random wake up answer

nico 8 年之前
父节点
当前提交
ef498038d0
共有 2 个文件被更改,包括 12 次插入3 次删除
  1. 2 2
      core/MainController.py
  2. 10 1
      settings.yml

+ 2 - 2
core/MainController.py

@@ -41,8 +41,8 @@ class MainController:
         # pause the snowboy process
         self.pause_jarvis_trigger()
         print "Start listening for order"
-        # Todo add a list of words in settings
-        Say(message="oui monsieur?")
+        random_answers = self.conf["random_wake_up_answers"]
+        Say(message=random_answers)
         self.order_listener.load_stt_plugin()
 
     def analyse_order(self, order):

+ 10 - 1
settings.yml

@@ -11,9 +11,18 @@ trigger:
 # This is the STT that will be used by default
 default_speech_to_text: "google"
 # This is the default TTS that will be used by JARVIS to talk.
-#default_text_to_speech: "pico2wave"
 default_text_to_speech: "pico2wave"
 
+# When jarvis detect the hotword/trigger, he will select randomly a phrase in the following list
+# to notify the user that he's listening for orders
+random_wake_up_answers:
+  - "Oui monsieur?"
+  - "Je vous écoute"
+  - "Monsieur?"
+  - "Que puis-je faire pour vous?"
+  - "J'écoute"
+  - "Oui?"
+
 # Spreech to Text engines configuration
 # Available engine are:
 # - google (via SpeechRecognition)