macos-say-server
Expose macOS say as an HTTP server that provides text-to-speech audio generation.
Features
GET /healthfor liveness checks.GET /voicesto list the voices available fromsay -v '?'.GET /cache/statsto inspect current cache usage and limits.GET /speak?text=...&voice=...to return AIFF audio directly.POST /speakwith JSON{ "text": "...", "voice": "..." }to return AIFF audio.- Disk-backed AIFF cache keyed by
text + voice, with lazy TTL cleanup.
Run
uv sync
uv run macos-say-server
The server binds to 127.0.0.1:2576 by default.
Use startup arguments to override bind settings:
uv run macos-say-server --host 127.0.0.1 --port 2576
You can also run the package module directly:
uv run python -m macos_say_server --host 127.0.0.1 --port 2576
Build
uv build
Cache
The service stores generated audio under .cache/audio by default.
- Cache key: hash of
text + voice - Expiration:
CACHE_TTL_SECONDS, default86400seconds - Cleanup: lazy cleanup during requests, at most once per
CACHE_CLEANUP_INTERVAL_SECONDS, default300seconds - On cache hit, the file timestamp is refreshed, so TTL is sliding rather than fixed from first generation
- Capacity control: optional LRU-style pruning using file modification time
- File count limit:
CACHE_MAX_FILES, default0meaning unlimited - Total size limit:
CACHE_MAX_BYTES, default0meaning unlimited
When a cache limit is configured, the oldest entries are removed first. Because cache hits refresh the file timestamp, frequently used items stay warm and cold items are evicted first.
GET /cache/stats returns:
cache_dirand whether it currently existstotal_filesandtotal_bytesexpired_filesunder the current TTL view- configured
ttl_seconds, cleanup interval, and capacity limits - oldest and newest cache entry timestamps
Startup arguments:
uv run macos-say-server \
--cache-dir .cache/audio \
--cache-ttl-seconds 86400 \
--cache-cleanup-interval-seconds 300 \
--cache-max-files 0 \
--cache-max-bytes 0
Examples
curl http://127.0.0.1:2576/health
curl http://127.0.0.1:2576/voices
curl http://127.0.0.1:2576/cache/stats
curl -G http://127.0.0.1:2576/speak --data-urlencode "text=hello from macos say server" --output speech.aiff
curl -i -G http://127.0.0.1:2576/speak --data-urlencode "text=hello from macos say server" --output speech.aiff
curl -X POST http://127.0.0.1:2576/speak \
-H "content-type: application/json" \
-d '{"text":"hello from json","voice":"Samantha"}' \
--output speech.aiff
If you inspect response headers, X-Cache: MISS means the file was newly synthesized, and X-Cache: HIT means it was served from cache.
Metadata
Release files for macos-say-server 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| macos_say_server-0.1.0.tar.gz | 123.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| macos_say_server-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 131.1 kB
Release files / macos_say_server-0.1.0.tar.gz
| Download URL | macos_say_server-0.1.0.tar.gz |
|---|---|
| Size | 123.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fed8792c01ba45457a1d9a01de4e42ae4fcb599433bdd80a5bc5605f0dd5f1fc
|
|
BLAKE2b-256 checksum How to use checksums |
b0544ce4961fee8e07df5d74a169061cae7a17731f09ad7c31622e190fb710b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / macos_say_server-0.1.0-py3-none-any.whl
| Download URL | macos_say_server-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
88061233eb91f2502e853716d073dd8f283b1f5a9f6041511f3eae9fae95b0a7
|
|
BLAKE2b-256 checksum How to use checksums |
abecd293f913dfac01f875f5d7546fd5ea498f7ce5c0001f12b1e762bf17c987
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for macos-say-server 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.