Voice CLI & Agent Skill
@vuilabs/voice-cli ships two tools in one npm package for the VUI Labs international Voice Community and Developer API:
vui-voiceCLI: A standalone Node.js 22+ command-line tool for discovering voices, auditioning demos, synthesizing audio, cloning authorized recordings, and designing custom voices.vuilabs-voiceAgent Skill: A bundled skill file (skills/vuilabs-voice/SKILL.md) that teaches coding assistants (such as Codex, Claude Code, Cursor, or Antigravity) how to runvui-voicesafely without exposing API keys or triggering unintended charges.
Use the CLI for local testing, voice discovery, and assistant workflows. For production applications, call the Developer HTTP API directly from your backend and keep your project API key server-side.
Install
Requires Node.js 22 or later.
- Install globally (Recommended)
- Run with npx
npm install -g @vuilabs/voice-cli
vui-voice --version
vui-voice --help
npx @vuilabs/voice-cli --version
npx @vuilabs/voice-cli community home --locale en
To upgrade later, run npm install -g @vuilabs/voice-cli@latest.
Install the bundled Agent Skill
The vuilabs-voice Skill is included inside the @vuilabs/voice-cli package and uses the same vui-voice executable. After installing the package globally, import the Skill into your coding assistant:
- With skills CLI (Recommended)
- Manual copy
npx skills add "$(npm root -g)/@vuilabs/voice-cli"
Print the exact installed Skill directory on your machine:
vui-voice skill path
Copy the reported skill_dir directory (skills/vuilabs-voice) into the skills folder scanned by your assistant.
Authentication
- Public Voice Community commands (
community ...) run anonymously and do not require an API key. - Developer API commands (
doctor,voices,files,design,speech) authenticate againsthttps://api.vuilabs.aiusing theVUILABS_API_KEYenvironment variable. See Get your API key to create a project key.
export VUILABS_API_KEY="your-project-api-key"
vui-voice doctor
vui-voice doctor verifies your project key and catalog reachability with a single read-only request and incurs no synthesis charges.
Always pass VUILABS_API_KEY via your shell environment or secret manager. Never pass it as a CLI flag, paste it into chat logs, or commit it to source control.
Explore the Voice Community
Browse, filter, search, and audition public community voices without an API key:
# Home page recommendations and collections
vui-voice community home --locale en
# Search names, descriptions, and attribute tags
vui-voice community search "narration" --page-size 10
# Inspect valid filter codes and labels
vui-voice community filters --locale en
# Filter with comma-separated values per dimension
vui-voice community list --language en --gender female,neutral --sort most_used
# Read voice details, related voices, and collections
vui-voice community get "$VOICE_ID" --locale en
vui-voice community related "$VOICE_ID" --limit 5
vui-voice community collections
vui-voice community collection "$COLLECTION_ID"
# Download a public demo WAV file
vui-voice community demo "$VOICE_ID" --output ./demo.wav
For multi-style voices, check the samples array returned by community get and pass --group <group> to audition a specific recorded style sample.
List voices & generate speech
Use luna-tts-1.5 as the fixed model for international speech synthesis. See List Voices API and Text to Speech API for full parameter details.
# List system, public community, combined, or organization personal voices
vui-voice voices list --source system --model luna-tts-1.5 --language en
vui-voice voices list --source community --model luna-tts-1.5 \
--gender female,neutral --usage-scenario narration
vui-voice voices list --source all --model luna-tts-1.5 --persona mature_intellectual
vui-voice voices list --source personal --model luna-tts-1.5 --all
# Look up an exact voice ID and download its catalog sample
vui-voice voices get "$VOICE_ID" --source system --model luna-tts-1.5
vui-voice voices demo "$VOICE_ID" --source system --model luna-tts-1.5 --output ./sample.wav
# Synchronous WAV synthesis
vui-voice speech generate --model luna-tts-1.5 --voice "$VOICE_ID" \
--text "Hello from VUI Labs." --output ./speech.wav
# Multi-style synthesis (for voices with multi_style: true)
vui-voice speech generate --model luna-tts-1.5 --voice "$VOICE_ID" \
--text "Keep your voice low." --scene whisper --expressivity strong --output ./whisper.wav
# Streaming synthesis (WAV or raw PCM S16LE)
vui-voice speech stream --model luna-tts-1.5 --voice "$VOICE_ID" \
--text-file ./script.txt --audio-format pcm --output ./speech.pcm
Key synthesis rules:
- Provide exactly one text input:
--text,--text-file, or--stdin. - Single-request input is limited to 500 weighted characters.
- Pass
--speed 0to use the default speed (1), or specify a value between0.6and1.2. - Pass
--volume(-5to5dB) on synchronousspeech generaterequests only; streaming requests do not accept--volume. - Pass
--no-text-normalizationto disable text normalization. - Run
vui-voice models listto inspect public and compatibility model definitions.
Clone and design voices
Clone an authorized voice
Use a clear recording you are authorized to clone (WAV, MP3, M4A, WebM, or OGG, 3–60 seconds, up to 20 MiB). See Voice Cloning API and Audio Upload API.
# Upload and clone in one step
vui-voice voices clone --file ./reference.wav --voice-id my_voice --model luna-tts-1.5
# Or upload first, then clone using the returned private object_key
vui-voice files upload --file ./reference.wav
vui-voice voices clone --object-key "$OBJECT_KEY" --voice-id my_voice --model luna-tts-1.5
# Verify and manage personal voices
vui-voice voices get my_voice --source personal --model luna-tts-1.5
vui-voice voices delete my_voice --yes
Design a voice from a text description
Generate three audition candidates from a description, listen to them, and save the chosen candidate as a private voice. See Voice Design API for subscription and quota rules.
# 1. Generate three candidates and save the private result manifest
vui-voice design generate \
--description "English narration. A calm adult male voice with a warm tone and steady pace." \
--output ./design.json
# 2. Download candidate audio to audition
vui-voice design demo --result ./design.json --candidate 1 --output ./candidate-1.wav
# 3. Save the selected candidate (idempotent per generation round)
vui-voice design save --result ./design.json --candidate 1 \
--name "Warm Narrator" --language en \
--description "A calm adult male narrator"
After saving succeeds, use the returned savedVoiceId as --voice in vui-voice speech generate or vui-voice speech stream.
--dry-runWrite commands (files upload, voices clone, voices delete, design generate, design save, and speech ...) support --dry-run to validate inputs locally without sending requests or incurring charges.
Automation & exit codes
- Successful commands print structured JSON to
stdout. - Failures print structured JSON to
stderr(with API keys automatically redacted) and return a nonzero exit code. - Audio and result files are written to a private temporary file first and only moved to
--outputafter validation. Existing paths are never overwritten. - Use
--timeout <seconds>(1–900, default 620) to bound the total command deadline.
| Exit code | Meaning |
|---|---|
0 | Completed successfully |
2 | Invalid command, option, input, or --output path already exists |
3 | Missing credentials, rejected authentication, or permission denied |
4 | API rejection, rate limit, or unavailable resource |
5 | Network error, timeout, invalid response, or incomplete catalog scan |
6 | Local file I/O error |
130 | Interrupted (SIGINT) |