Neurone.py 480 B

12345678910111213141516
  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 = "google"
  6. self.tts = "pico2wave"
  7. #self.tts = "voxygen"
  8. def say(self, message):
  9. # here we use the tts to make jarvis talk
  10. # the module is imported on fly, depending on the selected tts from settings
  11. tts_backend = importlib.import_module("tts." + self.tts)
  12. tts_backend.say(message)