闲社服务运行正常AI智能体自动化平台
w

本地语音管道

技能标识:whisper-piper-voice

Set up and run a local voice pipeline combining Whisper STT (speech-to-text) and Piper TTS (text-to-speech) as a single HTTP server. Use when asked to set up voice capabilities, transcribe audio, generate speech, configure STT/TTS, or build a voice assistant pipeline. Handles both directions — audio-to-text and text-to-audio — on a single port. Runs fully offline on CPU or GPU (NVIDIA CUDA). NOT for cloud-based TTS (ElevenLabs, Google TTS) — this is 100% local and free.

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 1.0.0
检测标记
后台标记通过
免费
免费获取
0
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

本地语音管道

Whisper + Piper 语音流水线

将本地STT(语音转文本)和TTS(文本转语音)整合为单一HTTP服务器。零云依赖。

架构

音频输入 → POST /transcribe → Whisper (faster-whisper) → JSON {文本, 语言}
文本输入 → POST /speak → Piper TTS → ffmpeg → audio/ogg (Opus)

两个端点运行在同一个Python进程中,共用同一端口(默认:9998)。

快速开始

  1. 1. 安装依赖:
bash python3 -m venv ~/whisper-env && source ~/whisper-env/bin/activate pip install faster-whisper apt install ffmpeg # 或 macOS 上使用 brew install ffmpeg
  1. 2. 下载Piper及语音模型:
bash mkdir -p ~/piper && cd ~/piper wget https://github.com/rhasspy/piper/releases/latest/download/piperlinuxx86_64.tar.gz tar xzf piperlinuxx86_64.tar.gz mkdir voices && cd voices wget https://huggingface.co/rhasspy/piper-voices/resolve/main/de/deDE/thorstenemotional/medium/deDE-thorstenemotional-medium.onnx wget https://huggingface.co/rhasspy/piper-voices/resolve/main/de/deDE/thorstenemotional/medium/deDE-thorstenemotional-medium.onnx.json
  1. 3. 运行服务器(scripts/voice-server.py):
bash python3 voice-server.py --port 9998 \ --whisper-model small --whisper-device cpu \ --piper-bin ~/piper/piper/piper \ --piper-model ~/piper/voices/deDE-thorstenemotional-medium.onnx

API

转写(音频→文本):
bash
curl -X POST -F file=@message.ogg http://HOST:9998/transcribe

{text: Hallo Welt, language: de}

语音合成(文本→音频):
bash
curl -X POST -H Content-Type: application/json \
-d {text: Hallo Welt, speaker: 4} \
http://HOST:9998/speak -o response.ogg

配置

参数默认值描述
--port9998服务器端口
--whisper-model
small | tiny/base/small/medium/large-v3 | | --whisper-device | cpu | cpu 或 cuda | | --piper-bin | (必填) | Piper可执行文件路径 | | --piper-model | (必填) | .onnx语音模型文件路径 | | --piper-speaker | 4 | 说话人ID(多说话人模型) | | --speed | 0.9 | TTS语速(数值越低越快) |

选择模型

Whisper: CPU推荐使用small(性能均衡),GPU推荐使用medium(无需large-v3开销即可获得最佳质量)。

Piper语音: 浏览 https://rhasspy.github.io/piper-samples/ — 下载 .onnx 和 .onnx.json 文件。

完整设置指南

阅读 references/setup-guide.md 了解systemd服务配置、所有语音选项、模型对比表以及OpenClaw集成详情。

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 whisper-piper-voice-1776051073 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 whisper-piper-voice-1776051073 技能

通过命令行安装

skillhub install whisper-piper-voice-1776051073

下载

⬇ 下载 whisper-piper-voice v1.0.0(免费)

文件大小: 5.45 KB | 发布时间: 2026-4-14 11:13

v1.0.0 最新 2026-4-14 11:13
Initial release: Combined Whisper STT + Piper TTS HTTP server. Single-port voice pipeline, runs fully local on CPU or GPU. Includes voice-server.py script, setup guide, and model recommendations.
返回顶部