TTSLauncher.py 591 B

12345678910111213141516171819202122
  1. import logging
  2. from core import Utils
  3. logging.basicConfig()
  4. logger = logging.getLogger("kalliope")
  5. class TTSLauncher(object):
  6. def __init__(self):
  7. pass
  8. @classmethod
  9. def get_tts(cls, tts):
  10. """
  11. Return an instance of a TTS module from the name of this module
  12. :param tts: TTS model
  13. :type tts: Tts
  14. :return: TTS module instance
  15. """
  16. logger.debug("get TTS module \"%s\" with parameters %s" % (tts.name, tts.parameters))
  17. return Utils.get_dynamic_class_instantiation("tts", tts.name.capitalize(), tts.parameters)