No, actions
is not a dictionary. It’s a list of dictionaries. Each item in the list is a dictionary with three key-value pairs: “measure” (number), “resource” (string), and “reason” (string).
Here’s the structure:
actions
is a list[]
- Each element inside the list is a dictionary
{}
- Each dictionary contains information about a specific action with measure number, resource name, and explanation
The code is creating a structured list of sequential actions, likely for choreography that matches the song structure seen in the other files.
actions = [
{"measure": 0, "resource": "AI__间奏", "reason": "神秘的前奏卡点动作,为咒语部分奠定基调"},
{"measure": 1, "resource": "AI_间奏律动_01", "reason": "随着节奏进入神秘咒语世界"},
{"measure": 2, "resource": "AI_间奏律动_03", "reason": "双手展开,像在召唤神灵"},
{"measure": 3, "resource": "AI_间奏律动_04", "reason": "身体随着密集节拍摇晃"},
{"measure": 4, "resource": "舞蹈_", "reason": "规律交替的舞步,匹配节拍"}
]
转换为json
print(json.dumps(actions, ensure_ascii=False, indent=2))