9routerx-tts — Claude Code skill: text-to-speech and setup
The 9routerx-tts Claude Code skill turns text into speech through the 9RouterX API. It runs for voiceovers, generated audio, or reading text aloud.
MIT ★ 259 updated 2026-11-16
npx skills add yanstd888/9routerx --skill 9routerx-tts -a claude-codeWhat 9routerx-tts does
The skill sends text and a voice identifier to POST /v1/audio/speech, then receives audio as MP3 or JSON containing Base64 audio. The 9RouterX API can also list available models, model details, and voices.
Voice options include OpenAI, ElevenLabs, Deepgram, Edge TTS, Google TTS, Hyperbolic, and Inworld, along with other providers named by the skill. A running 9RouterX instance and the 9ROUTERX_URL variable are required; set 9ROUTERX_KEY when authentication is enabled. local-device voices require ffmpeg.
Voice identifiers and authentication rules vary by provider. edge-tts and google-tts work without authentication, as do the listed local voice options.
What it helps with
- save spoken text as an MP3 file
- generate a voice track through a selected provider
- find voices available through the API
Example prompts for the agent
- Turn this text into speech with
openai/tts-1and save it asspeech.mp3. - Generate an audio file from this text using
el/eleven_multilingual_v2. - List
edge-ttsvoices for thevilanguage.
How to install 9routerx-tts
1Skills CLI (Vercel)
npx skills add yanstd888/9routerx --skill 9routerx-tts -a claude-code2Manually: put the files in place
~/.claude/skills/9routerx-tts/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/9routerx-tts/
1Skills CLI (Vercel)
npx skills add yanstd888/9routerx --skill 9routerx-tts -a codex2Manually: put the files in place
.agents/skills/9routerx-tts/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add yanstd888/9routerx --skill 9routerx-tts -a cursor2Manually: put the files in place
.cursor/skills/9routerx-tts/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install yanstd888/9routerx skills/9routerx-tts2Manually: put the files in place
.github/skills/9routerx-tts/SKILL.md1Skills CLI (Vercel)
npx skills add yanstd888/9routerx --skill 9routerx-tts -a gemini-cli2Platform CLI
gemini skills install https://github.com/yanstd888/9routerx --path skills/9routerx-ttsManually: put the files in place
.devin/skills/9routerx-tts/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about 9routerx-tts
How do I install 9routerx-tts in Claude Code?
Run npx skills add yanstd888/9routerx --skill 9routerx-tts -a claude-code. The skill file is placed at ~/.claude/skills/9routerx-tts/SKILL.md.
What does 9routerx-tts do?
It sends text to the 9RouterX API for speech generation and returns audio as MP3 or JSON. The skill can use voices from supported providers.
What does 9routerx-tts need to run?
It requires a running 9RouterX instance and 9ROUTERX_URL; 9ROUTERX_KEY is needed when authentication is enabled. ffmpeg is required for local-device voices.
Source text
SKILL.md · MIT
---
name: 9routerx-tts
description: Text-to-speech via 9RouterX /v1/audio/speech using OpenAI / ElevenLabs / Deepgram / Edge TTS / Google TTS / Hyperbolic / Inworld voices. Use when the user wants to convert text to speech, generate audio, voiceover, narrate, or read text aloud.
---
# 9RouterX — Text-to-Speech
Requires `9ROUTERX_URL` (and `9ROUTERX_KEY` if auth enabled). See https://raw.githubusercontent.com/yanstd888/9routerx/refs/heads/main/skills/9routerx/SKILL.md for setup.
## Discover
```bash
# 1) List models
curl $9ROUTERX_URL/v1/models/tts | jq '.data[].id'
# 2) Per-model metadata (params, voicesUrl if voice-by-id)
curl "$9ROUTERX_URL/v1/models/info?id=el/eleven_multilingual_v2"
# 3) List voices (elevenlabs, edge-tts, deepgram, inworld, local-device). Optional ?lang=vi
curl "$9ROUTERX_URL/v1/audio/voices?provider=edge-tts&lang=vi" | jq '.data[].model'
```
`model` field in `/v1/audio/speech` = voice ID directly (e.g. `edge-tts/vi-VN-HoaiMyNeural`, `el/<voice_id>`, or `openai/tts-1` model+default voice).
## Endpoint
`POST $9ROUTERX_URL/v1/audio/speech`
| Field | Required | Notes |
|---|---|---|
| `model` | yes | voice ID from `/v1/models/tts` |
| `input` | yes | text to speak |
Query `?response_format=mp3` (default, raw bytes) or `?response_format=json` (`{audio: base64, format}`).
## Examples
Save MP3:
```bash
curl -X POST "$9ROUTERX_URL/v1/audio/speech" \
-H "Authorization: Bearer $9ROUTERX_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"openai/tts-1","input":"Hello world"}' \
--output speech.mp3
```
JS (save file):
```js
import { writeFile } from "node:fs/promises";
const r = await fetch(`${process.env.9ROUTERX_URL}/v1/audio/speech`, {
method: "POST",
headers: { "Authorization": `Bearer ${process.env.9ROUTERX_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({ model: "el/eleven_multilingual_v2", input: "Xin chào" }),
});
await writeFile("speech.mp3", Buffer.from(await r.arrayBuffer()));
```
## Response shape
Default → raw audio bytes (Content-Type `audio/mp3`).
`?response_format=json`:
```json
{ "audio": "SUQzBAAAA...", "format": "mp3" }
```
## Provider quirks (model format)
| Provider | `model` format | Notes |
|---|---|---|
| `openai` | `tts-1/alloy` (model/voice) or just voice | Default model `gpt-4o-mini-tts` |
| `elevenlabs` | `<model_id>/<voice_id>` or `<voice_id>` | Default model `eleven_flash_v2_5`; list voices in Dashboard |
| `openrouter` | `openai/gpt-4o-mini-tts/alloy` | Streamed via chat-completions audio modality |
| `edge-tts` | voice id e.g. `vi-VN-HoaiMyNeural` | **noAuth**; default `vi-VN-HoaiMyNeural` |
| `google-tts` | language code e.g. `en`, `vi` | **noAuth** |
| `local-device` | OS voice name (`say -v ?` / SAPI) | **noAuth**; needs `ffmpeg` |
| `deepgram` | `aura-asteria-en` etc | Token auth |
| `nvidia`, `inworld`, `cartesia`, `playht` | `model/voice` | Provider-specific auth header |
| `coqui`, `tortoise` | speaker / voice id | Localhost noAuth |
| `hyperbolic` | model id | Body = `{text}` only |
© yanstd888 · MIT · yanstd888/9routerx