Skip to main content

Wake-word inference for Python. High-level API over sonnetics-core.

Project description

sonnetics (Python)

CI PyPI version Python versions License Documentation

Add a custom “Hey ___” wake word to your project—train a phrase on 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.

Get a model

  1. Sign in and create a wake word on the 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

pip install sonnetics

Or with uv:

uv add sonnetics

Requires Python 3.9+.

Quick start

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/:

See the Python documentation 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sonnetics-0.0.1b4.tar.gz (311.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sonnetics-0.0.1b4-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

Details for the file sonnetics-0.0.1b4.tar.gz.

File metadata

  • Download URL: sonnetics-0.0.1b4.tar.gz
  • Upload date:
  • Size: 311.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sonnetics-0.0.1b4.tar.gz
Algorithm Hash digest
SHA256 95e95b7b92b5f2cca9109a47879d391cd708546566ec56adc90458f928f88186
MD5 a949326db52a98c7783ea00cf2447c4d
BLAKE2b-256 f6a49395b7552501a356ab1190046193c0cadc131b7fe165d4a7067b42233f40

See more details on using hashes here.

Provenance

The following attestation bundles were made for sonnetics-0.0.1b4.tar.gz:

Publisher: publish-pypi.yml on sonnetics/sonnetics-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sonnetics-0.0.1b4-py3-none-any.whl.

File metadata

  • Download URL: sonnetics-0.0.1b4-py3-none-any.whl
  • Upload date:
  • Size: 12.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sonnetics-0.0.1b4-py3-none-any.whl
Algorithm Hash digest
SHA256 003c9ebfd14b8d2bf9a282dca6007d5c688dd68aacee72a0540bb328cefce747
MD5 20fd6efbe24d46ff1a5eeb8dd6b962d9
BLAKE2b-256 a083db6993b930d0e473f471c9743e4b561b043fc177dadba8e5f1afa2754fb9

See more details on using hashes here.

Provenance

The following attestation bundles were made for sonnetics-0.0.1b4-py3-none-any.whl:

Publisher: publish-pypi.yml on sonnetics/sonnetics-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page