Skip to main content

caw

CI Tests CI Ruff CI Pyrefly CI Smoke Python

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 wav audio 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-check
  • ruff-format
  • pyrefly-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 Tests
  • CI Ruff
  • CI Pyrefly
  • CI 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.

Metadata

Release files for caw-tts 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for caw-tts 0.1.0
File Size Uploaded Provenance Actions
caw_tts-0.1.0.tar.gz 15.1 kB Without provenance Details for caw_tts-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for caw-tts 0.1.0
File Interpreter ABI Platform Actions
caw_tts-0.1.0-py3-none-any.whl Python 3 none any Details for caw_tts-0.1.0-py3-none-any.whl

Total release size: 26.5 kB

Release files / caw_tts-0.1.0.tar.gz

Download URL caw_tts-0.1.0.tar.gz
Size 15.1 kB
Tags Source
SHA-256 checksum
How to use checksums
933f2a2e9ec03f103e3bb4ae044456b2d04be77fa0640c977515db4be0ec8c13
BLAKE2b-256 checksum
How to use checksums
eaf3e42322e380a88d2bf2aa3f7c8b9e0223f1c0469f40733f201418c2e594b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / caw_tts-0.1.0-py3-none-any.whl

Download URL caw_tts-0.1.0-py3-none-any.whl
Size 11.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f9f0a97055f4ff0046abb9b37102520db92f7e3df31b39844c44f614522fbbfe
BLAKE2b-256 checksum
How to use checksums
65f9b97c75f7727b791010826c52554fe11d03cc4628454d1973cdd21547cf75
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Security for caw-tts 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page