TTSLauncher.py 815 B

123456789101112131415161718192021222324252627
  1. import logging
  2. from kalliope.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. .. seealso:: TTS
  16. .. warnings:: Class Method and Public
  17. """
  18. logger.debug("get TTS module \"%s\" with parameters %s" % (tts.name, tts.parameters))
  19. return Utils.get_dynamic_class_instantiation(package_name="tts",
  20. module_name=tts.name.capitalize(),
  21. parameters=tts.parameters)