CLI TTS tool for configurable OpenAI-compatible voice cloning endpoints
Project description
caw
caw is a pip-installable CLI TTS tool.
It is designed to:
- take text from the command line
- optionally select a scene-specific reference voice with
--scene - call a configurable OpenAI-compatible TTS endpoint
- write
wavaudio bytes to stdout by default - optionally play or save the generated audio
- discover local reference voices from
src/caw/assets/*.wav
Install
pipx install caw-tts
Or:
python3 -m pip install caw-tts
For local development, run pipx install . or python3 -m pip install . from
the repository root.
Commands
caw help
caw setup
caw upgrade
caw scenes
caw "你好,这是一段测试语音。" > out.wav
caw --play "你好,这是一段测试语音。"
caw --play /usr/bin/aplay "你好,这是一段测试语音。"
caw -o out.wav "你好,这是一段测试语音。"
caw setup uses questionary + rich for an interactive configuration flow. It
sets the API key environment variable name, Base URL, TTS model, and default
scene. It can also store an optional PULSE_SERVER value for playback, for
example unix:/tmp/pulse-socket.
If no config file exists, running caw "text" opens caw setup first.
Reference voices are local-only: put .wav files under src/caw/assets/,
using filenames without spaces. The filename stem is the scene name. If no
reference audio is found, caw prints a prompt explaining where to add it.
Config
caw stores config at:
$XDG_CONFIG_HOME/caw/config.json
Default fallback:
~/.config/caw/config.json
Generated audio is not saved unless --output/-o is provided. Without
--play or --output, caw writes WAV bytes to stdout.
The TTS config stores:
{
"tts": {
"api_key_env": "TTS_API_KEY",
"base_url": "https://example.com/v1/",
"model": "your-model"
},
"audio": {
"pulse_server": "unix:/tmp/pulse-socket"
}
}
DGX Spark Audio Output
If you use caw on NVIDIA DGX Spark, a driverless USB speaker is the simplest playback option.
DGX Spark exposes USB-C ports and commonly works with USB Audio Class output devices without extra vendor drivers. If caw generates a .wav file correctly but you do not hear audio, verify that the USB speaker is detected and selected as the active output device.
Useful checks:
aplay -l
lsusb
pactl list short sinks
speaker-test -c 2 -t wav
aplay /usr/share/sounds/alsa/Front_Center.wav
If the USB speaker appears in pactl list short sinks, set it as the default output:
pactl set-default-sink <sink_name>
Development
Local quality checks are enforced with pre-commit.
Run:
pre-commit run --all-files
The active checks are:
ruff-checkruff-formatpyrefly-check
The repository keeps test code and CI command code separate:
- application source:
src/caw/ - tests:
tests/
The type check is executed through uv from inside the package directory:
uv run --frozen --with pyrefly==0.47.0 pyrefly check src/caw
CI
GitHub Actions CI is split into focused workflows:
CI TestsCI RuffCI PyreflyCI Smoke
Each workflow runs the tool command directly instead of wrapping CI steps in custom Python helper scripts.
If you change packaging, CLI entrypoints, Python source under src/caw, or tests under tests/, keep all workflows passing.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file caw_tts-0.1.0.tar.gz.
File metadata
- Download URL: caw_tts-0.1.0.tar.gz
- Upload date:
- Size: 15.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
933f2a2e9ec03f103e3bb4ae044456b2d04be77fa0640c977515db4be0ec8c13
|
|
| MD5 |
97894a60c7ccfd66f866293669cd06e0
|
|
| BLAKE2b-256 |
eaf3e42322e380a88d2bf2aa3f7c8b9e0223f1c0469f40733f201418c2e594b6
|
File details
Details for the file caw_tts-0.1.0-py3-none-any.whl.
File metadata
- Download URL: caw_tts-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f9f0a97055f4ff0046abb9b37102520db92f7e3df31b39844c44f614522fbbfe
|
|
| MD5 |
fe50c731eb12c6ff40ddf9fcf3065a05
|
|
| BLAKE2b-256 |
65f9b97c75f7727b791010826c52554fe11d03cc4628454d1973cdd21547cf75
|