{
  "schemaVersion": "1.0",
  "item": {
    "slug": "feishu-voice",
    "name": "Feishu Voice",
    "source": "tencent",
    "type": "skill",
    "category": "通讯协作",
    "sourceUrl": "https://clawhub.ai/franklu0819-lang/feishu-voice",
    "canonicalUrl": "https://clawhub.ai/franklu0819-lang/feishu-voice",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/feishu-voice",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=feishu-voice",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "README.md",
      "SKILL.md",
      "package.json",
      "scripts/send_voice.sh",
      "scripts/send_voice_auto.sh"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-23T16:43:11.935Z",
      "expiresAt": "2026-04-30T16:43:11.935Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
        "contentDisposition": "attachment; filename=\"4claw-imageboard-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/feishu-voice"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/feishu-voice",
    "agentPageUrl": "https://openagent3.xyz/skills/feishu-voice/agent",
    "manifestUrl": "https://openagent3.xyz/skills/feishu-voice/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/feishu-voice/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "飞书语音消息发送技能",
        "body": "将文本转换为语音消息发送到飞书，支持在飞书聊天窗口直接播放。"
      },
      {
        "title": "功能特性",
        "body": "✅ TTS 文字转语音（使用 zhipu-tts）\n✅ 自动转换为 opus 格式（飞书要求）\n✅ 读取音频时长\n✅ 上传到飞书服务器\n✅ 发送可播放的语音消息\n✅ 支持多种声音和语速"
      },
      {
        "title": "环境变量",
        "body": "# 飞书配置\nexport FEISHU_APP_ID=\"cli_xxx\"              # 飞书应用 ID\nexport FEISHU_APP_SECRET=\"your_secret\"      # 飞书应用密钥\nexport FEISHU_RECEIVER=\"ou_xxx\"             # 接收者 Open ID（可选，默认从上下文获取）\n\n# 智谱 AI 配置（用于 TTS）\nexport ZHIPU_API_KEY=\"your_zhipu_key\"       # 智谱 API 密钥"
      },
      {
        "title": "必需工具",
        "body": "ffmpeg - 音频格式转换\nffprobe - 读取音频信息\njq - JSON 处理"
      },
      {
        "title": "依赖技能",
        "body": "zhipu-tts - 文字转语音"
      },
      {
        "title": "基本用法",
        "body": "# 发送语音消息\nbash scripts/send_voice.sh \"你好，这是一条语音消息\""
      },
      {
        "title": "高级选项",
        "body": "# 指定声音和语速\nbash scripts/send_voice.sh \"你好\" tongtong 1.2\n\n# 可用声音：\n# - tongtong (彤彤) - 默认女声，平衡音色\n# - chuichui (锤锤) - 男声，深沉音色\n# - xiaochen (小陈) - 年轻声音\n\n# 语速范围：0.5 - 2.0（默认 1.0）"
      },
      {
        "title": "send_voice.sh",
        "body": "主脚本，完整的语音消息发送流程。\n\n用法：\n\nbash scripts/send_voice.sh <文本> [声音] [语速]\n\n参数：\n\n文本 (必需): 要转换为语音的文字\n声音 (可选): tongtong, chuichui, xiaochen（默认：tongtong）\n语速 (可选): 0.5-2.0（默认：1.0）\n\n环境变量：\n\nFEISHU_APP_ID: 飞书应用 ID\nFEISHU_APP_SECRET: 飞书应用密钥\nFEISHU_RECEIVER: 接收者 Open ID（可选）"
      },
      {
        "title": "流程说明",
        "body": "TTS 生成: 使用 zhipu-tts 生成 WAV 格式音频\n格式转换: 使用 ffmpeg 转换为 opus 格式\n读取时长: 使用 ffprobe 获取音频时长（秒）\n上传文件: 上传到飞书，指定 file_type=opus 和 duration\n发送消息: 发送 msg_type=audio 消息"
      },
      {
        "title": "音频格式要求",
        "body": "飞书语音消息要求：\n\n格式: opus (OGG 容器)\n编码: libopus\n比特率: 24k\n采样率: 24000 Hz\n声道: 单声道"
      },
      {
        "title": "Duration 参数",
        "body": "关键: 必须在上传时提供 duration 参数（整数秒），否则时长显示为 0。\n\n# 正确的上传方式\ncurl -X POST \"https://open.feishu.cn/open-apis/im/v1/files\" \\\n  -F \"file=@voice.opus\" \\\n  -F \"file_type=opus\" \\\n  -F \"duration=6\"          # ← 关键参数"
      },
      {
        "title": "API 端点",
        "body": "端点用途/auth/v3/tenant_access_token/internal获取访问令牌/im/v1/files上传文件/im/v1/messages发送消息"
      },
      {
        "title": "语音没有时长",
        "body": "问题: 发送的语音消息时长显示为 0\n\n解决: 确保在上传时传递了 duration 参数（整数秒）\n\n# 获取时长（四舍五入）\nDURATION=$(ffprobe -v error -show_entries format=duration \\\n  -of default=noprint_wrappers=1:nokey=1 voice.opus | awk '{printf \"%.0f\", $1}')\n\n# 上传时带上 duration\ncurl ... -F \"duration=$DURATION\""
      },
      {
        "title": "无法播放",
        "body": "问题: 语音消息无法播放\n\n可能原因:\n\n格式不是 opus\nfile_type 参数错误\n文件损坏\n\n解决:\n\n# 检查格式\nffprobe voice.opus\n\n# 重新转换\nffmpeg -i input.wav -c:a libopus -b:a 24k voice.opus"
      },
      {
        "title": "API 权限错误",
        "body": "问题: 上传时返回权限错误\n\n解决: 确保飞书应用有以下权限：\n\nim:message\nim:message:send_as_bot"
      },
      {
        "title": "完整示例",
        "body": "# 设置环境变量\nexport FEISHU_APP_ID=\"your_app_id_here\"\nexport FEISHU_APP_SECRET=\"your_app_secret_here\"\nexport ZHIPU_API_KEY=\"your_zhipu_key_here\"\n\n# 发送语音\nbash /root/.openclaw/workspace/skills/feishu-voice/scripts/send_voice.sh \\\n  \"你好，这是一条测试语音消息。\""
      },
      {
        "title": "注意事项",
        "body": "时长限制: 智谱 TTS 单次最多 1024 字符\n整数时长: duration 必须是整数（四舍五入）\nopus 格式: 飞书只接受 opus 格式的音频消息\n文件清理: 临时文件会自动清理"
      },
      {
        "title": "相关技能",
        "body": "zhipu-tts: 文字转语音\nzhipu-asr: 语音转文字"
      }
    ],
    "body": "飞书语音消息发送技能\n\n将文本转换为语音消息发送到飞书，支持在飞书聊天窗口直接播放。\n\n功能特性\n✅ TTS 文字转语音（使用 zhipu-tts）\n✅ 自动转换为 opus 格式（飞书要求）\n✅ 读取音频时长\n✅ 上传到飞书服务器\n✅ 发送可播放的语音消息\n✅ 支持多种声音和语速\n前置要求\n环境变量\n# 飞书配置\nexport FEISHU_APP_ID=\"cli_xxx\"              # 飞书应用 ID\nexport FEISHU_APP_SECRET=\"your_secret\"      # 飞书应用密钥\nexport FEISHU_RECEIVER=\"ou_xxx\"             # 接收者 Open ID（可选，默认从上下文获取）\n\n# 智谱 AI 配置（用于 TTS）\nexport ZHIPU_API_KEY=\"your_zhipu_key\"       # 智谱 API 密钥\n\n必需工具\nffmpeg - 音频格式转换\nffprobe - 读取音频信息\njq - JSON 处理\n依赖技能\nzhipu-tts - 文字转语音\n使用方法\n基本用法\n# 发送语音消息\nbash scripts/send_voice.sh \"你好，这是一条语音消息\"\n\n高级选项\n# 指定声音和语速\nbash scripts/send_voice.sh \"你好\" tongtong 1.2\n\n# 可用声音：\n# - tongtong (彤彤) - 默认女声，平衡音色\n# - chuichui (锤锤) - 男声，深沉音色\n# - xiaochen (小陈) - 年轻声音\n\n# 语速范围：0.5 - 2.0（默认 1.0）\n\n脚本说明\nsend_voice.sh\n\n主脚本，完整的语音消息发送流程。\n\n用法：\n\nbash scripts/send_voice.sh <文本> [声音] [语速]\n\n\n参数：\n\n文本 (必需): 要转换为语音的文字\n声音 (可选): tongtong, chuichui, xiaochen（默认：tongtong）\n语速 (可选): 0.5-2.0（默认：1.0）\n\n环境变量：\n\nFEISHU_APP_ID: 飞书应用 ID\nFEISHU_APP_SECRET: 飞书应用密钥\nFEISHU_RECEIVER: 接收者 Open ID（可选）\n流程说明\nTTS 生成: 使用 zhipu-tts 生成 WAV 格式音频\n格式转换: 使用 ffmpeg 转换为 opus 格式\n读取时长: 使用 ffprobe 获取音频时长（秒）\n上传文件: 上传到飞书，指定 file_type=opus 和 duration\n发送消息: 发送 msg_type=audio 消息\n技术细节\n音频格式要求\n\n飞书语音消息要求：\n\n格式: opus (OGG 容器)\n编码: libopus\n比特率: 24k\n采样率: 24000 Hz\n声道: 单声道\nDuration 参数\n\n关键: 必须在上传时提供 duration 参数（整数秒），否则时长显示为 0。\n\n# 正确的上传方式\ncurl -X POST \"https://open.feishu.cn/open-apis/im/v1/files\" \\\n  -F \"file=@voice.opus\" \\\n  -F \"file_type=opus\" \\\n  -F \"duration=6\"          # ← 关键参数\n\nAPI 端点\n端点\t用途\n/auth/v3/tenant_access_token/internal\t获取访问令牌\n/im/v1/files\t上传文件\n/im/v1/messages\t发送消息\n故障排查\n语音没有时长\n\n问题: 发送的语音消息时长显示为 0\n\n解决: 确保在上传时传递了 duration 参数（整数秒）\n\n# 获取时长（四舍五入）\nDURATION=$(ffprobe -v error -show_entries format=duration \\\n  -of default=noprint_wrappers=1:nokey=1 voice.opus | awk '{printf \"%.0f\", $1}')\n\n# 上传时带上 duration\ncurl ... -F \"duration=$DURATION\"\n\n无法播放\n\n问题: 语音消息无法播放\n\n可能原因:\n\n格式不是 opus\nfile_type 参数错误\n文件损坏\n\n解决:\n\n# 检查格式\nffprobe voice.opus\n\n# 重新转换\nffmpeg -i input.wav -c:a libopus -b:a 24k voice.opus\n\nAPI 权限错误\n\n问题: 上传时返回权限错误\n\n解决: 确保飞书应用有以下权限：\n\nim:message\nim:message:send_as_bot\n完整示例\n# 设置环境变量\nexport FEISHU_APP_ID=\"your_app_id_here\"\nexport FEISHU_APP_SECRET=\"your_app_secret_here\"\nexport ZHIPU_API_KEY=\"your_zhipu_key_here\"\n\n# 发送语音\nbash /root/.openclaw/workspace/skills/feishu-voice/scripts/send_voice.sh \\\n  \"你好，这是一条测试语音消息。\"\n\n注意事项\n时长限制: 智谱 TTS 单次最多 1024 字符\n整数时长: duration 必须是整数（四舍五入）\nopus 格式: 飞书只接受 opus 格式的音频消息\n文件清理: 临时文件会自动清理\n相关技能\nzhipu-tts: 文字转语音\nzhipu-asr: 语音转文字"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/franklu0819-lang/feishu-voice",
    "publisherUrl": "https://clawhub.ai/franklu0819-lang/feishu-voice",
    "owner": "franklu0819-lang",
    "version": "1.0.1",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/feishu-voice",
    "downloadUrl": "https://openagent3.xyz/downloads/feishu-voice",
    "agentUrl": "https://openagent3.xyz/skills/feishu-voice/agent",
    "manifestUrl": "https://openagent3.xyz/skills/feishu-voice/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/feishu-voice/agent.md"
  }
}