交互式头像模态流程 (avatars.co)#
用户事件流程
# Wait for a UI selection
flow user selected choice $choice_id -> $choice
# Wait for a UI selection to have happened (considering also choices that happened right before)
flow user has selected choice $choice_id
# Wait for user entering keystrokes in UI text field
flow user typing $text -> $inputs
# Wait for user to make a gesture
flow user gestured $gesture -> $final_gesture
# Wait for user to be detected as present (e.g. camera ROI)
flow user became present -> $user_id
# Wait for when the user talked while bot is speaking
flow user interrupted bot talking $sentence_length=15
机器人动作流程
# Trigger a specific bot gesture
flow bot gesture $gesture
# Trigger a specific bot gesture delayed
flow bot gesture with delay $gesture $delay
# Trigger a specific bot posture
flow bot posture $posture
# Show a 2D UI with some options to select from
flow scene show choice $prompt $options
# Show a 2D UI with detailed information
flow scene show textual information $title $text $header_image
# Show a 2D UI with a short information
flow scene show short information $info
# Show a 2D UI with some input fields to be filled in
flow scene show form $prompt $inputs
机器人事件流程
# Wait for the bot to start with the given gesture
flow bot started gesture $gesture
# Wait for the bot to start with any gesture
flow bot started a gesture -> $gesture
# Wait for the bot to start with the given posture
flow bot started posture $posture
# Wait for the bot to start with any posture
flow bot started a posture -> $posture
# Wait for the bot to start with any action
flow bot started an action -> $action
状态跟踪流程
这些流程跟踪全局变量中的机器人和用户状态。
# Track most recent visual choice selection state in global variable $choice_selection_state
flow tracking visual choice selection state
辅助和实用流程
这些是一些有用的辅助和实用流程
# Stops all the current bot actions
flow finish all bot actions
# Stops all the current scene actions
flow finish all scene actions
# Handling the bot talking interruption reaction
flow handling bot talking interruption $mode="inform"
姿态管理流程
# Activates all the posture management
flow managing bot postures
# Start and stop listening posture
flow managing listening posture
# Start and stop talking posture
flow managing talking posture
# Start and stop thinking posture
flow managing thinking posture
# Start and stop idle posture
flow managing idle posture