Skip to main content

CLI for Volcengine Doubao speech synthesis (TTS), with a companion Claude Code SKILL

Project description

seedaudio-cli

CLI for Volcengine Doubao speech synthesis (豆包语音合成大模型 2.0, seed-tts-2.0), with an accompanying SKILL for Claude Code / AI agents.

It targets the V3 HTTP Chunked unidirectional TTS endpoint (/api/v3/tts/unidirectional): one-shot text in, audio file out. Synthesis is synchronous — there is no task/polling model.

Install

# Recommended:
uv tool install zjandrew-seedaudio-cli

# Or with pipx:
pipx install zjandrew-seedaudio-cli

# Companion SKILL:
npx skills add zjandrew/seedaudio-cli -g -y

The PyPI distribution is named zjandrew-seedaudio-cli; the binary is still seedaudio-cli.

Local development:

git clone https://github.com/zjandrew/seedaudio-cli.git
cd seedaudio-cli
uv sync --all-extras
uv run seedaudio-cli --version

Configure

TTS auth is the 语音技术 console API Key model — a single X-Api-Key, not the Ark ARK_API_KEY Bearer that the video API uses. Get it from 控制台 > API Key 管理.

# Interactive wizard (creates ~/.seedaudio-cli/config.json, chmod 600):
seedaudio-cli config init

# Or env vars:
export SEEDAUDIO_API_KEY=...
export SEEDAUDIO_ENDPOINT=https://openspeech.bytedance.com   # optional

# Or programmatic:
seedaudio-cli config set api_key ...
seedaudio-cli config set default_voice zh_female_vv_uranus_bigtts
# resource_id is auto-inferred from the voice (S_/ICL_/saturn_ -> seed-icl-2.0, else
# seed-tts-2.0); set it only to pin/override globally:
seedaudio-cli config set resource_id seed-icl-2.0           # optional global pin

Priority: CLI flag > env var > config file > built-in default.

Multiple profiles

seedaudio-cli config list
seedaudio-cli config add prod
seedaudio-cli config use prod
seedaudio-cli --profile prod synthesize -p "..."

Usage

# Text → speech (mp3)
seedaudio-cli synthesize -p "你好,欢迎使用豆包语音合成" \
  --voice zh_female_vv_uranus_bigtts --out hello.mp3

# Tune delivery
seedaudio-cli synthesize -p "新闻播报示例" --voice zh_male_liufei_uranus_bigtts \
  --speech-rate 10 --loudness-rate 0 --pitch 0 --encoding wav --sample-rate 24000 --out news.wav

# Emotion / style via voice instruction (context_texts)
seedaudio-cli synthesize -p "今天真是太开心啦" --voice zh_female_vv_uranus_bigtts \
  -m seed-tts-2.0-expressive --instruct "用特别开心、撒娇的语气说" --out happy.mp3

# Long text — the streaming endpoint returns a COMPLETE file in one request, even for
# thousands of chars / minutes of audio, so a whole article or chapter just works:
seedaudio-cli synthesize --text-file chapter1.txt --voice zh_male_xuanyijieshuo_uranus_bigtts --out chapter1.mp3
# (book-length >tens-of-thousands of chars: use Volcengine's async long-text API, not wrapped here)

# Multi-role dialogue: each line `角色: 台词`, mapped to a voice per role
seedaudio-cli dialogue --script play.txt \
  --voice 旁白=zh_male_xuanyijieshuo_uranus_bigtts \
  --voice 小美=zh_female_wenrouxiaoya_uranus_bigtts \
  --instruct 小美="用温柔的语气说" --out play.mp3

# Word-level timestamps alongside the audio
seedaudio-cli synthesize -p "字幕对齐示例" --voice zh_female_vv_uranus_bigtts \
  --subtitle --out clip.mp3   # writes clip.mp3 + clip.mp3.words.json

# Discover voices (curated subset; full list in the console)
seedaudio-cli voices --language zh

# Dry run (prints the request body, no API call — works without credentials)
seedaudio-cli --dry-run synthesize -p "..." --voice zh_female_vv_uranus_bigtts

SKILL

skills/seedaudio/SKILL.md ships in this repo. Install for Claude Code:

npx skills add zjandrew/seedaudio-cli -g -y

Exit codes

Code Meaning
0 success
2 INVALID_INPUT / CONFIG_MISSING
3 IO_ERROR
4 API_ERROR
5 NETWORK_ERROR
10 INTERNAL

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zjandrew_seedaudio_cli-1.0.0.tar.gz (58.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zjandrew_seedaudio_cli-1.0.0-py3-none-any.whl (25.5 kB view details)

Uploaded Python 3

File details

Details for the file zjandrew_seedaudio_cli-1.0.0.tar.gz.

File metadata

  • Download URL: zjandrew_seedaudio_cli-1.0.0.tar.gz
  • Upload date:
  • Size: 58.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for zjandrew_seedaudio_cli-1.0.0.tar.gz
Algorithm Hash digest
SHA256 735d300db5b89d78419bc17d2b2f2cb728550754888f139f1864a16ef81aab36
MD5 05eee3b91ba9645a42d70a474b913a3e
BLAKE2b-256 c22200d6e0f31c44867e74d79a420af606677f84f4d2f877eca99517f68b1d68

See more details on using hashes here.

Provenance

The following attestation bundles were made for zjandrew_seedaudio_cli-1.0.0.tar.gz:

Publisher: release.yml on zjandrew/seedaudio-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zjandrew_seedaudio_cli-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for zjandrew_seedaudio_cli-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ce931cf54a6b2d1b37e6d288cee3835e5195f92bc347734b348a6202855ce4b0
MD5 34d2d908c4f9ddc0d42f119805aab7b4
BLAKE2b-256 85fd8255537b56b516e985edc9d30ad732e0ad9ee90711ee888687f040c7fbc2

See more details on using hashes here.

Provenance

The following attestation bundles were made for zjandrew_seedaudio_cli-1.0.0-py3-none-any.whl:

Publisher: release.yml on zjandrew/seedaudio-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page