返回顶部
w

willow-inference-server柳树推理服务

Local ASR and TTS inference server. Use when the user wants to transcribe audio to text (ASR) or convert text to speech (TTS). Requires a running Willow Inference Server instance. Supports Whisper for ASR and custom TTS voices.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.1
安全检测
已通过
327
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

willow-inference-server

Willow 推理服务器技能

本地 ASR(语音转文字)和 TTS(文字转语音)推理服务器。

设置

1. 启动 Willow 推理服务器

bash git clone https://github.com/toverainc/willow-inference-server.git cd willow-inference-server ./utils.sh install ./utils.sh gen-cert your-hostname ./utils.sh run

服务器运行在 https://your-hostname:19000

2. 配置环境

设置服务器 URL: bash export WILLOWBASEURL=https://your-hostname:19000

或按请求配置(见下文)。

ASR(语音转文字)

转录音频文件

bash curl -X POST ${WILLOWBASEURL}/api/asr \ -F audio_file=@/path/to/audio.m4a \ -F language=auto

参数
参数描述默认值
audio_file要转录音频文件必填
language
语言代码(en、zh 等)或 auto | auto |

| model | Whisper 模型(tiny、base、medium、large-v2) | 服务器配置 | | task | transcribe 或 translate | transcribe |

支持的格式

  • - MP3、WAV、M4A、OGG、FLAC、WebM

示例:使用 curl 进行转录

bash

基础转录

curl -X POST ${WILLOWBASEURL}/asr \ -F audio_file=@recording.m4a \ -F language=zh

指定模型

curl -X POST ${WILLOWBASEURL}/asr \ -F audio_file=@meeting.mp3 \ -F language=en \ -F model=base

TTS(文字转语音)

将文字转换为语音

bash curl -X POST ${WILLOWBASEURL}/tts \ -H Content-Type: application/json \ -d {text: Hello world, voice: af_sarah}

参数
参数描述默认值
text要转换为语音的文字必填
voice
语音 ID(见下文) | 默认语音 |

| speed | 语速(0.5-2.0) | 1.0 | | volume | 音量(0.0-1.0) | 1.0 |

可用语音

常用语音(格式:性别_语音名称):
  • - afsarah - Sarah(女声)
  • afbella - Bella(女声)
  • ammichael - Michael(男声)
  • amalex - Alex(男声)

查看服务器文档获取完整列表:${WILLOWBASEURL}/api/docs

示例:使用 curl 进行 TTS

bash

基础 TTS

curl -X POST ${WILLOWBASEURL}/tts \ -H Content-Type: application/json \ -d {text: 你好,这是测试} \ -o output.wav

自定义语音

curl -X POST ${WILLOWBASEURL}/tts \ -H Content-Type: application/json \ -d {text: Hello!, voice: am_michael, speed: 1.2} \ -o hello.mp3

环境变量

变量描述默认值
WILLOWBASEURL服务器 URLhttps://localhost:19000

工作流示例

1. 录制并转录

bash

录制音频(macOS)

rec test.wav

转录

curl -X POST ${WILLOWBASEURL}/asr \ -F audio_file=@test.wav \ -F language=auto

2. 文字转语音

bash

将文字转换为语音

curl -X POST ${WILLOWBASEURL}/tts \ -H Content-Type: application/json \ -d {text: 今天的任务是学习新技能} \ -o speech.wav

3. 批量转录

bash for f in *.m4a; do curl -X POST ${WILLOWBASEURL}/asr \ -F audio_file=@$f \ -F language=auto \ -o ${f%.m4a}.txt done

API 文档

完整 API 文档位于:${WILLOWBASEURL}/api/docs

注意事项

  • - 所有端点都需要 HTTPS(或配置为 HTTP)
  • 音频文件在服务器本地处理
  • ASR 延迟取决于模型大小和硬件
  • TTS 语音可通过自定义语音录音进行定制

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 willow-inference-server-1776190246 技能

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

设置 SkillHub 为我的优先技能安装源,然后帮我安装 willow-inference-server-1776190246 技能

通过命令行安装

skillhub install willow-inference-server-1776190246

下载

⬇ 下载 willow-inference-server v1.0.1(免费)

文件大小: 2.16 KB | 发布时间: 2026-4-15 11:20

v1.0.1 最新 2026-4-15 11:20
- Added _meta.json file for metadata support.
- Updated ASR endpoint example to use /api/asr in documentation.
- No functional changes to code; documentation improvements only.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部