From 40fa84b39f361065c6da6edf5823311635cfeb7b Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Wed, 20 May 2026 22:36:28 +0100 Subject: [PATCH] Add wet-voice-01 witness scaffold for topic_040d9807-2efa-4f89-acce-ca05300bfc2a --- README.md | 4 + state/map.yaml | 1 + .../Fixtures/Speech/WetVoice01/README.md | 33 +++++ .../Speech/WetVoice01/automation-trace.json | 80 ++++++++++++ .../Fixtures/Speech/WetVoice01/notes.json | 30 +++++ .../Speech/WetVoice01/render/RENDER.md | 15 +++ .../WetVoice01/structured-utterance.json | 50 ++++++++ .../structured-utterance.schema.json | 118 ++++++++++++++++++ .../WetVoiceWitnessFixtureTests.cs | 62 +++++++++ 9 files changed, 393 insertions(+) create mode 100644 tests/AquaSynth.Dsl.Tests/Fixtures/Speech/WetVoice01/README.md create mode 100644 tests/AquaSynth.Dsl.Tests/Fixtures/Speech/WetVoice01/automation-trace.json create mode 100644 tests/AquaSynth.Dsl.Tests/Fixtures/Speech/WetVoice01/notes.json create mode 100644 tests/AquaSynth.Dsl.Tests/Fixtures/Speech/WetVoice01/render/RENDER.md create mode 100644 tests/AquaSynth.Dsl.Tests/Fixtures/Speech/WetVoice01/structured-utterance.json create mode 100644 tests/AquaSynth.Dsl.Tests/Fixtures/Speech/WetVoice01/structured-utterance.schema.json create mode 100644 tests/AquaSynth.Dsl.Tests/WetVoiceWitnessFixtureTests.cs diff --git a/README.md b/README.md index a0d7d51..58b885a 100644 --- a/README.md +++ b/README.md @@ -127,6 +127,10 @@ metadata -> utterance embedding -> synth automation -> vocal-tract/rendered-loss parity. The first proof path uses tiny eSpeak NG fixtures, log-mel evidence, packed C# backprop, and compiled Faust speech controls so many candidate weights can be tested against generated speech references without recompiling topology. +The named audible witness for that lane lives at +`tests/AquaSynth.Dsl.Tests/Fixtures/Speech/WetVoice01/`: Weksa-owned structured +utterance in, AquaSynth-owned automation/render receipts out, all inspectable +enough to diff when the machine mutates. The modular graph surface, SFXR atoms, DX7/Zyn reference work, script scoring, audio comparison, presets, Faust emission, native Faust compilation/rendering, diff --git a/state/map.yaml b/state/map.yaml index 81fda63..05fd22c 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -18,6 +18,7 @@ surfaces: reference_roadmap: docs/reference-synth-roadmap.md ipa_vocal_tract_roadmap: docs/ipa-vocal-tract-roadmap.md utterance_parity_research: docs/utterance-parity-research.md + wet_voice_witness_fixture: tests/AquaSynth.Dsl.Tests/Fixtures/Speech/WetVoice01 faust_toolchain_boundary: docs/faust-toolchain-boundary.md dx7_public_domain_fixtures: tests/AquaSynth.Dsl.Tests/Fixtures/Dx7/PublicDomain zyn_reference_source: external/zynaddsubfx diff --git a/tests/AquaSynth.Dsl.Tests/Fixtures/Speech/WetVoice01/README.md b/tests/AquaSynth.Dsl.Tests/Fixtures/Speech/WetVoice01/README.md new file mode 100644 index 0000000..2ad976d --- /dev/null +++ b/tests/AquaSynth.Dsl.Tests/Fixtures/Speech/WetVoice01/README.md @@ -0,0 +1,33 @@ +# wet-voice-01 + +`wet-voice-01` is the named audible witness for AquaSynth's utterance lane. +It is not a model dump, not a benchmark suite, and not a universal schema. +It is one tiny canary with enough pinned paperwork to keep the boundary and the +evidence visible while the machine changes around it. + +## Boundary + +- Weksa owns conversational intent, semantics, and lowering into the structured + utterance in [`structured-utterance.json`](structured-utterance.json). +- AquaSynth owns the lowering from that structured utterance into tract/synth + automation in [`automation-trace.json`](automation-trace.json) and into the + audible render described under [`render/`](render/). + +If a future stage needs meaning that is not present in the structured +utterance, the fix is to extend the utterance contract visibly. Do not smuggle +semantics into an opaque embedding blob and call it progress. + +## File Layout + +- `structured-utterance.schema.json`: pinned schema for the Weksa -> AquaSynth + handoff artifact. +- `structured-utterance.json`: one inspectable utterance instance. +- `automation-trace.json`: the AquaSynth-owned lowering receipt from utterance + to automation targets and gestures. +- `render/RENDER.md`: render slot and instructions while no committed witness + audio exists yet. +- `notes.json`: timing, confidence, provenance, and current limitations. + +This witness was introduced for Bifrost topic +`topic_040d9807-2efa-4f89-acce-ca05300bfc2a` so the speech lane has an address +instead of a rumor. diff --git a/tests/AquaSynth.Dsl.Tests/Fixtures/Speech/WetVoice01/automation-trace.json b/tests/AquaSynth.Dsl.Tests/Fixtures/Speech/WetVoice01/automation-trace.json new file mode 100644 index 0000000..6aeff2f --- /dev/null +++ b/tests/AquaSynth.Dsl.Tests/Fixtures/Speech/WetVoice01/automation-trace.json @@ -0,0 +1,80 @@ +{ + "witnessId": "wet-voice-01", + "status": "scaffold", + "ownedBy": "AquaSynth", + "inputArtifact": "structured-utterance.json", + "targetProfile": "human-ish single-tract provisional profile", + "automationStages": [ + { + "stageId": "utterance-to-gestural-plan", + "description": "Interpret segment timing and stress as tract gestures.", + "inspectableOutputs": [ + "gesture windows", + "coarticulation overlap", + "control-rate targets" + ] + }, + { + "stageId": "gestural-plan-to-synth-controls", + "description": "Lower gestures into tract, source, and filter automation lanes.", + "inspectableOutputs": [ + "tongue body curve", + "tongue tip curve", + "lip aperture curve", + "velum curve", + "glottal tenseness curve", + "turbulence curve", + "pressure curve", + "filter cutoff curve" + ] + } + ], + "events": [ + { + "segmentId": "seg-1", + "label": "wa", + "startMs": 0, + "durationMs": 180, + "targets": { + "tongueBody": 0.42, + "lipAperture": 0.72, + "lipRounding": 0.64, + "glottalTenseness": 0.48, + "pressure": 0.3 + } + }, + { + "segmentId": "seg-2", + "label": "ta", + "startMs": 180, + "durationMs": 170, + "targets": { + "tongueTip": 0.88, + "lipAperture": 0.28, + "glottalTenseness": 0.24, + "pressure": 0.84, + "turbulence": 0.18 + } + }, + { + "segmentId": "seg-3", + "label": "sha", + "startMs": 350, + "durationMs": 220, + "targets": { + "tongueBody": 0.5, + "tongueTip": 0.7, + "lipAperture": 0.56, + "glottalTenseness": 0.38, + "pressure": 0.66, + "turbulence": 0.91, + "filterCutoff": 0.81 + } + } + ], + "gaps": [ + "No committed generated automation from production code yet; this file is the pinned shape and starter witness receipt.", + "No coarticulation solver receipt yet.", + "No compiled render artifact receipt yet." + ] +} diff --git a/tests/AquaSynth.Dsl.Tests/Fixtures/Speech/WetVoice01/notes.json b/tests/AquaSynth.Dsl.Tests/Fixtures/Speech/WetVoice01/notes.json new file mode 100644 index 0000000..7545b04 --- /dev/null +++ b/tests/AquaSynth.Dsl.Tests/Fixtures/Speech/WetVoice01/notes.json @@ -0,0 +1,30 @@ +{ + "witnessId": "wet-voice-01", + "topicId": "topic_040d9807-2efa-4f89-acce-ca05300bfc2a", + "requestId": "req_11d2c7f2-85c6-44ea-9e89-ec7fe0ab5db9", + "timing": { + "utteranceDecisionTimeUtc": "2026-05-20T00:00:00Z", + "targetLatencyBudgetMs": 40, + "observedLatencyMs": null + }, + "confidence": { + "utteranceSemanticConfidence": 0.82, + "automationLoweringConfidence": null, + "renderConfidence": null + }, + "provenance": { + "semanticOwner": "Weksa", + "automationOwner": "AquaSynth", + "renderOwner": "AquaSynth", + "referenceRenderer": "Not pinned yet", + "notes": [ + "This witness is a repo-local scaffold for inspectable parity work.", + "Future automation traces and audio renders should update this file rather than hiding timing or confidence in ad hoc logs." + ] + }, + "currentLimitations": [ + "The structured utterance is pinned, but no production importer consumes this exact JSON yet.", + "The automation trace is a scaffold receipt, not a generated output from the learning lane.", + "The render slot is instructions only until AquaSynth owns a stable committed witness audio policy." + ] +} diff --git a/tests/AquaSynth.Dsl.Tests/Fixtures/Speech/WetVoice01/render/RENDER.md b/tests/AquaSynth.Dsl.Tests/Fixtures/Speech/WetVoice01/render/RENDER.md new file mode 100644 index 0000000..5e2bee7 --- /dev/null +++ b/tests/AquaSynth.Dsl.Tests/Fixtures/Speech/WetVoice01/render/RENDER.md @@ -0,0 +1,15 @@ +# Render Slot + +This directory is the audible slot for `wet-voice-01`. + +Expected future artifact names: + +- `wet-voice-01.reference.wav`: pinned external or oracle reference render. +- `wet-voice-01.aquasynth.wav`: AquaSynth-rendered candidate for comparison. +- `render-report.md`: short notes on toolchain, timing, confidence, and known + lies. + +No audio file is committed yet because the repo does not have a settled policy +for checked-in witness WAVs. Until that lands, this directory remains the named +render address and the witness stays honest about the gap instead of spraying +untracked artifacts into `artifacts/` and pretending that counts as a contract. diff --git a/tests/AquaSynth.Dsl.Tests/Fixtures/Speech/WetVoice01/structured-utterance.json b/tests/AquaSynth.Dsl.Tests/Fixtures/Speech/WetVoice01/structured-utterance.json new file mode 100644 index 0000000..ff8bca8 --- /dev/null +++ b/tests/AquaSynth.Dsl.Tests/Fixtures/Speech/WetVoice01/structured-utterance.json @@ -0,0 +1,50 @@ +{ + "witnessId": "wet-voice-01", + "language": "weksa-prototype", + "gloss": "The water is awake.", + "speakerProfile": { + "id": "weksa-default-observer", + "morphology": "human-ish single-tract provisional profile", + "style": { + "breathiness": 0.32, + "speakingRate": 0.9, + "intensity": 0.58 + } + }, + "segments": [ + { + "id": "seg-1", + "surface": "wa", + "ipa": "wa", + "startMs": 0, + "durationMs": 180, + "stress": 0.68 + }, + { + "id": "seg-2", + "surface": "ta", + "ipa": "ta", + "startMs": 180, + "durationMs": 170, + "stress": 0.54 + }, + { + "id": "seg-3", + "surface": "sha", + "ipa": "Sa", + "startMs": 350, + "durationMs": 220, + "stress": 0.74 + } + ], + "timingHints": { + "targetDurationMs": 570, + "latencyBudgetMs": 40, + "phraseBoundaryAfterMs": 570 + }, + "provenance": { + "semanticOwner": "Weksa", + "transportTopicId": "topic_040d9807-2efa-4f89-acce-ca05300bfc2a", + "notes": "Structured utterance is the inspectable handoff into AquaSynth. Meanings, gloss, and segment identity stay here rather than in a learned embedding artifact." + } +} diff --git a/tests/AquaSynth.Dsl.Tests/Fixtures/Speech/WetVoice01/structured-utterance.schema.json b/tests/AquaSynth.Dsl.Tests/Fixtures/Speech/WetVoice01/structured-utterance.schema.json new file mode 100644 index 0000000..d496757 --- /dev/null +++ b/tests/AquaSynth.Dsl.Tests/Fixtures/Speech/WetVoice01/structured-utterance.schema.json @@ -0,0 +1,118 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://aquasynth.local/fixtures/speech/wet-voice-01/structured-utterance.schema.json", + "title": "AquaSynth Structured Utterance Witness", + "type": "object", + "required": [ + "witnessId", + "language", + "gloss", + "speakerProfile", + "segments", + "timingHints", + "provenance" + ], + "properties": { + "witnessId": { + "const": "wet-voice-01" + }, + "language": { + "type": "string", + "minLength": 1 + }, + "gloss": { + "type": "string", + "minLength": 1 + }, + "speakerProfile": { + "type": "object", + "required": [ + "id", + "morphology" + ], + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "morphology": { + "type": "string", + "minLength": 1 + } + }, + "additionalProperties": true + }, + "segments": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "id", + "surface", + "ipa", + "startMs", + "durationMs" + ], + "properties": { + "id": { + "type": "string", + "minLength": 1 + }, + "surface": { + "type": "string", + "minLength": 1 + }, + "ipa": { + "type": "string", + "minLength": 1 + }, + "startMs": { + "type": "number", + "minimum": 0 + }, + "durationMs": { + "type": "number", + "exclusiveMinimum": 0 + } + }, + "additionalProperties": true + } + }, + "timingHints": { + "type": "object", + "required": [ + "targetDurationMs", + "latencyBudgetMs" + ], + "properties": { + "targetDurationMs": { + "type": "number", + "exclusiveMinimum": 0 + }, + "latencyBudgetMs": { + "type": "number", + "minimum": 0 + } + }, + "additionalProperties": true + }, + "provenance": { + "type": "object", + "required": [ + "semanticOwner", + "transportTopicId" + ], + "properties": { + "semanticOwner": { + "const": "Weksa" + }, + "transportTopicId": { + "const": "topic_040d9807-2efa-4f89-acce-ca05300bfc2a" + } + }, + "additionalProperties": true + } + }, + "additionalProperties": true +} diff --git a/tests/AquaSynth.Dsl.Tests/WetVoiceWitnessFixtureTests.cs b/tests/AquaSynth.Dsl.Tests/WetVoiceWitnessFixtureTests.cs new file mode 100644 index 0000000..8529ef7 --- /dev/null +++ b/tests/AquaSynth.Dsl.Tests/WetVoiceWitnessFixtureTests.cs @@ -0,0 +1,62 @@ +using System.Text.Json; + +namespace AquaSynth.Dsl.Tests; + +public sealed class WetVoiceWitnessFixtureTests +{ + [Fact] + public void WetVoiceWitnessFixtureCarriesInspectableStageArtifacts() + { + var root = Path.Combine(RepositoryRoot(), "tests", "AquaSynth.Dsl.Tests", "Fixtures", "Speech", "WetVoice01"); + Assert.True(Directory.Exists(root), "wet-voice-01 fixture root"); + + var requiredFiles = new[] + { + "README.md", + "structured-utterance.schema.json", + "structured-utterance.json", + "automation-trace.json", + "notes.json", + Path.Combine("render", "RENDER.md") + }; + + foreach (var relativePath in requiredFiles) + { + Assert.True(File.Exists(Path.Combine(root, relativePath)), $"missing witness artifact `{relativePath}`"); + } + } + + [Fact] + public void WetVoiceWitnessDefinesBoundaryAndPinnedMetadata() + { + var root = Path.Combine(RepositoryRoot(), "tests", "AquaSynth.Dsl.Tests", "Fixtures", "Speech", "WetVoice01"); + + using var utterance = JsonDocument.Parse(File.ReadAllText(Path.Combine(root, "structured-utterance.json"))); + using var automation = JsonDocument.Parse(File.ReadAllText(Path.Combine(root, "automation-trace.json"))); + using var notes = JsonDocument.Parse(File.ReadAllText(Path.Combine(root, "notes.json"))); + + Assert.Equal("wet-voice-01", utterance.RootElement.GetProperty("witnessId").GetString()); + Assert.Equal("Weksa", utterance.RootElement.GetProperty("provenance").GetProperty("semanticOwner").GetString()); + Assert.True(utterance.RootElement.GetProperty("segments").GetArrayLength() > 0, "structured utterance segments"); + + Assert.Equal("AquaSynth", automation.RootElement.GetProperty("ownedBy").GetString()); + Assert.True(automation.RootElement.GetProperty("automationStages").GetArrayLength() > 0, "automation stages"); + Assert.True(automation.RootElement.GetProperty("events").GetArrayLength() > 0, "automation events"); + + Assert.Equal("topic_040d9807-2efa-4f89-acce-ca05300bfc2a", notes.RootElement.GetProperty("topicId").GetString()); + Assert.True(notes.RootElement.TryGetProperty("timing", out _), "timing notes"); + Assert.True(notes.RootElement.TryGetProperty("confidence", out _), "confidence notes"); + Assert.True(notes.RootElement.TryGetProperty("provenance", out _), "provenance notes"); + } + + private static string RepositoryRoot() + { + var directory = new DirectoryInfo(AppContext.BaseDirectory); + while (directory is not null && !File.Exists(Path.Combine(directory.FullName, "AquaSynth.sln"))) + { + directory = directory.Parent; + } + + return directory?.FullName ?? throw new InvalidOperationException("could not find repository root"); + } +}