← 返回
内容创作 中文

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",...
本地 TTS 路由器 for Apple Silicon — 拉取模型、提供 OpenAI 兼容 API、合成语音、克隆声音。用户请求“生成语音”时使用。
hrhrng
内容创作 clawhub v0.1.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 634
下载
💾 11
安装
1
版本
#latest

概述

tts-router — Local TTS Router for Apple Silicon

A CLI that manages and serves multiple TTS models locally on Apple Silicon (MLX).

Models are downloaded from HuggingFace Hub and served via OpenAI + DashScope compatible APIs.

Prerequisites

  • macOS with Apple Silicon (M1/M2/M3/M4)
  • uv installed — see https://docs.astral.sh/uv/getting-started/installation/

(e.g. brew install uv or via the official installer)

  • ffmpeg installed (brew install ffmpeg)

Install

# From PyPI (requires --prerelease=allow due to mlx-audio upstream dep)
uvx --prerelease=allow tts-router list

# Or install with pip
pip install tts-router

Commands

tts-router list — Show available models

tts-router list

tts-router pull — Download model weights

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

Models are cached in ~/.cache/huggingface/hub/. No need to re-download.

tts-router serve — Start the TTS API server

# Default: qwen3-tts on port 8091
tts-router serve

# Custom model and port
tts-router serve --model kokoro --port 9000

The server requires models to be pulled first.

tts-router say — Synthesize speech from CLI

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

Available Models

Short NameFeatures
-----------------------------------------------------------------
qwen3-ttsmulti-speaker, emotion, instruct (default)
qwen3-tts-designfree-form voice description
qwen3-tts-clonevoice cloning with ref audio
kokorofast, lightweight, multi-lang
diamulti-speaker dialogue, laughter/emotion sounds
chatterbox23 languages, emotion control, voice cloning
orpheusemotive TTS with emotion tags

Quick Start for Agent

# 1. Pull the default model
tts-router pull qwen3-tts

# 2. Start the server
tts-router serve

# 3. Generate speech (OpenAI format)
curl -X POST http://localhost:8091/v1/audio/speech \
  -H "Content-Type: application/json" \
  -d '{"input": "Hello world", "voice": "Vivian"}' \
  --output output.wav

API Endpoints (when serving)

EndpointMethodDescription
-------------------------------------------------------------------
GET /GETPlayground UI
POST /v1/audio/speechPOSTOpenAI-compatible TTS
GET /v1/audio/voicesGETList available voices
GET /healthGETHealth check
POST /v1/audio/clonePOSTVoice clone generation
POST /v1/audio/references/uploadPOSTUpload reference audio
POST /v1/audio/references/from-urlPOSTFetch ref audio by URL

Advanced Use Cases

For more complex workflows, read the relevant reference file:

  • Clone a voice from any URL (YouTube, Bilibili, podcast, direct audio link) →

read references/voice-cloning.md

  • Use tts-router as a TTS provider in OpenClaw

read references/openclaw.md

版本历史

共 1 个版本

  • v0.1.0 当前
    2026-03-31 04:13 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

content-creation

Baidu Wenku AIPPT

ide-rea
使用百度文库 AI 智能生成 PPT,自动根据内容选择模板。
★ 66 📥 46,202
content-creation

Humanizer

biostartechnology
消除AI写作痕迹,使文本更自然真实。基于维基百科"AI写作特征"指南,识别并修正夸张象征、宣传用语、肤浅-ing分析、模糊归因、破折号滥用、三项排比、AI词汇、负面平行结构及冗长连接词等模式。
★ 860 📥 199,843
content-creation

YouTube

byungkyu
使用托管OAuth集成YouTube Data API,支持搜索视频、管理播放列表、获取频道数据及评论互动,适用于用户需要时使用此技能。
★ 142 📥 41,074