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.1.tar.gz (58.7 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.1-py3-none-any.whl (25.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: zjandrew_seedaudio_cli-1.0.1.tar.gz
  • Upload date:
  • Size: 58.7 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.1.tar.gz
Algorithm Hash digest
SHA256 0fe7700996fd1d89000e7e71063d5825edb9a81768728dcff00618554e3ab4e1
MD5 e365f847f23374bfbb4919653cbc5e6a
BLAKE2b-256 9eabfc6f2aaf144923399dd30162ee783e24908e27bd9fa37462786e45efcbeb

See more details on using hashes here.

Provenance

The following attestation bundles were made for zjandrew_seedaudio_cli-1.0.1.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.1-py3-none-any.whl.

File metadata

File hashes

Hashes for zjandrew_seedaudio_cli-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3480ee0c9d95105b3fcf6089385cd339e8e23deb903bb51495775db9e6204525
MD5 465c8fb88e5d3dc237698f23a8bfc151
BLAKE2b-256 f4338e880e8e0373043450b36bc6604f5cc80087ba3aeef634cdd3783c5304b8

See more details on using hashes here.

Provenance

The following attestation bundles were made for zjandrew_seedaudio_cli-1.0.1-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