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

本地TTS路由

技能标识:tts-router

Local TTS router for Apple Silicon — pull models, serve OpenAI-compatible API, synthesize speech, clone voices. Use when the user asks to "generate speech", "text to speech", "start TTS server", "pull a TTS model", "clone a voice", "speak in someone's voice", or any task involving local speech synthesis on macOS.

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

本地TTS路由

tts-router — Apple Silicon 本地 TTS 路由器

一个在 Apple Silicon (MLX) 上本地管理和服务多个 TTS 模型的 CLI 工具。
模型从 HuggingFace Hub 下载,并通过兼容 OpenAI + DashScope 的 API 提供服务。

前置条件

  • - 搭载 Apple Silicon (M1/M2/M3/M4) 的 macOS
  • 已安装 uv — 参见 https://docs.astral.sh/uv/getting-started/installation/
(例如 brew install uv 或通过官方安装程序)
  • - 已安装 ffmpeg (brew install ffmpeg)

安装

bash

从 PyPI 安装(由于 mlx-audio 上游依赖,需要 --prerelease=allow)


uvx --prerelease=allow tts-router list

或使用 pip 安装

pip install tts-router

命令

tts-router list — 显示可用模型

bash
tts-router list

tts-router pull — 下载模型权重

bash
tts-router pull qwen3-tts
tts-router pull kokoro

模型缓存于 ~/.cache/huggingface/hub/。无需重新下载。

tts-router serve — 启动 TTS API 服务器

bash

默认:qwen3-tts 在端口 8091


tts-router serve

自定义模型和端口

tts-router serve --model kokoro --port 9000

服务器需要先拉取模型。

tts-router say — 从 CLI 合成语音

bash
tts-router say Hello world -o hello.wav
tts-router say Hello --voice Vivian --model kokoro -o out.wav

可用模型

短名称特性
qwen3-tts多说话人、情感、指令(默认)
qwen3-tts-design
自由形式的语音描述 | | qwen3-tts-clone | 使用参考音频进行语音克隆 | | kokoro | 快速、轻量、多语言 | | dia | 多说话人对话、笑声/情感音效 | | chatterbox | 23种语言、情感控制、语音克隆 | | orpheus | 带情感标签的情感化 TTS |

快速入门(面向 Agent)

bash

1. 拉取默认模型


tts-router pull qwen3-tts

2. 启动服务器

tts-router serve

3. 生成语音(OpenAI 格式)

curl -X POST http://localhost:8091/v1/audio/speech \ -H Content-Type: application/json \ -d {input: Hello world, voice: Vivian} \ --output output.wav

API 端点(服务运行时)

端点方法描述
GET /GETPlayground UI
POST /v1/audio/speech
POST | 兼容 OpenAI 的 TTS | | GET /v1/audio/voices | GET | 列出可用语音 | | GET /health | GET | 健康检查 | | POST /v1/audio/clone | POST | 语音克隆生成 | | POST /v1/audio/references/upload | POST | 上传参考音频 | | POST /v1/audio/references/from-url| POST | 通过 URL 获取参考音频 |

高级用例

对于更复杂的工作流程,请阅读相关参考文件:

  • - 从任意 URL 克隆语音(YouTube、Bilibili、播客、直接音频链接)→
阅读 references/voice-cloning.md
  • - 在 OpenClaw 中使用 tts-router 作为 TTS 提供商 →
阅读 references/openclaw.md

标签

skill ai

通过对话安装

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

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 tts-router-1776171322 技能

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

设置 SkillHub 为我的优先技能安装源,然后帮我安装 tts-router-1776171322 技能

通过命令行安装

skillhub install tts-router-1776171322

下载

⬇ 下载 tts-router v0.1.0(免费)

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

v0.1.0 最新 2026-4-15 11:34
- Initial public release of tts-router for Apple Silicon.
- Provides a CLI to manage, download, and serve multiple local TTS models supporting OpenAI-compatible APIs.
- Supports text-to-speech synthesis, voice cloning, and serves APIs for integration.
- Includes commands to list models, pull models from HuggingFace, run a TTS server, and generate speech from the CLI.
- Offers multiple ready-to-use TTS models with features like multi-language, emotion control, and voice cloning.
返回顶部