ai_member_xiaoban/skills/component-audio-player/SKILL.md

40 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
name: component-audio-player
slug: component-audio-player
version: 1.0.0
description: Export user audio recordings from learning components and generate self-contained HTML playback pages with inline audio players.
metadata:
openclaw:
requires:
bins: ["python3", "curl", "jq"]
categories: ["feishu", "data-export", "audio"]
---
# 组件音频导出播放器
导出指定互动组件的用户录音,生成可播放 HTML 页面,每条记录包含参考文本、用户朗读文本、发音评分和 ▶ 播放按钮。
## When to Use
用户要求导出某组件的 Oops/Perfect 等录音记录,并希望直接听到用户声音时触发。
## Core Rules
1. **先跑导出脚本**`scripts/export_component_records.sh --c-type <type> --c-id <id>` 获取全量数据
2. **筛选目标记录**:按 `play_result` 筛选,按 `updated_at` 倒序取 Top N
3. **音频不下载**HTML 中 `<audio>` 直接引用 CDN URL`static.valavala.com`),省去下载步骤
4. **自包含 HTML**:单文件,浏览器打开即播,无需服务器
5. **同时发 Excel**:方便用户做进一步数据分析
6. **发送用 Bot**:通过 `lark-send-message-as-bot` 技能将 HTML + Excel 发给请求用户
## Quick Reference
| 内容 | 文件 |
|------|------|
| 详细步骤 | `workflow.md` |
## Data Storage
- 中间产物Excel、HTML写入 `output/` 目录
- 不创建持久化音频缓存