sonara-client
Talk to the Sonara text-to-speech runtime from Python 3.9+. Standard library only.
import sonara_client
with sonara_client.connect("my-app", runtime_path=r"C:\path\to\sonarad.exe") as sonara:
item = sonara.speak("Hello.", label="greeting")
sonara.set("rate", 240)
with sonara.subscribe(["state", "items"]) as events:
for e in events:
if e["event"] == "item" and e["item_id"] == item and e["phase"] != "started":
break
connect(client_name, *, runtime_path=None, home=None, autostart=True, require=(), extensions=(), keep_alive=False): finds the shared runtime throughruntime.json, starts the bundledsonarad.exewhen none is usable (runtime_path, defaultSONARA_RUNTIME), takes over an idle incompatible one.speak(text, mode=None, interrupt=None, label=None)returns the item id;control(action);set(key, value)/get(key);voices(engine=None).subscribe(events)opens an event stream on its own connection: iterate it, orread(timeout).request(type, fields=None, timeout=None)sends any message. Each request waits up toconnect(..., timeout=10.0)seconds,engine_testand a providerrefreshat least 90 s; no reply in time closes the client. A request over 1 MiB (UTF-8) is refused withE_BAD_REQUESTand the client stays open.channels,agent,system: extension namespaces that send the protocol's extension messages as they are.- Errors are
SonaraErrorwith acode. The client is thread-safe.
Guide: Bundle Sonara in your app. Tests: python -m pytest clients/python/tests -q (the end-to-end ones need cargo build -p sonarad).
MIT. Ship THIRD_PARTY_NOTICES.md with an app that bundles the runtime.
Metadata
Release files for sonara-client 0.32.17
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 | |
|---|---|---|---|---|
| sonara_client-0.32.17.tar.gz | 21.7 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sonara_client-0.32.17-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 39.5 kB
Release files / sonara_client-0.32.17.tar.gz
| Download URL | sonara_client-0.32.17.tar.gz |
|---|---|
| Size | 21.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9920cebd5ac59c3b50e9e2edbbf27859855925e9abe383c519149ba04b0bab2a
|
|
BLAKE2b-256 checksum How to use checksums |
c2c377296d85795a0894ab03b02190cdb8a5c5200131a1f06d196baa6e6e3f87
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.
Transparency logRelease files / sonara_client-0.32.17-py3-none-any.whl
| Download URL | sonara_client-0.32.17-py3-none-any.whl |
|---|---|
| Size | 17.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6f322cec3cf469fd745c1a417db184ae82e7f8d0d7b71dd88e084f3321e680ee
|
|
BLAKE2b-256 checksum How to use checksums |
4a00915d7ee5406f5cc20266c9b1548c1062cd88e91c68a6e5ba58126737c331
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.
Transparency logSecurity for sonara-client 0.32.17
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for sonara_client-0.32.17.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.
Transparency logA 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.