Token导航 LogoToken导航

Agent Skill · 研究检索

add-voice-transcription(添加语音转录)

用于辅助音频、音乐、语音转写、语音合成或声音素材处理。它适合让 Agent 生成配乐说明、整理音频流程、调用语音工具或处理播客和视频配音素材。使用时需要确认输入音频来源、输出格式、时长和模型限制;涉及人声克隆、版权音乐或公开发布时,应先核对授权和合规边界。

add-voice-transcription 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描有未通过项,按安装量在研究检索类的 73,675 个 Skill 里排第 64,379。

总安装 303周安装 13GitHub Stars 公开资料未说明下载 106核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:add-voice-transcription(添加语音转录)
来源仓库:https://github.com/creatuluw/nanoclaw
仓库路径:skills/add-voice-transcription
安装命令:
npx skills add https://github.com/creatuluw/nanoclaw --skill add-voice-transcription
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/creatuluw/nanoclaw --skill add-voice-transcription

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于自动转录语音消息,集成 OpenAI Whisper API 实现音频转文本。适合 WhatsApp 等平台上的语音笔记处理,提升 Agent 对语音内容的理解能力。使用时需用户提供 OpenAI API 密钥并确认音频来源合法性,避免侵犯隐私或版权。

安装前建议确认权限范围和维护状态,确保 API 调用符合服务条款。add-voice-transcription 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/add-voice-transcription

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/creatuluw/nanoclaw --skill add-voice-transcrip…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

add-voice-transcription 怎么安装?

在终端执行 npx skills add https://github.com/creatuluw/nanoclaw --skill add-voice-transcription。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

add-voice-transcription 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

add-voice-transcription 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

add-voice-transcription 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

add-voice-transcription 用的人多吗?

公开数据是累计安装 303 次,近一周安装 13 次,下载 106 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

add-voice-transcription 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
add-voice-transcription

添加语音转录 · 本页

303—接触敏感数据未明确未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Add Voice Message Transcription

This skill adds automatic voice message transcription using OpenAI's Whisper API. When users send voice notes in WhatsApp, they'll be transcribed and the agent can read and respond to the content.

UX Note: When asking the user questions, prefer using the AskUserQuestion tool instead of just outputting text. This integrates with Claude's built-in question/answer system for a better experience.

Prerequisites

USER ACTION REQUIRED

Use the AskUserQuestion tool to present this:

You'll need an OpenAI API key for Whisper transcription. Get one at: https://platform.openai.com/api-keys Cost: $0.006 per minute of audio ($0.003 per typical 30-second voice note) Once you have your API key, we'll configure it securely.

Wait for user to confirm they have an API key before continuing.


Implementation

Step 1: Add OpenAI Dependency

Read package.json and add the openai package to dependencies:

"dependencies": {
  ...existing dependencies...
  "openai": "^4.77.0"
}

Then install it:

npm install

Step 2: Create Transcription Configuration

Create a configuration file for transcription settings (without the API key):

Write to .transcription.config.json:

{
  "provider": "openai",
  "openai": {
    "apiKey": "",
    "model": "whisper-1"
  },
  "enabled": true,
  "fallbackMessage": "[Voice Message - transcription unavailable]"
}

Add this file to .gitignore to prevent committing API keys:

echo ".transcription.config.json" >> .gitignore

Use the AskUserQuestion tool to confirm:

I've created .transcription.config.json in the project root. You'll need to add your OpenAI API key to it manually: 1. Open .transcription.config.json 2. Replace the empty "apiKey": "" with your key: "apiKey": "sk-proj-..." 3. Save the file Let me know when you've added it.

Wait for user confirmation.

Step 3: Create Transcription Module

Create src/transcription.ts:

import { downloadMediaMessage } from '@whiskeysockets/baileys';
import { WAMessage, WASocket } from '@whiskeysockets/baileys';
import fs from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';
import { dirname } from 'path';

// Get __dirname equivalent in ES modules
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

// Configuration interface
interface TranscriptionConfig {
  provider: string;
  openai?: {
    apiKey: string;
    model: string;
  };
  enabled: boolean;
  fallbackMessage: string;
}

// Load configuration
function loadConfig(): TranscriptionConfig {
  const configPath = path.join(__dirname, '../.transcription.config.json');
  try {
    const configData = fs.readFileSync(configPath, 'utf-8');
    return JSON.parse(configData);
  } catch (err) {
    console.error('Failed to load transcription config:', err);
    return {
      provider: 'openai',
      enabled: false,
      fallbackMessage: '[Voice Message - transcription unavailable]'
    };
  }
}

// Transcribe audio using OpenAI Whisper API
async function transcribeWithOpenAI(audioBuffer: Buffer, config: TranscriptionConfig): Promise<string | null> {
  if (!config.openai?.apiKey || config.openai.apiKey === '') {
    console.warn('OpenAI API key not configured');
    return null;
  }

  try {
    // Dynamic import of openai
    const openaiModule = await import('openai');
    const OpenAI = openaiModule.default;
    const toFile = openaiModule.toFile;

    const openai = new OpenAI({
      apiKey: config.openai.apiKey
    });

    // Use OpenAI's toFile helper to create a proper file upload
    const file = await toFile(audioBuffer, 'voice.ogg', {
      type: 'audio/ogg'
    });

    // Call Whisper API
    const transcription = await openai.audio.transcriptions.create({
      file: file,
      model: config.openai.model || 'whisper-1',
      response_format: 'text'
    });

    // Type assertion needed: OpenAI SDK types response_format='text' as Transcription object,
    // but it actually returns a plain string when response_format is 'text'
    return transcription as unknown as string;
  } catch (err) {
    console.error('OpenAI transcription failed:', err);
    return null;
  }
}

// Main transcription function
export async function transcribeAudioMessage(
  msg: WAMessage,
  sock: WASocket
): Promise<string | null> {
  const config = loadConfig();

  // Check if transcription is enabled
  if (!config.enabled) {
    console.log('Transcription disabled in config');
    return config.fallbackMessage;
  }

  try {
    // Download the audio message
    const buffer = await downloadMediaMessage(
      msg,
      'buffer',
      {},
      {
        logger: console as any,
        reuploadRequest: sock.updateMediaMessage
      }
    ) as Buffer;

    if (!buffer || buffer.length === 0) {
      console.error('Failed to download audio message');
      return config.fallbackMessage;
    }

    console.log(`Downloaded audio message: ${buffer.length} bytes`);

    // Transcribe based on provider
    let transcript: string | null = null;

    switch (config.provider) {
      case 'openai':
        transcript = await transcribeWithOpenAI(buffer, config);
        break;
      default:
        console.error(`Unknown transcription provider: ${config.provider}`);
        return config.fallbackMessage;
    }

    if (!transcript) {
      return config.fallbackMessage;
    }

    return transcript.trim();
  } catch (err) {
    console.error('Transcription error:', err);
    return config.fallbackMessage;
  }
}

// Helper to check if a message is a voice note
export function isVoiceMessage(msg: WAMessage): boolean {
  return msg.message?.audioMessage?.ptt === true;
}

Step 4: Update Database to Handle Transcribed Content

Read src/db.ts and find the storeMessage function. Update its signature and implementation to accept transcribed content:

Change the function signature from:

export function storeMessage(msg: proto.IWebMessageInfo, chatJid: string, isFromMe: boolean, pushName?: string): void

To:

export function storeMessage(msg: proto.IWebMessageInfo, chatJid: string, isFromMe: boolean, pushName?: string, transcribedContent?: string): void

Update the content extraction to use transcribed content if provided:

const content = transcribedContent ||
  msg.message?.conversation ||
  msg.message?.extendedTextMessage?.text ||
  msg.message?.imageMessage?.caption ||
  msg.message?.videoMessage?.caption ||
  (msg.message?.audioMessage?.ptt ? '[Voice Message]' : '') ||
  '';

Step 5: Integrate Transcription into Message Handler

Note: Voice messages are transcribed for all messages in registered groups, regardless of the trigger word. This is because:

  1. Voice notes can't easily include a trigger word
  2. Users expect voice notes to work the same as text messages
  3. The transcribed content is stored in the database for context, even if it doesn't trigger the agent

Read src/index.ts and find the sock.ev.on('messages.upsert',...) event handler.

Change the callback from synchronous to async:

sock.ev.on('messages.upsert', async ({ messages }) => {

Inside the loop where messages are stored, add voice message detection and transcription:

// Only store full message content for registered groups
if (registeredGroups[chatJid]) {
  // Check if this is a voice message
  if (msg.message.audioMessage?.ptt) {
    try {
      // Import transcription module
      const { transcribeAudioMessage } = await import('./transcription.js');
      const transcript = await transcribeAudioMessage(msg, sock);

      if (transcript) {
        // Store with transcribed content
        storeMessage(msg, chatJid, msg.key.fromMe || false, msg.pushName || undefined, `[Voice: ${transcript}]`);
        logger.info({ chatJid, length: transcript.length }, 'Transcribed voice message');
      } else {
        // Store with fallback message
        storeMessage(msg, chatJid, msg.key.fromMe || false, msg.pushName || undefined, '[Voice Message - transcription unavailable]');
      }
    } catch (err) {
      logger.error({ err }, 'Voice transcription error');
      storeMessage(msg, chatJid, msg.key.fromMe || false, msg.pushName || undefined, '[Voice Message - transcription failed]');
    }
  } else {
    // Regular message, store normally
    storeMessage(msg, chatJid, msg.key.fromMe || false, msg.pushName || undefined);
  }
}

Step 6: Update Package Lock and Build

Run these commands to ensure everything compiles:

npm install
npm run build

If using --legacy-peer-deps (due to Zod version conflicts), use:

npm install --legacy-peer-deps
npm run build

Step 7: Restart NanoClaw

Restart the service to load the new transcription code:

# If using launchd (macOS):
launchctl kickstart -k gui/$(id -u)/com.nanoclaw

# Or if running manually:
# Stop the current process and restart with:
npm start

Verify it started:

sleep 2 && launchctl list | grep nanoclaw
# or check logs:
tail -f logs/nanoclaw.log

Step 8: Test Voice Transcription

Tell the user:

Voice transcription is ready! Test it by: 1. Open WhatsApp on your phone 2. Go to a registered group chat 3. Send a voice note using the microphone button 4. The agent should receive the transcribed text and respond In the database and agent context, voice messages appear as: [Voice: <transcribed text here>]

Watch for transcription in the logs:

tail -f logs/nanoclaw.log | grep -i "voice\|transcri"

Configuration Options

Enable/Disable Transcription

To temporarily disable without removing code, edit .transcription.config.json:

{
  "enabled": false
}

Change Fallback Message

Customize what's stored when transcription fails:

{
  "fallbackMessage": "[🎤 Voice note - transcription unavailable]"
}

Switch to Different Provider (Future)

The architecture supports multiple providers. To add Groq, Deepgram, or local Whisper:

  1. Add provider config to .transcription.config.json
  2. Implement provider function in src/transcription.ts (similar to transcribeWithOpenAI)
  3. Add case to the switch statement

Troubleshooting

"Transcription unavailable" or "Transcription failed"

Check logs for specific errors:

tail -100 logs/nanoclaw.log | grep -i transcription

Common causes:

  • API key not configured or invalid
  • No API credits remaining
  • Network connectivity issues
  • Audio format not supported by Whisper

Voice messages not being detected

  • Ensure you're sending actual voice notes (microphone button), not audio file attachments
  • Check that audioMessage.ptt is true in the message object

ES Module errors (__dirname is not defined)

The fix is already included in the implementation above using:

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

Dependency conflicts (Zod versions)

If you see Zod version conflicts during npm install:

npm install --legacy-peer-deps

This resolves conflicts between OpenAI SDK (requires Zod v3) and other dependencies.


Security Notes

  • The .transcription.config.json file contains your API key and should NOT be committed to version control
  • It's added to .gitignore by this skill
  • Audio files are sent to OpenAI for transcription - review their data usage policy
  • No audio files are stored locally after transcription
  • Transcripts are stored in the SQLite database like regular text messages

Cost Management

Monitor usage in your OpenAI dashboard: https://platform.openai.com/usage

Tips to control costs:

  • Set spending limits in OpenAI account settings
  • Disable transcription during development/testing with "enabled": false
  • Typical usage: 100 voice notes/month (~3 minutes average) = ~$1.80

Removing Voice Transcription

To remove the feature:

  1. Remove from package.json: npm uninstall openai
  2. Delete src/transcription.ts
  3. Revert changes in src/index.ts:

- Remove the voice message handling block - Change callback back to synchronous if desired

  1. Revert changes in src/db.ts:

- Remove the transcribedContent parameter from storeMessage

  1. Delete .transcription.config.json
  2. Rebuild: npm run build launchctl kickstart -k gui/$(id -u)/com.nanoclaw

Future Enhancements

Potential additions:

  • Local Whisper: Use whisper.cpp or faster-whisper for offline transcription
  • Groq Integration: Free tier with Whisper, very fast
  • Deepgram: Alternative cloud provider
  • Language Detection: Auto-detect and transcribe non-English voice notes
  • Cost Tracking: Log transcription costs per message
  • Speaker Diarization: Identify different speakers in voice notes

平台分布

Codex

33.18%
按下载量换算35

Claude

29.9%
按下载量换算32

Cursor

20.03%
按下载量换算21

Gemini CLI

10.15%
按下载量换算11

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

可疑

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills