Stt.py 581 B

123456789101112131415161718192021
  1. class Stt(object):
  2. """
  3. This Class is representing a Speech To Text (STT) element with name and parameters
  4. .. note:: must be defined in the settings.yml
  5. """
  6. def __init__(self, name=None, parameters=None):
  7. self.name = name
  8. self.parameters = parameters
  9. def __str__(self):
  10. return "Stt name: %s, parameters: %s" % (str(self.name), str(self.parameters))
  11. def __eq__(self, other):
  12. """
  13. This is used to compare 2 objects
  14. :param other:
  15. :return:
  16. """
  17. return self.__dict__ == other.__dict__