360 Secure SkillHub
360 安全技能中心

openclaw-whisper-voice

在 OpenClaw Gateway 主机上以本地方式运行 Whisper 语音转文字:提供安装脚本(装 PyTorch CPU 版、openai-whisper、imageio-ffmpeg 及 whisper/ffmpeg 启动器)和 transcribe.sh 包装脚本,并给出把入站语音附件接到该 CLI 的配置方式。

sabyaghosh
sabyaghosh
热度 60.94
最近更新 2026-05-11 17:34:06
分类:效率依赖:代码执行 / 读写文件应用场景:文件转换 / 翻译 / 自动化脚本 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add openclaw-whisper-voice
Metadata
name
openclaw-whisper-voice
description
Local Whisper speech-to-text for audio files and inbound voice notes on the OpenClaw Gateway host. Use when setting up local transcription for WhatsApp, Telegram, or other audio attachments; when configuring tools.media.audio with a CLI fallback instead of a cloud API; or when you need a reusable shell entrypoint that makes Whisper + ffmpeg work reliably on Linux.
metadata
{"openclaw":{"emoji":"🎙️","requires":{"bins":["whisper","ffmpeg"]},"install":[{"id":"local-whisper-user-install","kind":"manual","label":"Run scripts/install_local_whisper.sh on the Gateway host"}]}}

OpenClaw Whisper Voice

Use this skill to make local Whisper transcription dependable on the OpenClaw Gateway host.

Install on the host

Run:

{baseDir}/scripts/install_local_whisper.sh

The installer:

  • installs Python packages into ~/.local
  • installs a CPU-safe PyTorch build
  • installs openai-whisper
  • installs imageio-ffmpeg
  • creates stable ~/.local/bin/whisper and ~/.local/bin/ffmpeg launchers

Transcribe a file manually

Use the wrapper instead of raw whisper when reliability matters:

{baseDir}/scripts/transcribe.sh /path/to/audio.ogg
{baseDir}/scripts/transcribe.sh /path/to/audio.m4a --model tiny --stdout-only
{baseDir}/scripts/transcribe.sh /path/to/audio.mp3 --task translate --format srt

Configure inbound WhatsApp and Telegram voice notes

Patch OpenClaw config so inbound audio uses the wrapper:

{
  tools: {
    media: {
      audio: {
        enabled: true,
        maxBytes: 20971520,
        timeoutSeconds: 120,
        models: [
          {
            type: "cli",
            command: "{baseDir}/scripts/transcribe.sh",
            args: ["{{MediaPath}}", "--model", "base", "--stdout-only"],
            timeoutSeconds: 120
          }
        ]
      }
    }
  }
}

Model choices

  • tiny: fastest, weakest accuracy
  • base: best default for chat voice notes
  • small or larger: better accuracy, heavier CPU and RAM use

Output rules

  • Use --stdout-only for tools.media.audio so stdout is only transcript text.
  • Use --format txt|srt|vtt|json for standalone file transcription.
  • First model download goes into ~/.cache/whisper.