Neurone.py 625 B

12345678910111213141516171819
  1. import importlib
  2. class Neurone:
  3. def __init__(self, stt=None, tts=None):
  4. # TODO load the stt and tts from settings
  5. self.stt = "snowboy"
  6. self.tts = "pico2wave"
  7. def say(self, message):
  8. # here we use the tts to make jarvis talk
  9. # the module is imported on fly, depending on the selected tts from settings
  10. tts_backend = importlib.import_module("tts." + self.tts)
  11. tts_backend.say(message)
  12. def debug_kwargs(self, *args, **kwargs):
  13. if kwargs is not None:
  14. for key, value in kwargs.iteritems():
  15. print "%s == %s" % (key, value)