360 Secure SkillHub
360 安全技能中心

Whisper Voice Transcription (whisper.cpp)

提供 whisper.cpp 的搭建与操作指南:用 git、cmake 编译本地语音识别工具,配合 ffmpeg 将音频转成 16kHz 单声道 WAV 后调用 whisper-cli 转写;本地不可用时可按指引改用经批准的云端语音 API,并提示音频离开本机。材料未附带模型权重与预编译产物。

xuxuclassmate
xuxuclassmate
热度 43.87
最近更新 2026-05-11 17:44:10
分类:效率依赖:代码执行 / 读写文件 / 第三方 API应用场景:文件转换 / 数据处理 / 自动化脚本

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add whisper-voice-transcription
Metadata
name
whisper-voice-transcription
description
Build and use whisper.cpp for local speech-to-text workflows, with optional cloud fallback when local transcription is not practical.
tags
["speech-to-text","stt","voice","transcription","whisper","audio"]
version
1.1.1

Whisper Voice Transcription with whisper.cpp

When to use

  • You want local speech-to-text without sending audio to a third party.
  • You need a fallback workflow when a built-in transcription tool fails.
  • You want an operator guide for compiling and running whisper.cpp.

Prerequisites

  • git
  • cmake
  • a C or C++ compiler
  • ffmpeg

Build steps

git clone --depth 1 https://github.com/ggerganov/whisper.cpp.git ~/whisper.cpp
cd ~/whisper.cpp
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j4

Download a model from the official ggerganov/whisper.cpp releases or Hugging Face repository and place it under ~/whisper.cpp/models/.

Standard transcription flow

ffmpeg -y -i input_audio.ogg -ar 16000 -ac 1 -f wav /tmp/voice.wav
~/whisper.cpp/build/bin/whisper-cli \
  -m ~/whisper.cpp/models/ggml-large-v3.bin \
  -f /tmp/voice.wav \
  -l auto \
  --no-timestamps

Fallback workflow

If a higher-level tool fails, first locate the exact cache or upload path used by that tool. Search only within the expected application cache directory instead of scanning the entire home directory.

Cloud fallback

If local transcription is too slow or unavailable, use an approved speech API and tell the user that audio will leave the machine.

Guardrails

  • Download binaries and models only from official sources.
  • Verify hashes when possible.
  • Do not search unrelated directories for audio files.
  • Be explicit when using a cloud provider because that changes the privacy model.