VoiceHue Text to Speech (voicehue-tts)
Turn Markdown docs, scripts, articles, and multi-speaker podcasts into natural
MP3 or WAV audio using the VoiceHue API, or
integrate VoiceHue into a project.
Network & Security Disclosure
- Network endpoints: Connects exclusively to
https://voicehue.com/v1/...
(and https://api.voicehue.com/storage/signed/... when downloading completed
async job audio; plus https://voicehue.com/mcp if the host agent has the
VoiceHue MCP server configured). Never sends text, audio, or credentials to
any third-party host.
- Authentication: Requires the user's own
VOICEHUE_API_KEY (created free at
https://voicehue.com/dashboard/keys). The bundled script reads VOICEHUE_API_KEY
from process.env and, if unset there, checks only the VOICEHUE_API_KEY entry
in ./.env.local or ./.env inside the current working directory (never reading
any other variable, never escaping cwd). Listing voices (voices) needs no key.
Never hardcode, print, log, or ask the user to paste a key in chat.
- Workspace boundary:
scripts/voicehue.mjs uses only built-in Node.js 18+
modules (zero package installs) and reads/writes only files inside the current
working directory.
Critical Invocation Rule (Do Not cd Into the Skill Folder)
Always stay in the user's project working directory (cwd) and invoke the CLI
using the installed skill's full path (<SKILL_DIR>/scripts/voicehue.mjs — for
example ~/.claude/skills/voicehue-tts/scripts/voicehue.mjs,
~/.agents/skills/voicehue-tts/scripts/voicehue.mjs, or
./.agents/skills/voicehue-tts/scripts/voicehue.mjs):
# Run from the user's project directory so input/output paths stay in their workspace:
node <SKILL_DIR>/scripts/voicehue.mjs check
Never cd into <SKILL_DIR> before running speak, dialogue, or job,
because file paths are intentionally restricted to cwd.
Live Sync & Source of Truth
- Always prefer live API responses over static snapshots in
references/:
GET https://voicehue.com/v1/voices (voices) syncs live with the VoiceHue
voice library (5-minute cache), including new/retired voices, tags,
description / description_zh, tier, char_rate, and daily_char_limit.
GET https://voicehue.com/v1/usage (usage / check) returns real-time
account limits, remaining characters, trial balance, and reset timestamps.
POST https://voicehue.com/v1/voice-studio (capabilities / list / quote)
returns real-time private voice engines, slots, and pricing.
- If a user asks about newly launched endpoints or updated policies not yet in
references/, check https://voicehue.com/openapi.json and
https://voicehue.com/llms.txt.
Tooling Choice
- Bundled zero-dependency CLI (works in every agent): Run
node <SKILL_DIR>/scripts/voicehue.mjs <command> .... Automatically retries
transient 5xx / RPM 429 responses using the same Idempotency-Key.
- Remote MCP (when already connected): If the agent already has the VoiceHue
MCP server (
https://voicehue.com/mcp) attached, you may call its tools
(list_voices, text_to_speech, create_dialogue, create_speech_job,
get_speech_job, get_usage, estimate, voice_studio) directly while
following the exact same guardrails below.
High-Value Recurring Workflows
1. First-Time Setup Check & Live Voice Selection
Before first use (or if an API call fails), run check to verify Node.js, API
connectivity, VOICEHUE_API_KEY detection, and remaining quota in one step:
node <SKILL_DIR>/scripts/voicehue.mjs check
Never guess a voice ID unless the user gave an exact VoiceHue ID (e.g. vh-mia):
node <SKILL_DIR>/scripts/voicehue.mjs voices --language en --tier standard
node <SKILL_DIR>/scripts/voicehue.mjs voices --language zh-CN --gender female --tag narration
node <SKILL_DIR>/scripts/voicehue.mjs voices --language ja --limit 15
- Regional language matching: Base-language standard voices (
en, zh) are
automatically matched when you pass regional tags like zh-CN or en-US.
- Quota-smart selection: On free accounts, prefer uncapped
standard voices
(vh-mia, vh-clara, vh-ethan, vh-leo, vh-qinghe, vh-baichuan,
vh-zhixia, vh-yangye, vh-warm-design) for longer scripts. Premium voices
(590+ across 40+ languages) draw from the daily free trial (500 chars/day,
up to 200 chars/request without credits) and then account credits. See
references/voices.md.
2. Turn Any Markdown Doc, Blog Post, or Script Into Audio (Auto-Cleaned)
Ideal for turning README.md, engineering RFCs, research notes, or video scripts
into listenable MP3/WAV files without wasting tokens rewriting the file:
# .md / .mdx files automatically strip Markdown syntax, code blocks, and URLs (pass --raw to disable)
node <SKILL_DIR>/scripts/voicehue.mjs speak \
--voice vh-baichuan \
--text-file ./docs/article.md \
--auto \
--out ./output/article.mp3
- Auto long-text routing (
--auto): Texts up to 5,000 characters synthesize
synchronously; 5,001–20,000 characters automatically switch to an async job
(--wait) and download the finished MP3 to --out.
- Pronunciation control: When the script includes brand names, acronyms
(
SQL, Next.js), or Chinese polyphonic characters (重庆), pass
--pronunciations ./pronunciations.json ([{"from":"SQL","to":"sequel"}];
see references/api-and-workflows.md).
- Quota safety (never silently truncate): For scripts over 1,000 characters or
batches, run
usage first. If the cleaned text exceeds remaining quota, report
the exact shortfall and reset time and let the user choose whether to shorten,
split, or subscribe for more characters at https://voicehue.com/developers. For >20,000 characters, split cleanly at chapter/paragraph boundaries.
3. Two-Host Podcast / Multi-Voice Dialogue (Plain Script or JSON)
Turn any technical doc, changelog, interview, or language lesson into a natural
two-speaker podcast MP3 without hand-crafting large JSON files:
- Pick one distinct voice ID per speaker using
voices.
- Write a clean
Speaker: line script (supports both : and :):Host: Welcome back! Today we are breaking down the new release.
Guest: Let's jump straight into the three biggest improvements.
- Synthesize directly into one merged MP3:
node <SKILL_DIR>/scripts/voicehue.mjs dialogue \
--script-file ./podcast.txt \
--voices "Host=vh-ethan,Guest=vh-mia" \
--pause-ms 450 \
--out ./output/podcast.mp3
- For per-line acoustic tuning (
speed 0.5–2, pitch -4..4 semitones, volume
25–200%, custom pause_ms 0–5000), pass a JSON --blocks-file instead (both
input and text block fields are accepted). Limits: up to 20 blocks / 1,000
chars per block on free plan (100 blocks on pro), 5,000 chars total per file.
4. Long Articles, Lessons & Chapters (5,001–20,000 Characters)
Either pass --auto to speak, or invoke job directly (characters are billed
once only after full completion; audio stays downloadable for 24 hours):
node <SKILL_DIR>/scripts/voicehue.mjs job \
--voice vh-ethan \
--text-file ./chapter-1.md \
--out ./output/chapter-1.mp3 \
--wait
Without --wait, job returns the job_id immediately so you can resume later
with node <SKILL_DIR>/scripts/voicehue.mjs job --id <job_id> --out ./output/chapter-1.mp3.
5. Video Voiceovers, Language Learning, Private Voices & API Integration
- Video voiceovers & batching: Read references/api-and-workflows.md
for pronunciation dictionaries, deterministic
--idempotency-key batching,
optional local ffmpeg video muxing, OpenAI-compatible Python/Node SDKs, and
VoiceHue-Signature HMAC webhook verification.
- Language-learning clips: Use
--speed 0.85 with any of the 40+ supported
languages, or dialogue for slow/normal bilingual practice.
- Private voice design / cloning (
pv_...): Read
references/voice-studio.md first. Always run
quote and get explicit user approval before any credit-consuming action, and
confirm explicit voice rights (consent: true) before cloning.
Error Handling Rules
Branch strictly on the API error code (never retry blindly on quota/validation errors):
Error code |
Action to take |
invalid_api_key |
Tell the user to verify VOICEHUE_API_KEY (in env or ./.env) or create a free key at https://voicehue.com/dashboard/keys. |
insufficient_quota |
Report remaining daily/monthly quota (usage) and reset time (00:00 UTC / 1st of month). Do not truncate silently. If the user wants more allowance, point them to the VoiceHue plans at https://voicehue.com/developers to subscribe for more characters. |
voice_daily_limit |
This voice hit its per-voice daily cap; switch to an uncapped standard voice (vh-mia, vh-ethan, vh-qinghe, vh-baichuan, vh-zhixia). |
insufficient_credits / premium_trial_exhausted |
Explain that premium voices have a 500-char daily free trial (200 chars/request without credits); offer a standard voice or shorter text (≤200 chars), or subscribing for more characters — see https://voicehue.com/developers for plans. |
input_too_long |
Pass --auto on speak (or use job) for 5,001–20,000 chars, or split at paragraph boundaries. |
voice_not_found / unsupported_format |
Re-run voices to pick a valid ID, or switch --format to mp3. |
rate_limit_exceeded / concurrency_limit_exceeded |
CLI retries automatically with the same Idempotency-Key; if still throttled, pause briefly and resume. |
Required Output Summary
After generating audio, always report a concise summary with:
- File path: exact workspace path saved (e.g.
./output/article.mp3)
- Voice(s): voice name(s) and ID(s) (e.g.
柏川 (vh-baichuan))
- Length: character count, audio duration (
duration_seconds), and file size
- Format & settings: MP3/WAV, speed, Markdown stripping, and pronunciations applied
- Notes:
job_id (for long audio) or quota notice if remaining allowance is low
1---2name: voicehue-tts3description: >-4 Use when the user asks to turn text, Markdown docs, blog posts, or notes into5 speech, narrate a script, generate video voiceover audio, create a two-host6 podcast or multi-voice dialogue MP3/WAV, convert a long article or chapter to7 audio, fix pronunciation of names or acronyms in speech, generate language-learning8 listening clips, integrate the VoiceHue TTS API, or manage private voices with9 Voice Studio. Calls the VoiceHue API (600+ voices across 40+ languages) and saves10 ready-to-use audio files in the user's workspace.11metadata:12 source: https://skillmd.com/skills/voicehue/voicehue-tts13---1415# VoiceHue Text to Speech (`voicehue-tts`)1617Turn Markdown docs, scripts, articles, and multi-speaker podcasts into natural18MP3 or WAV audio using the [VoiceHue API](https://voicehue.com/developers), or19integrate VoiceHue into a project.2021## Network & Security Disclosure2223- **Network endpoints**: Connects exclusively to `https://voicehue.com/v1/...`24 (and `https://api.voicehue.com/storage/signed/...` when downloading completed25 async job audio; plus `https://voicehue.com/mcp` if the host agent has the26 VoiceHue MCP server configured). Never sends text, audio, or credentials to27 any third-party host.28- **Authentication**: Requires the user's own `VOICEHUE_API_KEY` (created free at29 `https://voicehue.com/dashboard/keys`). The bundled script reads `VOICEHUE_API_KEY`30 from `process.env` and, if unset there, checks only the `VOICEHUE_API_KEY` entry31 in `./.env.local` or `./.env` inside the current working directory (never reading32 any other variable, never escaping `cwd`). Listing voices (`voices`) needs no key.33 Never hardcode, print, log, or ask the user to paste a key in chat.34- **Workspace boundary**: `scripts/voicehue.mjs` uses only built-in Node.js 18+35 modules (zero package installs) and reads/writes only files inside the current36 working directory.3738## Critical Invocation Rule (Do Not `cd` Into the Skill Folder)3940Always **stay in the user's project working directory (`cwd`)** and invoke the CLI41using the installed skill's full path (`<SKILL_DIR>/scripts/voicehue.mjs` — for42example `~/.claude/skills/voicehue-tts/scripts/voicehue.mjs`,43`~/.agents/skills/voicehue-tts/scripts/voicehue.mjs`, or44`./.agents/skills/voicehue-tts/scripts/voicehue.mjs`):4546```bash47# Run from the user's project directory so input/output paths stay in their workspace:48node <SKILL_DIR>/scripts/voicehue.mjs check49```5051Never `cd` into `<SKILL_DIR>` before running `speak`, `dialogue`, or `job`,52because file paths are intentionally restricted to `cwd`.5354## Live Sync & Source of Truth5556- **Always prefer live API responses over static snapshots in `references/`**:57 - `GET https://voicehue.com/v1/voices` (`voices`) syncs live with the VoiceHue58 voice library (5-minute cache), including new/retired voices, `tags`,59 `description` / `description_zh`, `tier`, `char_rate`, and `daily_char_limit`.60 - `GET https://voicehue.com/v1/usage` (`usage` / `check`) returns real-time61 account limits, remaining characters, trial balance, and reset timestamps.62 - `POST https://voicehue.com/v1/voice-studio` (`capabilities` / `list` / `quote`)63 returns real-time private voice engines, slots, and pricing.64 - If a user asks about newly launched endpoints or updated policies not yet in65 `references/`, check `https://voicehue.com/openapi.json` and66 `https://voicehue.com/llms.txt`.6768## Tooling Choice69701. **Bundled zero-dependency CLI (works in every agent)**: Run71 `node <SKILL_DIR>/scripts/voicehue.mjs <command> ...`. Automatically retries72 transient 5xx / RPM 429 responses using the same `Idempotency-Key`.732. **Remote MCP (when already connected)**: If the agent already has the VoiceHue74 MCP server (`https://voicehue.com/mcp`) attached, you may call its tools75 (`list_voices`, `text_to_speech`, `create_dialogue`, `create_speech_job`,76 `get_speech_job`, `get_usage`, `estimate`, `voice_studio`) directly while77 following the exact same guardrails below.7879## High-Value Recurring Workflows8081### 1. First-Time Setup Check & Live Voice Selection8283Before first use (or if an API call fails), run `check` to verify Node.js, API84connectivity, `VOICEHUE_API_KEY` detection, and remaining quota in one step:8586```bash87node <SKILL_DIR>/scripts/voicehue.mjs check88```8990Never guess a voice ID unless the user gave an exact VoiceHue ID (e.g. `vh-mia`):9192```bash93node <SKILL_DIR>/scripts/voicehue.mjs voices --language en --tier standard94node <SKILL_DIR>/scripts/voicehue.mjs voices --language zh-CN --gender female --tag narration95node <SKILL_DIR>/scripts/voicehue.mjs voices --language ja --limit 1596```9798- **Regional language matching**: Base-language standard voices (`en`, `zh`) are99 automatically matched when you pass regional tags like `zh-CN` or `en-US`.100- **Quota-smart selection**: On free accounts, prefer uncapped `standard` voices101 (`vh-mia`, `vh-clara`, `vh-ethan`, `vh-leo`, `vh-qinghe`, `vh-baichuan`,102 `vh-zhixia`, `vh-yangye`, `vh-warm-design`) for longer scripts. Premium voices103 (`590+` across `40+` languages) draw from the daily free trial (500 chars/day,104 up to 200 chars/request without credits) and then account credits. See105 [references/voices.md](./references/voices.md).106107### 2. Turn Any Markdown Doc, Blog Post, or Script Into Audio (Auto-Cleaned)108109Ideal for turning `README.md`, engineering RFCs, research notes, or video scripts110into listenable MP3/WAV files without wasting tokens rewriting the file:111112```bash113# .md / .mdx files automatically strip Markdown syntax, code blocks, and URLs (pass --raw to disable)114node <SKILL_DIR>/scripts/voicehue.mjs speak \115 --voice vh-baichuan \116 --text-file ./docs/article.md \117 --auto \118 --out ./output/article.mp3119```120121- **Auto long-text routing (`--auto`)**: Texts up to 5,000 characters synthesize122 synchronously; 5,001–20,000 characters automatically switch to an async job123 (`--wait`) and download the finished MP3 to `--out`.124- **Pronunciation control**: When the script includes brand names, acronyms125 (`SQL`, `Next.js`), or Chinese polyphonic characters (`重庆`), pass126 `--pronunciations ./pronunciations.json` (`[{"from":"SQL","to":"sequel"}]`;127 see [references/api-and-workflows.md](./references/api-and-workflows.md)).128- **Quota safety (never silently truncate)**: For scripts over 1,000 characters or129 batches, run `usage` first. If the cleaned text exceeds remaining quota, report130 the exact shortfall and reset time and let the user choose whether to shorten,131 split, or subscribe for more characters at `https://voicehue.com/developers`. For >20,000 characters, split cleanly at chapter/paragraph boundaries.132133### 3. Two-Host Podcast / Multi-Voice Dialogue (Plain Script or JSON)134135Turn any technical doc, changelog, interview, or language lesson into a natural136two-speaker podcast MP3 without hand-crafting large JSON files:1371381. Pick one distinct voice ID per speaker using `voices`.1392. Write a clean `Speaker: line` script (supports both `:` and `:`):140 ```text141 Host: Welcome back! Today we are breaking down the new release.142 Guest: Let's jump straight into the three biggest improvements.143 ```1443. Synthesize directly into one merged MP3:145 ```bash146 node <SKILL_DIR>/scripts/voicehue.mjs dialogue \147 --script-file ./podcast.txt \148 --voices "Host=vh-ethan,Guest=vh-mia" \149 --pause-ms 450 \150 --out ./output/podcast.mp3151 ```1524. For per-line acoustic tuning (`speed` 0.5–2, `pitch` -4..4 semitones, `volume`153 25–200%, custom `pause_ms` 0–5000), pass a JSON `--blocks-file` instead (both154 `input` and `text` block fields are accepted). Limits: up to 20 blocks / 1,000155 chars per block on free plan (100 blocks on pro), 5,000 chars total per file.156157### 4. Long Articles, Lessons & Chapters (5,001–20,000 Characters)158159Either pass `--auto` to `speak`, or invoke `job` directly (characters are billed160once only after full completion; audio stays downloadable for 24 hours):161162```bash163node <SKILL_DIR>/scripts/voicehue.mjs job \164 --voice vh-ethan \165 --text-file ./chapter-1.md \166 --out ./output/chapter-1.mp3 \167 --wait168```169170Without `--wait`, `job` returns the `job_id` immediately so you can resume later171with `node <SKILL_DIR>/scripts/voicehue.mjs job --id <job_id> --out ./output/chapter-1.mp3`.172173### 5. Video Voiceovers, Language Learning, Private Voices & API Integration174175- **Video voiceovers & batching**: Read [references/api-and-workflows.md](./references/api-and-workflows.md)176 for pronunciation dictionaries, deterministic `--idempotency-key` batching,177 optional local `ffmpeg` video muxing, OpenAI-compatible Python/Node SDKs, and178 `VoiceHue-Signature` HMAC webhook verification.179- **Language-learning clips**: Use `--speed 0.85` with any of the 40+ supported180 languages, or `dialogue` for slow/normal bilingual practice.181- **Private voice design / cloning (`pv_...`)**: Read182 [references/voice-studio.md](./references/voice-studio.md) first. Always run183 `quote` and get explicit user approval before any credit-consuming action, and184 confirm explicit voice rights (`consent: true`) before cloning.185186## Error Handling Rules187188Branch strictly on the API error `code` (never retry blindly on quota/validation errors):189190| Error `code` | Action to take |191|---|---|192| `invalid_api_key` | Tell the user to verify `VOICEHUE_API_KEY` (in env or `./.env`) or create a free key at `https://voicehue.com/dashboard/keys`. |193| `insufficient_quota` | Report remaining daily/monthly quota (`usage`) and reset time (00:00 UTC / 1st of month). Do not truncate silently. If the user wants more allowance, point them to the VoiceHue plans at `https://voicehue.com/developers` to subscribe for more characters. |194| `voice_daily_limit` | This voice hit its per-voice daily cap; switch to an uncapped standard voice (`vh-mia`, `vh-ethan`, `vh-qinghe`, `vh-baichuan`, `vh-zhixia`). |195| `insufficient_credits` / `premium_trial_exhausted` | Explain that premium voices have a 500-char daily free trial (200 chars/request without credits); offer a standard voice or shorter text (≤200 chars), or subscribing for more characters — see `https://voicehue.com/developers` for plans. |196| `input_too_long` | Pass `--auto` on `speak` (or use `job`) for 5,001–20,000 chars, or split at paragraph boundaries. |197| `voice_not_found` / `unsupported_format` | Re-run `voices` to pick a valid ID, or switch `--format` to `mp3`. |198| `rate_limit_exceeded` / `concurrency_limit_exceeded` | CLI retries automatically with the same `Idempotency-Key`; if still throttled, pause briefly and resume. |199200## Required Output Summary201202After generating audio, always report a concise summary with:203- **File path**: exact workspace path saved (e.g. `./output/article.mp3`)204- **Voice(s)**: voice name(s) and ID(s) (e.g. `柏川 (vh-baichuan)`)205- **Length**: character count, audio duration (`duration_seconds`), and file size206- **Format & settings**: MP3/WAV, speed, Markdown stripping, and pronunciations applied207- **Notes**: `job_id` (for long audio) or quota notice if remaining allowance is low