Refine graph voice source radiation parity

This commit is contained in:
Meta Vens 2026-05-26 19:34:21 +01:00
commit 23e375592a
4 changed files with 24 additions and 12 deletions

View file

@ -213,14 +213,18 @@ semantics and a `tract propagation=graph` entry point; the remaining parity
question is whether graph-authored PT compatibility can beat the current weak
`Voice.Tract` baseline.
The parity report now renders both lanes. Current graph evidence is mixed:
nasal, sibilant, and closure-release scores improved in some proxy metrics, but
open/front vowel log-mel cosine remains far below the legacy waveguide lane and
the graph lane needed explicit radiation gain to escape underpowered output.
Baking static tongue/constriction/lip shape into the generated graph path did
not materially move the report, so the next useful pressure is lower-level
source, scattering, radiation, and transient behavior rather than more contour
paperwork.
The parity report now renders both lanes. The latest graph evidence is finally
useful instead of decorative: LF-style glottal shaping plus radiation high-pass
leakage and aperture-weighted turbulence jets raise graph open/front vowel
cosine to 0.6393/0.6596, beating the current legacy waveguide lane at
0.6143/0.6349. Nasal graph cosine is still lower at 0.4607 and its RMS ratio is
too loud at 1.6914, so nasal branch/radiation gain or junction coupling remains
active pressure. Sibilant graph cosine is still weak at 0.2320, but
closure-release graph cosine is now positive at 0.1170 instead of the old
negative waveguide baseline. Baking static tongue/constriction/lip shape into
the generated graph path did not materially move the report; the useful levers
so far are source semantics, radiation impedance, and transient/frication
injection.
## Cut Line

View file

@ -744,7 +744,12 @@ public static class FaustEmitter
var radiationPath = $"/acoustic/radiation/{radiationIndex}";
var opening = $"max(0.0, {parameters.Expression(OwnerField(radiationPath, "opening"), radiationPort.Opening)})";
var loss = $"clip01({parameters.Expression(OwnerField(radiationPath, "loss"), radiationPort.Loss)})";
radiated.Add($"(({string.Join(" + ", ports.Select(port => GraphIncoming(name, port)))}) * {opening} * {loss})");
var highpass = radiationPort.Kind is AcousticRadiationKind.Lip or AcousticRadiationKind.Beak
? "80.0"
: radiationPort.Kind == AcousticRadiationKind.Nostril
? "40.0"
: "20.0";
radiated.Add($"((({string.Join(" + ", ports.Select(port => GraphIncoming(name, port)))}) : fi.highpass(1, {highpass})) * {opening} * {loss})");
}
}
@ -784,12 +789,14 @@ public static class FaustEmitter
var phase = $"os.phasor(1.0, {frequency}{detune})";
return port.Kind switch
{
AcousticSourceKind.Glottal or AcousticSourceKind.Labial =>
AcousticSourceKind.Glottal =>
$"((select2({phase} < (0.42 + clip01({opening}) * 0.36), -0.28 * sin(ma.PI * ({phase} - (0.42 + clip01({opening}) * 0.36)) / max(0.001, 1.0 - (0.42 + clip01({opening}) * 0.36))), sin(ma.PI * {phase} / max(0.001, 0.42 + clip01({opening}) * 0.36))) - (0.12 + {tension} * 0.62) * sin(4.0 * ma.PI * {phase}) + 0.18 * (sin(2.0 * ma.PI * {phase}) - {tension} * 0.35 * sin(4.0 * ma.PI * {phase}))) * {pressure} * (0.45 + 0.75 * pow(max(0.0, {tension}), 0.35)) + no.noise * {noise} * {pressure} * (1.0 - sqrt(max(0.0, {tension})))) * {balance}",
AcousticSourceKind.Labial =>
$"((sin(2.0 * ma.PI * {phase}) - {tension} * 0.35 * sin(4.0 * ma.PI * {phase})) * {pressure} * {opening} + no.noise * {noise} * {pressure} * (1.0 - {tension})) * {balance}",
AcousticSourceKind.Reed =>
$"(ma.tanh(sin(2.0 * ma.PI * {phase}) * (1.0 + {pressure} * 8.0)) * {opening} + no.noise * {noise} * 0.2) * {balance}",
AcousticSourceKind.TurbulenceJet =>
$"no.noise * {noise} * {pressure} * {opening} * {balance}",
$"(no.noise : fi.highpass(2, 900.0 + 2600.0 * clip01(1.0 - {opening}))) * {noise} * {pressure} * clip01((0.8 - {opening}) / 0.8) * {balance}",
AcousticSourceKind.Click =>
$"no.noise * {pressure} * {opening} * exp(0.0 - age * 120.0) * {balance}",
AcousticSourceKind.Synthetic =>

View file

@ -152,3 +152,4 @@
{"timestamp":"2026-05-26T19:10:00+01:00","topic":"physical-voice-graph-wave-clock-and-node-aggregation","claim":"Acoustic graph lowering now honors `wave_clock` delay strategy and aggregates co-located terminals into shared graph nodes. Sources can inject at connected nodes, and graph delay lowers through unit-grid, half-sample, linear fractional, Lagrange, or Thiran/allpass Faust primitives from physical segment length and `ma.SR`.","evidence":"Updated `AcousticGraphExpression` with wave-clock delay selection, same-position terminal node aggregation, connected-node source injection, and basic connection-law expression routing; focused tests `ParserSupportsReusableAcousticPortNetworkPrimitives`, `ParserSupportsTypedAcousticPathGraph`, `FaustCompilerValidatesAcousticPathGraphWhenInstalled`, `ParserSupportsPinkTromboneStyleTractVoice`, and `WaveguideTractDefaultsToAcousticUnitDelayGrid` passed; core build passed."}
{"timestamp":"2026-05-26T19:30:00+01:00","topic":"physical-voice-tract-graph-propagation","claim":"PT-shaped `tract` authoring can now opt into typed acoustic graph audio with `propagation=graph`. Generated tract acoustic networks now include typed terminals/connections, normalized tract-index positions, and a Thiran wave-clock default for graph propagation; legacy `propagation=waveguide` remains available as the old baseline.","evidence":"Added `TractPropagationMode.Graph`, parser alias `propagation=graph`, graph-first Faust routing for tract voices in graph mode, generated tract terminal/connection records, and focused test `TractVoiceCanLowerThroughAcousticGraph`; focused tests and core build passed."}
{"timestamp":"2026-05-26T19:55:00+01:00","topic":"pink-trombone-graph-logmel-evidence","claim":"Pink Trombone parity reporting now renders both legacy waveguide and graph-propagation candidates. Graph output is Faust-valid and audible, but open/front vowel log-mel cosine remains below legacy; nasal graph is near legacy, sibilant score improves while cosine remains low, and closure-release graph cosine becomes positive. Static tongue/constriction/lip baking into graph path did not materially move the latest report, pointing next pressure at source/scattering/radiation/transient behavior.","evidence":"Updated `PinkTromboneParityFixture` with `GraphAquaScript`, parity artifacts now include `candidate-graph.*` and per-lane reports. Latest run under `artifacts/parity/pink-trombone-logmel/20260526T182050731`: open graph cosine 0.3736 vs legacy 0.6143, front 0.3889 vs 0.6349, nasal 0.5318 vs 0.5425, sibilant 0.2102 vs 0.3744, closure 0.1168 vs -0.0820."}
{"timestamp":"2026-05-26T20:25:00+01:00","topic":"pink-trombone-graph-source-radiation-evidence","claim":"Graph source and radiation semantics are now the live parity levers. LF-style glottal flow with a small harmonic pressure blend, graph radiation high-pass leakage, and aperture-weighted high-passed `TurbulenceJet` sources raise graph open/front vowel cosine above the legacy waveguide lane and make closure-release positive. Nasal remains over-loud and sibilant cosine remains weak, so the next pressure is nasal branch/radiation gain or junction coupling plus frication/transient detail.","evidence":"Latest optional PT log-mel run under `artifacts/parity/pink-trombone-logmel`: graph open 0.6393 vs legacy 0.6143, graph front 0.6596 vs legacy 0.6349, graph nasal 0.4607 with RMS ratio 1.6914 vs legacy nasal 0.5425, graph sibilant 0.2320 vs legacy 0.3744, graph closure 0.1170 vs legacy -0.0820."}

View file

@ -118,7 +118,7 @@ live_invariants:
- The physical voice research packet now includes a practical implementation/researcher map (`research/physical-voice-modeling/PEOPLE.md`) and talk/transcript ledger (`research/physical-voice-modeling/talks/TALKS.md`). Birkholz/VocalTractLab pressures multi-level articulatory control and gestures; Story/TubeTalker pressures continuous parametric area functions and length/coupling; Smith pressures bidirectional delay-line scattering and fractional-delay waveguides; Fels/ArtiSynth pressures separation between biomechanics, acoustics, timeline controls, and diagnostics. These are reusable DSL semantics, not modules to clone.
- Physical voice implementation has started moving PT pressure into neutral acoustic owners: `AcousticPath`, `AcousticTerminal`, `AcousticConnection`, `AcousticSourcePort`, `AcousticBranch`, `AcousticRadiationPort`, `WaveClockPolicy`, and `AcousticPortNetwork`. Parser commands `path`, `terminal`, `connect`, `source_port`, `branch`, `radiation_port`, `wave_clock`, and `acoustic_network` now exist. Existing `tract_shape`, `glottis`, `tract_injection`, `nasal_branch`, and `tract` commands populate acoustic records as compatibility aliases while the current `Voice.Tract` Faust renderer still owns audio.
- `acoustic` / `acoustic_voice` can now render an `AcousticPortNetwork` through a compact Faust response proxy or, when typed terminals are present, a compiled bidirectional Faust segment graph. Graph lowering splits paths at terminal positions, aggregates co-located terminals into graph nodes, orders connection ports deterministically, scatters area-weighted/pressure/bypass connection groups, injects source terminals even at connected nodes, and sums radiation terminals. Segment delay follows physical segment length and the network `wave_clock` strategy through unit-grid, half-sample, linear fractional, Lagrange, or Thiran/allpass Faust delay primitives. Source, branch, radiation, terminal, and connection controls can bind through ordinary Aqua parameters into emitted Faust. PT-shaped `tract` authoring can opt into graph audio with `propagation=graph`; legacy `propagation=waveguide` remains the comparison baseline. Remaining pressure: deepen connection-law semantics and run log-mel parity against the graph renderer. Do not expand the proxy into a second fake synthesizer.
- Pink Trombone log-mel parity now writes both legacy waveguide and graph candidates. Latest graph evidence after radiation gain: open/front graph cosine stays around 0.37/0.39 versus legacy 0.61/0.63; nasal graph cosine is close to legacy around 0.53; sibilant graph score improves but cosine remains low; closure-release graph cosine becomes positive but still weak. Static tongue/constriction/lip baking into graph path did not materially move these numbers, so the next graph pressure is source/scattering/radiation/transient behavior, not more static shape paperwork.
- Pink Trombone log-mel parity now writes both legacy waveguide and graph candidates. Latest graph evidence after source/radiation cuts: graph open/front cosine reaches 0.6393/0.6596, now above the legacy waveguide lane at 0.6143/0.6349 for those fixtures. The useful changes were LF-style glottal shaping with a modest harmonic pressure blend, graph radiation high-pass leakage by radiation kind, and aperture-weighted high-passed `TurbulenceJet` source semantics instead of multiplying jet pressure by source opening. Nasal graph cosine is 0.4607 with RMS ratio 1.6914, so nasal branch/radiation gain or junction coupling is still wrong; sibilant graph cosine remains weak at 0.2320; closure-release graph cosine is positive at 0.1170 and beats the old negative waveguide baseline. Static tongue/constriction/lip baking into graph path did not materially move these numbers, so the next graph pressure is nasal coupling/gain and frication/transient behavior, not more static shape paperwork.
- PT expressive parity should decompose into reusable Aqua primitives before audio golf: `tract_shape` owns continuous diameter/area geometry over normalized position, physical length (`length_cm`), interpolation/resampling, derived reflection coefficients, and per-cell acoustic delay; `tract` may resample that geometry to a chosen compiled `sections` grid without making authoring sample count anatomy; `glottis` owns excitation controls; `tract_injection` owns positioned frication/burst controls and now distributes frication pressure into waveguide section updates; `nasal_branch` owns a second diameter/area tube; `tract_motion` owns control slew and obstruction threshold; `propagation=waveguide` lowers tract voices into a Faust-friendly `wg_loop ~ si.bus(...)` feedback component with compiled right/left traveling-wave state, live per-section diameter/area/reflection fields, obstruction-history burst pressure, and legacy substep clock intent. Waveguide tracts now default to an acoustic unit-delay grid from physical length at the current 44.1 kHz target, so a 17 cm oral tract emits about 22 sections instead of treating PT's 44 half-sample cells as anatomy; `VocalTract.IndexScale` maps runtime PT-index controls onto that emitted grid. PT's 44 oral and 28 nasal cells are reference discretization, not Aqua morphology authority. `PinkTromboneParityFixtures` defines fixed Aqua DSL workouts, `PinkTromboneReferenceRenderer` renders deterministic PT-style fixture references, and `AudioComparison` includes log-mel cosine similarity. Current waveguide baseline is weak but measured: cosine about 0.61 open vowel, 0.63 front vowel, 0.54 nasal, 0.37 sibilant, and -0.08 closure-release. Remaining low-level gap is fractional-delay waveguide lowering whose clock derives from physical length, propagation speed, and sample rate so runtime morphology motion does not require recompilation; closure/release timing is still badly wrong.
- If dotnet builds hang in this workspace, stop orphan dotnet workers and retry with `--disable-build-servers -p:UseSharedCompilation=false -p:BuildInParallel=false`; plain parallel/shared builds can stall without useful diagnostics.
- eSpeak NG is an early parity reference for timing, IPA coverage, and log-mel pressure, not an anatomy oracle or final target.