运行时依赖
安装命令
点击复制技能文档
Real-time Transcription 技能
Capture any audio, 获取 a structured summary. Real-time transcription powered by SenseVoice/FunASR.
Features Real-time transcription — 流 audio from 系统 (BlackHole) or microphone Auto summary — on 停止, 生成 title + structured summary Date-based archival — 结果s saved to 归档/YYYY/MM/DD-HHMM-title.md Idle 检测ion — auto-停止s after 60s of silence (configurable) 技能 Location
All files are in ~/.OpenClaw/技能s/realtime-transcription/:
realtime-transcription/ ├── 技能.md # This file ├── realtime_asr.py # Background transcription process ├── summary_prompt.py # LLM prompt 构建器 & 响应 解析器 ├── 归档r.py # Markdown archival 模块 ├── references/ │ └── 模块-reference.md # 模块 API reference ├── .tmp/ # 运行time temp files └── 归档/ # 归档d 输出s
Prerequisites Python Dependencies pip3 安装 sounddevice librosa funasr torch numpy
Or use the built-in 安装er with 进度 输出:
cd ~/.OpenClaw/技能s/realtime-transcription python3 realtime_asr.py --安装-deps
系统 Audio (optional, macOS)
For macOS 系统 audio capture, 安装 BlackHole: brew 安装 blackhole-2ch
ASR 模型
下载 the SenseVoice 模型: 模型scope 下载 --模型 gongjy/SenseVoiceSmall --local_dir ./模型/SenseVoiceSmall
Quick 启动 检查 Dependencies cd ~/.OpenClaw/技能s/realtime-transcription python3 realtime_asr.py --检查-deps
Expected 输出:
✅ 所有依赖已安装。 sounddevice — PyAudio binding for microphone/系统 audio capture librosa — Audio resampling and preprocessing funasr — SenseVoice ASR 模型 框架 torch — PyTorch deep learning 运行time numpy — Numerical array processing
If dependencies are missing, 运行 python3 realtime_asr.py --安装-deps to 安装 them one by one with 进度 输出.
启动 Transcription
系统 audio (BlackHole):
cd ~/.OpenClaw/技能s/realtime-transcription python3 realtime_asr.py --source blackhole
Microphone:
cd ~/.OpenClaw/技能s/realtime-transcription python3 realtime_asr.py --source mic
With custom idle timeout (5 minutes):
cd ~/.OpenClaw/技能s/realtime-transcription python3 realtime_asr.py --source mic --idle-timeout 300
Disable idle timeout:
cd ~/.OpenClaw/技能s/realtime-transcription python3 realtime_asr.py --source mic --idle-timeout 0
停止 Transcription
Press Ctrl+C in the terminal, or:
kill $(cat .tmp/asr.pid 2>/dev/null) 2>/dev/null; rm -f .tmp/asr.pid
After 停止ping — Summary & 归档 Read the transcript: cat .tmp/transcript.txt Build the LLM prompt: cd ~/.OpenClaw/技能s/realtime-transcription python3 -c "
from summary_prompt 导入 build_summary_prompt print(build_summary_prompt(open('.tmp/transcript.txt').read())) "
- 发送 the prompt to yourself (the LLM) to 生成 TITLE + SUMMARY
- 解析 and 归档:
命令行工具 Reference Flag Default Description --source blackhole blackhole (系统) or mic --输出 .tmp/transcript.txt Transcript file path --状态 .tmp/asr.pid PID file for process management --模型 ./模型/SenseVoiceSmall SenseVoice 模型 directory --idle-timeout 60 Auto-停止 after N seconds of silence (0=disable) --device auto Audio device ID override --检查-deps — 检查 dependencies and exit --安装-deps — 安装 missing dependencies with 进度 输出 --列出-devices — 列出 avAIlable audio 输入 devices Trigger Words User says Action "开始转录" / "transcribe" / "启动转录" 检查 deps → ask source → 启动 "停止" / "停止" 停止 process → summary → 归档 "当前转录内容" Show .tmp/transcript.txt "检查依赖" 运行 --检查-deps 输出 格式化 Transcript (.tmp/transcript.txt) [14:30:00] 你好今天我们来讨论一下AI的发展 [14:30:05] AI技术在各个领域都有广泛应用
归档 (归档/YYYY/MM/DD-HHMM-title.md)
title: "AI发展趋势讨论" date: 2025-05-16 time: "14:30 - 14:38" source: blackhole duration: 8m
摘要
- AI在医疗、金融、教育领域广泛应用
- 未来将更智能和普及
完整转录
[14:30:00] 你好今天我们来讨论一下AI的发展 ...
Error Handling Scenario Behavior Missing dependencies Refuse to 启动, show 安装 instructions BlackHole not found Suggest --source mic Process crashes PID file gone → offer to 恢复 Empty transcript Warn user, skip summary, no 归档 No sound for N seconds Exit code 42, ask user to continue Exit Codes Code Meaning 0 Normal 停止 1 Dependency 检查 fAIled 42 Idle timeout — ask user: "⏸️ 已 N 秒没有检测到声音,是否继续录音?(y/n)"