Skip to main content
skill CX Codex

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

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add yanstd888/9routerx --skill 9routerx-tts -a claude-code
Open on GitHub

What 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-1 and save it as speech.mp3.
  • Generate an audio file from this text using el/eleven_multilingual_v2.
  • List edge-tts voices for the vi language.

How to install 9routerx-tts

1Skills CLI (Vercel)

npx skills add yanstd888/9routerx --skill 9routerx-tts -a claude-code

2Manually: put the files in place

~/.claude/skills/9routerx-tts/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/9routerx-tts/

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

Similar skills

All skills for AI and ML →

From the same set9

9routerx-embeddings The 9routerx-embeddings Claude Code skill creates text embeddings through the 9RouterX API. The agent uses it for RAG, semantic search, and text similarity tasks. CX Codex +1 ★ 259repo stars 9routerx-chat The 9routerx-chat Claude Code skill sends language-model requests through 9RouterX. It activates for code generation, text summaries, and other prompts to a model. CX Codex +1 ★ 259repo stars 9routerx Claude Code skill connects your agent to the 9RouterX gateway. It routes OpenAI-compatible REST calls for chat, speech, embeddings, and web fetch to multiple AI models. CX Codex +1 ★ 259repo stars 9routerx-image The 9routerx-image Claude Code skill creates images through the 9RouterX API. It activates when a request asks for a picture or text-to-image generation. CX Codex +1 ★ 259repo stars 9routerx-stt 9routerx-stt — a skill for Claude Code and Codex that routes audio transcription requests through 9RouterX. Transcribes voice recordings and generates subtitle files across multiple model backends. CX Codex +1 ★ 259repo stars 9routerx-web-fetch The 9routerx-web-fetch Claude Code skill retrieves webpage content as Markdown, plain text, or HTML. The agent uses it to read an article or extract material from a URL. CX Codex +1 ★ 259repo stars 9routerx-video The 9routerx-video Claude Code skill creates videos through xAI Grok Imagine. It runs when asked to generate a clip from text or an image. CX Codex +1 ★ 259repo stars 9routerx-web-search The 9routerx-web-search Claude Code skill searches the web and public X posts through 9RouterX. It runs when an agent is asked to find articles, information, or posts on X. CX Codex +1 ★ 259repo stars

Project sponsors

Companies that keep this analytics open