Settings.py 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. from core.Models import Singleton
  2. @Singleton
  3. class Settings(object):
  4. # TODO review the Singleton, should be Instantiate at the BrainLoader level
  5. """
  6. This Class is a Singleton Representing the settings.yml file with synapse
  7. .. note:: the is_loaded Boolean is True when the Settings has been properly loaded.
  8. """
  9. def __init__(self,
  10. default_tts_name=None,
  11. default_stt_name=None,
  12. default_trigger_name=None,
  13. ttss=None,
  14. stts=None,
  15. random_wake_up_answers=None,
  16. random_wake_up_sounds=None,
  17. triggers=None,
  18. rest_api=None,
  19. cache_path=None):
  20. self.default_tts_name = default_tts_name
  21. self.default_stt_name = default_stt_name
  22. self.default_trigger_name = default_trigger_name
  23. self.ttss = ttss
  24. self.stts = stts
  25. self.random_wake_up_answers = random_wake_up_answers
  26. self.random_wake_up_sounds = random_wake_up_sounds
  27. self.triggers = triggers
  28. self.rest_api = rest_api
  29. self.cache_path = cache_path
  30. self.is_loaded = False