Communitygithub.com

ASoudy/AGS

将音频录制转换为专业的 Markdown 文档,并利用 LLM 生成智能摘要。

AGS 是什么?

该技能旨在自动化音频到文本的转录过程,并生成结构化的 Markdown 文档。它能够提取丰富的技术元数据(如发言人、时间戳、语言、文件大小、时长),并生成结构化的会议纪要和执行摘要。该技能自动检测 Faster-Whisper 或 Whisper 等转录引擎,无需用户进行任何手动配置,也无需硬编码路径或 API 密钥,可以跨项目通用。它特别适合处理会议、访谈、讲座和内容分析等场景,能将原始音频录制快速转化为可操作的文档。平台支持方面,该技能适用于 Claude Code、Cursor、Codex 等 AI 代理,可以与 LLM 集成以提供更智能的摘要和会议纪要生成。工作流程包括自动检测工具、验证音频文件、生成 Markdown 输出、并显示结果摘要,整个过程高度自动化。

兼容平台✓Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/ASoudy/AGS/tree/HEAD/claude_skills_libraries/landing-page-mastery/skills/audio-transcriber

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

目的

本技能可将音频自动转写为文本,并输出专业的 Markdown 文档。它能提取丰富的技术元数据(发言人、时间戳、语言、文件大小、时长),并生成结构化的会议纪要和执行摘要。该技能使用 Faster-Whisper 或 Whisper,零配置即可运行,可以跨项目通用,无需硬编码路径或 API 密钥。

受 Plaud 等工具的启发,本技能可将原始音频录制转化为可操作的文档,非常适合会议、访谈、讲座和内容分析等场景。

何时使用

在以下情况下调用本技能:

  • 用户需要将音频/视频文件转录为文本
  • 用户希望从录音中自动生成会议纪要
  • 用户需要对对话进行说话人识别
  • 用户需要字幕/隐藏式字幕(SRT、VTT 格式)
  • 用户需要对长音频内容生成执行摘要
  • 用户提出类似“转录这段音频”、“将音频转换为文本”、“从录音生成会议记录”等要求
  • 用户提供常见格式的音频文件(MP3、WAV、M4A、OGG、FLAC、WEBM)

工作流程

第 0 步:发现(自动检测转录工具)

目标: 无需用户配置即可识别可用的转录引擎。

操作:

运行检测命令以查找已安装的工具:

# 检查 Faster-Whisper(首选 - 速度快 4-5 倍)
if python3 -c "import faster_whisper" 2>/dev/null; then
    TRANSCRIBER="faster-whisper"
    echo "✅ 检测到 Faster-Whisper(优化)"
# 回退到原始 Whisper
elif python3 -c "import whisper" 2>/dev/null; then
    TRANSCRIBER="whisper"
    echo "✅ 检测到 OpenAI Whisper"
else
    TRANSCRIBER="none"
    echo "⚠️  未找到转录工具"
fi

# 检查 ffmpeg(音频格式转换)
if command -v ffmpeg &>/dev/null; then
    echo "✅ ffmpeg 可用(格式转换已启用)"
else
    echo "ℹ️  未找到 ffmpeg(格式支持有限)"
fi

如果未找到转录工具:

提供使用提供的脚本进行自动安装的选项:

echo "⚠️  未找到转录工具"
echo ""
echo "🔧 自动安装依赖项?(推荐)"
read -p "运行安装脚本?[Y/n]: " AUTO_INSTALL

if [[ ! "$AUTO_INSTALL" =~ ^[Nn] ]]; then
    # 获取技能目录(适用于 repo 和符号链接安装)
    SKILL_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
    
    # 运行安装脚本
    if [[ -f "$SKILL_DIR/scripts/install-requirements.sh" ]]; then
        bash "$SKILL_DIR/scripts/install-requirements.sh"
    else
        echo "❌ 未找到安装脚本"
        echo ""
        echo "📦 手动安装:"
        echo "  pip install faster-whisper  # 推荐"
        echo "  pip install openai-whisper  # 备选"
        echo "  brew install ffmpeg         # 可选(macOS)"
        exit 1
    fi
    
    # 验证安装是否成功
    if python3 -c "import faster_whisper" 2>/dev/null || python3 -c "import whisper" 2>/dev/null; then
        echo "✅ 安装成功!继续转写..."
    else
        echo "❌ 安装失败。请手动安装。"
        exit 1
    fi
else
    echo ""
    echo "📦 需要手动安装:"
    echo ""
    echo "推荐(最快):"
    echo "  pip install faster-whisper"
    echo ""
    echo "备选(原始):"
    echo "  pip install openai-whisper"
    echo ""
    echo "可选(格式转换):"
    echo "  brew install ffmpeg  # macOS"
    echo "  apt install ffmpeg   # Linux"
    echo ""
    exit 1
fi

这确保了用户可以通过一次确认来安装依赖项,或者如果愿意,也可以选择手动安装。

如果找到转录工具:

继续执行第 0b 步(CLI 检测)。

第 1 步:验证音频文件

目标: 验证文件是否存在,检查格式,并提取元数据。

操作:

  1. 从用户处接收文件路径或 URL:
  • 本地文件:meeting.mp3
  • URL:https://example.com/audio.mp3(下载到临时目录)
  1. 验证文件是否存在:
if [[ ! -f "$AUDIO_FILE" ]]; then
    echo "❌ 找不到文件:$AUDIO_FILE"
    exit 1
fi
  1. 使用 ffprobe 或文件工具提取元数据:
# 获取文件大小
FILE_SIZE=$(du -h "$AUDIO_FILE" | cut -f1)

# 使用 ffprobe 获取时长和格式
DURATION=$(ffprobe -v error -show_entries format=duration \
    -of default=noprint_wrappers=1:nokey=1 "$AUDIO_FILE" 2>/dev/null)
FORMAT=$(ffprobe -v error -select_streams a:0 -show_entries \
    stream=codec_name -of default=noprint_wrappers=1:nokey=1 "$AUDIO_FILE" 2>/dev/null)

# 将时长转换为 HH:MM:SS 格式
DURATION_HMS=$(date -u -r "$DURATION" +%H:%M:%S 2>/dev/null || echo "Unknown")
  1. 检查文件大小(如果文件较大,则针对云 API 发出警告):
SIZE_MB=$(du -m "$AUDIO_FILE" | cut -f1)
if [[ $SIZE_MB -gt 25 ]]; then
    echo "⚠️  大文件($FILE_SIZE)- 处理可能需要几分钟时间"
fi
  1. 验证格式(支持:MP3、WAV、M4A、OGG、FLAC、WEBM):
EXTENSION="${AUDIO_FILE##*.}"
SUPPORTED_FORMATS=("mp3" "wav" "m4a" "ogg" "flac" "webm" "mp4")

if [[ ! " ${SUPPORTED_FORMATS[@]} " =~ " ${EXTENSION,,} " ]]; then
    echo "⚠️  不支持的格式:$EXTENSION"
    if command -v ffmpeg &>/dev/null; then
        echo "🔄 正在转换为 WAV..."
        ffmpeg -i "$AUDIO_FILE" -ar 16000 "${AUDIO_FILE%.*}.wav" -y
        AUDIO_FILE="${AUDIO_FILE%.*}.wav"
    else
        echo "❌ 请安装 ffmpeg 以转换格式:brew install ffmpeg"
        exit 1
    fi
fi

第 3 步:生成 Markdown 输出

目标: 创建包含元数据、转写文本、会议纪要和摘要的结构化 Markdown 文档。

输出模板:

# 音频转录报告

## 📊 元数据

| 字段 | 值 |
|-------|-------|
| **文件名** | {filename} |
| **文件大小** | {file_size} |
| **时长** | {duration_hms} |
| **语言** | {language}({language_code})|
| **处理日期** | {process_date} |
| **识别到的说话人** | {num_speakers} |
| **转录引擎** | {engine}(模型:{model})|


## 📋 会议纪要

### 参与者
- {speaker_1}
- {speaker_2}
- ...

### 讨论主题
1. **{topic_1}**({timestamp})
   - {key_point_1}
   - {key_point_2}

2. **{topic_2}**({timestamp})
   - {key_point_1}

### 做出的决定
- ✅ {decision_1}
- ✅ {decision_2}

### 待办事项
- [ ] **{action_1}** - 指派给:{speaker} - 截止日期:{date_if_mentioned}
- [ ] **{action_2}** - 指派给:{speaker}


*由音频转录技能 v1.0.0 生成*  
*转录引擎:{engine} | 处理时间:{elapsed_time}秒*

实现:

使用 Python 或 bash,并结合 AI 模型(Claude/GPT)进行智能摘要生成:

def generate_meeting_minutes(segments):
    """从转写文本中提取主题、决策和待办事项。"""
    
    # 按主题分组(通过时间戳进行简单聚类)
    topics = cluster_by_topic(segments)
    
    # 识别待办事项(关键词:“should”、“will”、“need to”、“action”)
    action_items = extract_action_items(segments)
    
    # 识别决策(关键词:“decided”、“agreed”、“approved”)
    decisions = extract_decisions(segments)
    
    return {
        "topics": topics,
        "decisions": decisions,
        "action_items": action_items
    }

def generate_summary(segments, max_paragraphs=5):
    """使用 AI(通过 API 的 Claude/GPT 或本地模型)创建执行摘要。"""
    
    full_text = " ".join([s["text"] for s in segments])
    
    # 使用密度链方法(来自 prompt-engineer 框架)
    summary_prompt = f"""
    用 {max_paragraphs} 个简洁段落总结以下转写内容。
    重点关注关键主题、决策和待办事项。
    
    转写内容:
    {full_text}
    """
    
    # 调用 AI 模型(占位符 - 用户可以集成 Claude API 或使用本地模型)
    summary = call_ai_model(summary_prompt)
    
    return summary

输出文件命名:

# v1.1.0:使用时间戳以避免覆盖
TIMESTAMP=$(date +%Y%m%d-%H%M%S)
TRANSCRIPT_FILE="transcript-${TIMESTAMP}.md"
ATA_FILE="ata-${TIMESTAMP}.md"

echo "$TRANSCRIPT_CONTENT" > "$TRANSCRIPT_FILE"
echo "✅ 转写文本已保存:$TRANSCRIPT_FILE"

if [[ -n "$ATA_CONTENT" ]]; then
    echo "$ATA_CONTENT" > "$ATA_FILE"
    echo "✅ 会议纪要已保存:$ATA_FILE"
fi

场景 A:用户提供了自定义提示

工作流程:

  1. 显示用户的提示:

    📝 用户提供的提示:
    ┌──────────────────────────────────┐
    │ [用户提示预览]                    │
    └──────────────────────────────────┘
    
  2. 使用 prompt-engineer 自动改进(如果可用):

    🔧 正在使用 prompt-engineer 改进提示...
    [调用:gh copilot -p "改进此提示:{user_prompt}"]
    
  3. 显示两个版本:

    ✨ 改进后的版本:
    ┌──────────────────────────────────┐
    │ 角色:您是一名文档编写者...        │
    │ 指令:转换...                     │
    │ 步骤:1) ... 2) ...              │
    │ 最终目标:...                     │
    └──────────────────────────────────┘
    
    📝 原始版本:
    ┌──────────────────────────────────┐
    │ [用户的原始提示]                  │
    └──────────────────────────────────┘
    
  4. 询问使用哪个版本:

    💡 是否使用改进后的版本?[s/n](默认:s):
    
  5. 使用选定的提示进行处理:

    • 如果选择“s”:使用改进后的版本
    • 如果选择“n”:使用原始版本

LLM 处理(两种场景)

提示最终确定后:

from rich.progress import Progress, SpinnerColumn, TextColumn

def process_with_llm(transcript, prompt, cli_tool='claude'):
    full_prompt = f"{prompt}\n\n---\n\n转写内容:\n\n{transcript}"
    
    with Progress(
        SpinnerColumn(),
        TextColumn("[progress.description]{task.description}"),
        transient=True
    ) as progress:
        progress.add_task(
            description=f"🤖 正在使用 {cli_tool} 处理...",
            total=None
        )
        
        if cli_tool == 'claude':
            result = subprocess.run(
                ['claude', '-'],
                input=full_prompt,
                capture_output=True,
                text=True,
                timeout=300  # 5 分钟
            )
        elif cli_tool == 'gh-copilot':
            result = subprocess.run(
                ['gh', 'copilot', 'suggest', '-t', 'shell', full_prompt],
                capture_output=True,
                text=True,
                timeout=300
            )
    
    if result.returncode == 0:
        return result.stdout.strip()
    else:
        return None

进度输出:

🤖 正在使用 claude 处理... ⠋
[完成后:]
✅ 会议纪要生成成功!

最终输出

成功(两个文件):

💾 正在保存文件...

✅ 文件已创建:
  - transcript-20260203-023045.md  (原始转写文本)
  - ata-20260203-023045.md         (经 LLM 处理)

🧹 已删除临时文件:metadata.json、transcription.json

✅ 完成!总耗时:3 分 45 秒

仅转写文本(用户拒绝了 LLM 处理):

💾 正在保存文件...

✅ 文件已创建:
  - transcript-20260203-023045.md

ℹ️  未生成会议纪要(用户拒绝了 LLM 处理)

🧹 已删除临时文件:metadata.json、transcription.json

✅ 完成!

第 5 步:显示结果摘要

目标: 显示完成状态和后续步骤。

输出:

echo ""
echo "✅ 转写完成!"
echo ""
echo "📊 结果:"
echo "  文件:$OUTPUT_FILE"
echo "  语言:$LANGUAGE"
echo "  时长:$DURATION_HMS"
echo "  说话人:$NUM_SPEAKERS"
echo "  字数:$WORD_COUNT"
echo "  处理时间:${ELAPSED_TIME}秒"
echo ""
echo "📝 已生成:"
echo "  - $OUTPUT_FILE(Markdown 报告)"
[如果生成了其他格式:]
echo "  - ${OUTPUT_FILE%.*}.srt(字幕)"
echo "  - ${OUTPUT_FILE%.*}.json(结构化数据)"
echo ""
echo "🎯 后续步骤:"
echo "  1. 审阅会议纪要和待办事项"
echo "  2. 与参与者分享报告"
echo "  3. 跟踪待办事项直至完成"

使用示例

示例 1:基础转写

用户输入:

copilot> 将音频转写为 markdown:meeting-2026-02-02.mp3

技能输出:

✅ 检测到 Faster-Whisper(优化)
✅ ffmpeg 可用(格式转换已启用)

📂 文件:meeting-2026-02-02.mp3
📊 大小:12.3 MB
⏱️  时长:00:45:32

🎙️  正在处理...
[████████████████████] 100%

✅ 检测到语言:Portuguese (pt-BR)
👥 识别到的说话人:4 个
📝 正在生成 Markdown 输出...

✅ 转写完成!

📊 结果:
  文件:meeting-2026-02-02.md
  语言:pt-BR
  时长:00:45:32
  说话人:4 个
  字数:6,842
  处理时间:127 秒

📝 已生成:
  - meeting-2026-02-02.md(Markdown 报告)

🎯 后续步骤:
  1. 审阅会议纪要和待办事项
  2. 与参与者分享报告
  3. 跟踪待办事项直至完成

示例 3:批量处理

用户输入:

copilot> 转写这些音频:recordings/*.mp3

技能输出:

📦 批量模式:发现 5 个文件
  1. team-standup.mp3
  2. client-call.mp3
  3. brainstorm-session.mp3
  4. product-demo.mp3
  5. retrospective.mp3

🎙️  正在批量处理...

[1/5] team-standup.mp3 ✅ (2 分 34 秒)
[2/5] client-call.mp3 ✅ (15 分 12 秒)
[3/5] brainstorm-session.mp3 ✅ (8 分 47 秒)
[4/5] product-demo.mp3 ✅ (22 分 03 秒)
[5/5] retrospective.mp3 ✅ (11 分 28 秒)

✅ 批量完成!
📝 生成了 5 份 Markdown 报告
⏱️  总处理时间:6 分 15 秒

示例 5:大文件警告

用户输入:

copilot> 将音频转写为 markdown:conference-keynote.mp3

技能输出:

✅ 检测到 Faster-Whisper(优化)

📂 文件:conference-keynote.mp3
📊 大小:87.2 MB
⏱️  时长:02:15:47
⚠️  大文件(87.2 MB)- 处理可能需要几分钟

是否继续?[Y/n]:

用户: Y

🎙️  正在处理...(可能需要 10-15 分钟)
[████░░░░░░░░░░░░░░░░] 20% - 预计剩余时间:12 分

T

…

[因翻译截断]

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ASoudy/AGS

Advanced JavaScript animation library skill for creating complex, high-performance web animations.

ASoudy/AGS

Astropy is the core Python package for astronomy, providing essential functionality for astronomical research and data analysis.

ASoudy/AGS

Build content-focused websites with Astro — zero JS by default, islands architecture, multi-framework components, and Markdown/MDX support.

ASoudy/AGS

One sentence - what this skill does and when to invoke it

ASoudy/AGS

Audit and fix animation performance issues including layout thrashing, compositor properties, scroll-linked motion, and blur effects. Use when animations stutter, transitions jank, or reviewing CSS/JS animation performance.

ASoudy/AGS

Internationalization and localization patterns. Detecting hardcoded strings, managing translations, locale files, RTL support.

ASoudy/AGS

Pull a YouTube video transcript into a queryable markdown vault with yt-dlp subtitle discovery, VTT cleanup, metadata frontmatter, and capture-seed stubs.

ASoudy/AGS

Expert in building portfolios that actually land jobs and clients - not just showing work, but creating memorable experiences. Covers developer portfolios, designer portfolios, creative portfolios, and portfolios that convert visitors into opportunities.

ASoudy/AGS

Generates high-converting Next.js/React landing pages with Tailwind CSS. Uses PAS, AIDA, and BAB frameworks for optimized copy/components (Heroes, Features, Pricing). Focuses on Core Web Vitals/SEO.

ASoudy/AGS

AI-powered animation tool for creating motion in logos, UI, icons, and social media assets.

ASoudy/AGS

CRITICAL: Use for Makepad animation system. Triggers on: makepad animation, makepad animator, makepad hover, makepad state, makepad transition, "from: { all: Forward", makepad pressed, makepad 动画, makepad 状态, makepad 过渡, makepad 悬停效果

ASoudy/AGS

Comprehensive patterns for Next.js 14+ App Router architecture, Server Components, and modern full-stack React development.

ASoudy/AGS

Next.js App Router principles. Server Components, data fetching, routing patterns.

ASoudy/AGS

Expert integration of Supabase Auth with Next.js App Router

ASoudy/AGS

React and Next.js 14+ application development with App Router, Server Components, TypeScript, Tailwind CSS, and modern frontend patterns.

ASoudy/AGS

Best practices for Remotion - Video creation in React

ASoudy/AGS

Generate walkthrough videos from Stitch projects using Remotion with smooth transitions, zooming, and text overlays

ASoudy/AGS

Seek and analyze video content using Memories.ai Large Visual Memory Model for persistent video intelligence

ASoudy/AGS

Writes complete, structured landing pages optimized for SEO ranking, AEO citation, and visitor conversion. Activate when the user wants to write or generate a landing page for a product, service, or offer.

ASoudy/AGS

Skill for discovering and researching autonomous AI agents, tools, and ecosystems using the AgentFolio directory.

相关技能