AquaSynth/docs/verse-service-contract.md
2026-06-03 04:34:31 +01:00

4.1 KiB

AquaSynth Verse Service Contract

AquaSynth is the synth daemon. It accepts .aqua DSL and speech/utterance control documents, compiles Faust-native instruments, returns live instrument handles, and publishes controllable audio/render state through CultMesh and Eve.

Authority

Owner: AquaSynth.

Inputs:

  • .aqua patch DSL
  • weksa.utterance_handoff.v0
  • weksa.utterance_embedding_handoff.v0.1
  • learned phonetic realization and synth-driver model state
  • render, sampling, and live-control requests

Outputs:

  • aquasynth.patch_graph.v0
  • aquasynth.faust_source.v0
  • aquasynth.compiled_instrument.v0
  • aquasynth.instrument_handle.v0
  • aquasynth.control_session.v0
  • aquasynth.render_sample.v0
  • Eve/CultUI surfaces for patch graphs, compile products, live controls, and speech-training/render status

Weksa owns conversational intent and utterance lowering. AquaSynth owns the learned utterance embedding, synth-driver automation, Faust compilation, native binary lifetime, live instrument handles, control sessions, and sampled outputs.

CultCache Witnesses

  • .aquasynth/provider-advertisement.cc: read-only provider advertisement witness.
  • .aquasynth/patches/{patchId}.cc: parsed .aqua patch graphs and semantic control catalogs.
  • .aquasynth/faust/{compileId}.cc: emitted Faust source, compile options, diagnostics, and artifact references.
  • .aquasynth/instruments/{instrumentId}.cc: compiled native binary, ABI, control catalog, architecture target, and lifecycle receipts.
  • .aquasynth/sessions/{sessionId}.cc: live instrument handle, lease, control values, transport state, and teardown receipt.
  • .aquasynth/renders/{renderId}.cc: offline/live sample outputs, feature measurements, and scoring receipts.
  • .aquasynth/speech/{utteranceId}.cc: Weksa handoff consumption, packed utterance embeddings, synth-driver outputs, and render receipts.

CultMesh Verses

  • aquasynth.service: service identity, version, schema catalog, and health.
  • aquasynth.patch: .aqua parse/validation/graph state.
  • aquasynth.compile: Faust emission, native compilation, diagnostics, and artifact handles.
  • aquasynth.instrument: compiled instrument handles, control catalogs, and lifecycle state.
  • aquasynth.speech: utterance embedding, speech-driver, and render-training state.
  • aquasynth.operator: daemon status, queue pressure, toolchain readiness, witness freshness, and degraded-mode visibility.

Eve Surfaces

  • aquasynth.eve.patch_graph.v0: inspect parsed .aqua graphs and semantic control catalogs.
  • aquasynth.eve.compile_queue.v0: inspect Faust compile jobs, diagnostics, native binary handles, and failures.
  • aquasynth.eve.instrument_control.v0: control a live instrument handle like an instrument, with stable parameters, ranges, and session leases.
  • aquasynth.eve.speech_training.v0: inspect Weksa handoffs, packed utterance embeddings, synth-driver output, render loss, and sample receipts.
  • aquasynth.eve.operator.v0: compact daemon state, toolchain status, queues, and witness freshness.

Commands

  • patch.compile: parse .aqua, emit Faust, compile a native target, and return an instrument handle.
  • instrument.open: allocate or attach to a compiled instrument session.
  • instrument.control: set one or more stable semantic controls.
  • instrument.sample: sample a live or offline instrument output.
  • speech.realize: consume a Weksa utterance handoff and produce synth-driver controls plus render receipts.
  • provider.advertise: publish gamecult.eve.provider_advertisement.v1.

Every command must commit typed receipts through the same derivation path used by any CLI or worker. A dashboard, REPL, worker loop, or native host must not invent a separate truth for compiled products or control state.

Forbidden Writers

  • Weksa does not compile Faust or own instrument controls.
  • Eve lowerings do not own compiled binary lifetime or control truth.
  • Faust source is an emitted artifact, not the semantic patch owner.
  • Native host handles cannot silently override CultMesh session state.
  • Render samples are evidence, not patch identity.