Python reference implementation of the Sonic Field akousma sonic-memory protocol (part of Earworm).
Project description
akousma (Python)
Reference implementation of the Sonic Field akousma sonic-memory protocol. Consumed by oída, germ (backend), and algophony (pipelines) so all three share one memory layer with one lineage model.
Spec: earworm/docs/akousma_spec_v1.md ·
Store: earworm/docs/akousmata-store.md
Install
cd packages/py-akousma
pip install -e .
Use
import akousma
# Build + validate a record
rec = akousma.new_akousma(
audio={"asset_id": "asset_1", "content_hash": "sha256:...", "duration_seconds": 10.0},
originating_app="oida", source_type="recorded", origin="live-input",
listening={"oida.signal": {"class": "music-like"}},
)
assert akousma.is_valid(rec)
# Optional v1.4 accountable-listening index. The full producer report remains
# namespaced in `listening`; the auditum keeps attribution and references.
rec["auditum"] = akousma.auditum(listenings=[{
"listening_id": "lst_1",
"listener_id": "oida",
"listener_type": "agent",
"created_at": rec["created_at"],
"report_namespace": "oida.signal",
"contract": "akouo/v0.8",
}])
# Shared store (platform application-data directory, or $AKOUSMATA_PATH)
with akousma.AkousmataStore() as store:
uri = store.put_audio(open("clip.wav", "rb").read()) # content-addressed
rec["audio"]["uri"] = uri
store.put(rec)
child = akousma.new_akousma(
audio={"asset_id": "asset_2"}, originating_app="germ",
source_type="generated", origin="generated",
parent_akousma_ids=[rec["akousma_id"]], operation="transform", prompt="make it metallic",
)
store.put(child)
store.ancestors(child["akousma_id"]) # -> [rec["akousma_id"]] (germ lineage explorer)
store.query(originating_app="oida") # -> [rec] (algophony batch)
store.query(has_auditum=True) # accountable v1.4 records
store.query(has_disagreement=True) # plural hearings with preserved differences
The bundled akousma/akousma.schema.json is the canonical schema, kept in sync with
earworm/packages/core/schemas/akousma.schema.json.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file akousma-0.5.0.tar.gz.
File metadata
- Download URL: akousma-0.5.0.tar.gz
- Upload date:
- Size: 19.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08934629b146703fdb4c8c49358ae8dcac6e705e6d8def4ea3084d5d7c2ea4f1
|
|
| MD5 |
2ca847361f1fbfd6a6e91e46ac683cb2
|
|
| BLAKE2b-256 |
af66a9d5aa7a8a48fbec79b9867a469b97f8427bca489fa870d06903bc47b6e4
|
Provenance
The following attestation bundles were made for akousma-0.5.0.tar.gz:
Publisher:
python-release.yml on sonicfieldlabs/oida
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
akousma-0.5.0.tar.gz -
Subject digest:
08934629b146703fdb4c8c49358ae8dcac6e705e6d8def4ea3084d5d7c2ea4f1 - Sigstore transparency entry: 2223158859
- Sigstore integration time:
-
Permalink:
sonicfieldlabs/oida@f29c0144d135fd1c63b744308e13ccd044dea992 -
Branch / Tag:
refs/tags/v0.8.0 - Owner: https://github.com/sonicfieldlabs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-release.yml@f29c0144d135fd1c63b744308e13ccd044dea992 -
Trigger Event:
push
-
Statement type:
File details
Details for the file akousma-0.5.0-py3-none-any.whl.
File metadata
- Download URL: akousma-0.5.0-py3-none-any.whl
- Upload date:
- Size: 16.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18c018b736fdde5c5b84cbded48e7ccd2a8a6b71000a1979b4d99ab124c09021
|
|
| MD5 |
f5c7edb6d7065f8dbbcbde929862a89a
|
|
| BLAKE2b-256 |
6ffc1712085b4fde70ce72e6495953f931d4b222f81c3616f811d180d6d01df0
|
Provenance
The following attestation bundles were made for akousma-0.5.0-py3-none-any.whl:
Publisher:
python-release.yml on sonicfieldlabs/oida
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
akousma-0.5.0-py3-none-any.whl -
Subject digest:
18c018b736fdde5c5b84cbded48e7ccd2a8a6b71000a1979b4d99ab124c09021 - Sigstore transparency entry: 2223159088
- Sigstore integration time:
-
Permalink:
sonicfieldlabs/oida@f29c0144d135fd1c63b744308e13ccd044dea992 -
Branch / Tag:
refs/tags/v0.8.0 - Owner: https://github.com/sonicfieldlabs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-release.yml@f29c0144d135fd1c63b744308e13ccd044dea992 -
Trigger Event:
push
-
Statement type: