Metadata-Version: 2.4
Name: sonnetics
Version: 0.0.1b4
Summary: Wake-word inference for Python. High-level API over sonnetics-core.
Project-URL: Homepage, https://sonnetics.com
Project-URL: Documentation, https://sonnetics.com/documentation/python
Project-URL: Repository, https://github.com/sonnetics/sonnetics-py
Project-URL: Issues, https://github.com/sonnetics/sonnetics-py/issues
License: Apache-2.0
License-File: LICENSE
License-File: NOTICE
Keywords: audio,speech,voice,voice-command,wake-word
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.9
Requires-Dist: httpx>=0.27
Requires-Dist: numpy>=2.0.2
Requires-Dist: sonnetics-core>=0.0.1b16
Requires-Dist: sounddevice>=0.4
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
Requires-Dist: pytest>=8; extra == 'dev'
Description-Content-Type: text/markdown

# sonnetics (Python)

[![CI](https://github.com/sonnetics/sonnetics-py/actions/workflows/ci.yml/badge.svg)](https://github.com/sonnetics/sonnetics-py/actions/workflows/ci.yml)
[![PyPI version](https://img.shields.io/pypi/v/sonnetics.svg)](https://pypi.org/project/sonnetics/)
[![Python versions](https://img.shields.io/pypi/pyversions/sonnetics.svg)](https://pypi.org/project/sonnetics/)
[![License](https://img.shields.io/pypi/l/sonnetics.svg)](https://github.com/sonnetics/sonnetics-py/blob/main/LICENSE)
[![Documentation](https://img.shields.io/badge/docs-sonnetics.com-blue)](https://sonnetics.com/documentation/python)

Add a custom “Hey ___” wake word to your project—train a phrase on [sonnetics.com](https://sonnetics.com), then run detection **locally** with this library. No audio leaves your machine; the client is open source and does not phone home.

High-level Python API over [sonnetics-core](https://github.com/sonnetics/sonnetics-core).

## Get a model

1. Sign in and create a wake word on the [Model Dashboard](https://sonnetics.com/model-dashboard) (training is free; you’ll get an email when it’s ready).
2. Copy your **model ID** from the dashboard and use it below.

Treat the model ID like a secret link—anyone with it can download your model file.

## Install

```bash
pip install sonnetics
```

Or with [uv](https://docs.astral.sh/uv/):

```bash
uv add sonnetics
```

Requires Python 3.9+.

## Quick start

```python
from sonnetics import WakeWordDetector

detector = WakeWordDetector.create(
    model_id="your-model-id",
)

for event in detector.listen():
    print(f"Detected: {event.phrase}")
    break
```

`listen()` blocks on the default microphone until a detection.

## Examples

More samples in [`examples/`](examples/):

See the [Python documentation](https://sonnetics.com/documentation/python) for full API details.

## Configuration

Set `SONNETICS_CACHE_DIR` to change where downloaded models are stored (default: `~/.cache/sonnetics` on Linux). Handy in CI, containers, or read-only home directories.

## Links

- [Full Python docs](https://sonnetics.com/documentation/python)
- [All client libraries](https://sonnetics.com/documentation) (JavaScript, Rust)
- [Issues](https://github.com/sonnetics/sonnetics-py/issues) · [support@sonnetics.com](mailto:support@sonnetics.com)
