chenhui-x/toolbox/audio-transcription
Claude Code and agent skill by chenhui-x/toolbox
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Transcribe voice/audio messages to text (WeChat SILK, wav).
Install
npx vskill@latest install chenhui-x/toolbox/audio-transcriptionSKILL.md
语音/音频转文字
触发条件
消息里出现 [voice message could not be transcribed automatically; the audio is available at: /root/.hermes/cache/audio/*.silk](网关自带转写没成功),或用户发来 wav/mp3/amr/ogg 要文字。先尝试网关自带转写;本技能是兜底路径——把音频文件转成文字。
标准流程
1. 判断格式
微信语音是 SILK v3,文件头为 \x02#!SILK_V3。其它平台可能是 wav/mp3/ogg/amr,先 head -c 10 看魔术字节。
2. SILK → PCM(用 silk-python,不是 pilk)
- 采样率试 24000(微信常用),不行再试 16000/12000/8000;解码成功时 PCM 字节数 ≈ 时长秒 × 采样率 × 2(16bit 单声道)。字节数只有几百 = 采样率不对。
pysilk.decode只吃文件对象,不是路径/bytes。
3. PCM → WAV(ffmpeg 在本机的固定路径)
4. STT(Groq,OpenAI 兼容)
返回 JSON 的 text 即转写结果。
坑(都实际踩过)
- 读 .env 里的 Groq key 必须只匹配"生效"那一行:
~/.hermes/.env里同时有注释占位# GROQ_API_KEY=和真正的export GROQ_API_KEY=...。朴素正则GROQ_API_KEY\s*=会先命中注释行 → 空 key →Invalid API Key。用re.search(r'export\s+GROQ_API_KEY\s*=\s*["\']?([^\s"\'\n]+)', env)(或先过滤掉#开头行)取,key 取出后先 strip 再验。 - 微信 .silk 常自带
\x02#!SILK_V3头;pysilk 能直接吃带头文件,通常无需手动剥离。 - 转写结果可能有同音错字(如「妞妞/牛牛」「兑换/对接」),按上下文还原意思后再答,别照抄错字。
交付
把转写文字先回显给用户确认(尤其带同音错字时),再执行语音里的指令,别默默按猜的做。
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingcustom-skills/media/audio-transcription/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/chenhui-x/toolbox/audio-transcription)