message.py 878 B

123456789101112131415161718192021222324252627282930313233
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. from typing import Any, List, Text, Dict
  4. class Message(object):
  5. def __init__(
  6. self,
  7. node: str = None,
  8. contents: List[Dict[Text, Text]] = None,
  9. interruptable: bool = None,
  10. wait_time: str = None,
  11. action: Dict[Text, Text] = None,
  12. talk_time: str = None
  13. ):
  14. """
  15. @param node: 节点id
  16. @param contents: 播放文本
  17. @param interruptable: 是否可打断
  18. @param wait_time: 用户静默时长
  19. @param action: 机器人指执行的动作
  20. @param talk_time: 用户通话时长
  21. """
  22. self.nodeId = node
  23. self.contents = contents
  24. self.interruptable = interruptable
  25. self.waitTime = wait_time
  26. self.action = action
  27. self.talkTimeOut = talk_time