nico 8 年之前
父节点
当前提交
5273fb51e3
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      core/Neurone.py

+ 3 - 2
core/Neurone.py

@@ -2,12 +2,13 @@ import importlib
 
 
 class Neurone:
-    def __init__(self):
-        # Here we load the stt and tts from settings
+    def __init__(self, stt=None, tts=None):
+        # TODO load the stt and tts from settings
         self.stt = "snowboy"
         self.tts = "pico2wave"
 
     def say(self, message):
         # here we use the tts to make jarvis talk
+        # the module is imported on fly, depending on the selected tts from settings
         tts_backend = importlib.import_module("tts." + self.tts)
         tts_backend.say(message)