Define speech lowering handoff

This commit is contained in:
Meta Vens 2026-05-19 16:35:41 +01:00
commit e1f3226219
10 changed files with 603 additions and 0 deletions

View file

@ -0,0 +1,130 @@
# English Pronunciation Lowering
Version: `0.1-draft`
Weksa owns the step from flavored English text to a pronunciation plan. AquaSynth
owns the later step from pronunciation intent to sound.
```text
interlingua packet
-> projected agent-local context
-> flavored English dialogue
-> English pronunciation plan
-> downstream speech system
```
This is still Weksa work because the pronunciation plan belongs to the meaning
and dialogue layer: phrase grouping, emphasis, reduced forms, and word choice are
part of the utterance Weksa just created.
The long-term primary handoff is the learned
[Line Expression Vector](./line-expression-vector.md). This pronunciation plan is
the inspectable audit/debug lane: useful for fixtures, phoneme strings, and
review, but not the only representation of delivery.
## Objective
Produce a deterministic, inspectable pronunciation plan for English output.
The plan should say:
- what text is being pronounced
- how it was normalized
- which tokens are words, punctuation, or phrase boundaries
- which pronunciation source was used for each word
- what broad IPA sequence should be sent downstream
- where phrase breaks and emphasis fall
- what remains uncertain or hand-authored
## Authority
Weksa owns:
- text normalization
- tokenization
- lexicon lookup
- OOV pronunciation choice
- ARPABET-to-IPA conversion when using CMUdict-style entries
- phrase grouping
- lexical stress preservation
- dialogue-driven emphasis
- pronunciation trace
AquaSynth owns:
- IPA parsing
- phonetic feature interpretation
- language/voice phonology profile
- timing curves
- articulatory gestures
- tract morphology
- rendered audio
## Reference Spine
Recommended first spine:
1. Use CMUdict-style ARPABET entries for known English words.
2. Preserve CMUdict stress digits on vowels.
3. Convert ARPABET to broad IPA with a documented table.
4. Add phrase breaks and emphasis from the English lowering output.
5. Mark hand-authored or uncertain pronunciations explicitly.
Useful reference tools:
- CMU Pronouncing Dictionary for English ARPABET pronunciations.
- eSpeak NG `--ipa` or phoneme output as an external checker.
- Phonetisaurus or another G2P model later for OOV words.
The first version may be hand-authored fixture data. The contract matters before
automation. Yes, this is paperwork with teeth. Annoying, but it bites the right
thing.
## Pronunciation Plan Shape
```yaml
schema_version: weksa.english_pronunciation_plan.v0
source_output_ref:
dialect:
orthographic_text:
normalization:
text:
notes:
tokens:
- id:
text:
kind:
pronunciation_source:
arpabet:
ipa:
stress:
notes:
phrasing:
groups:
- id:
token_ids:
boundary_after:
prominence:
ipa:
broad:
with_boundaries:
trace:
decisions:
uncertainties:
```
## Minimum Pass Criteria
- Every pronounced word has a token.
- Every word token has IPA.
- Unknown or hand-authored pronunciations are labeled.
- Phrase boundaries do not contradict punctuation or intended delivery.
- Emphasis follows dialogue intent, not arbitrary prettiness.
- The plan can be consumed without reading the original prose document.
## References
- [CMU Pronouncing Dictionary](https://www.speech.cs.cmu.edu/cgi-bin/cmudict)
- [eSpeak command options](https://espeak.sourceforge.net/commands.html)
- [eSpeak NG documentation index](https://chromium.googlesource.com/chromiumos/third_party/espeak-ng/+/HEAD/docs/index.md)
- [Phonetisaurus overview](https://cmusphinx.github.io/2012/05/phonetisaurus-a-wfst-driven-phoneticizer-e2-80-93-framework-review/)

View file

@ -130,6 +130,15 @@ Weksa's first deliverable is the English line and traceable projection context.
When speech work needs it, AquaSynth can consume `spoken_text` and decide how to
lower it into its own phonetic and articulatory contracts.
Weksa still owns the optional pronunciation plan for English output: tokenizing
the line, choosing word pronunciations, preserving stress, and stringing broad
IPA together. See [English Pronunciation Lowering](./english-pronunciation-lowering.md).
Weksa should also emit a learned line-expression vector when training data and
encoder support exist. That vector is the intended compact handoff for prosody,
emphasis, and character delivery pressure. See
[Line Expression Vector](./line-expression-vector.md).
## First Target: Nibu
Nibu is the first practical target because her state is live, opinionated, and

View file

@ -0,0 +1,124 @@
# Line Expression Vector
Version: `0.1-draft`
The line expression vector is Weksa's learned handoff from flavored English
lowering to downstream voice control.
```text
interlingua packet
-> projected agent-local context
-> flavored English line
-> Weksa line-expression encoder
-> line expression vector
-> AquaSynth synth-control decoder
```
The goal is two small learned artifacts in a tight loop:
1. Weksa learns to encode a character's line as a compact expression vector.
2. AquaSynth learns to decode that vector into synth-control intent.
No giant oracle gets to own the seam. No hidden theatrical mush. Just a line,
its meaning, its speaker context, and a learned vector with enough audit surface
to tell whether it is lying.
## Authority
Weksa owns:
- interlingua packet
- projected agent-local context
- flavored English line
- line-expression vector generation
- audit projections for meaning, emphasis, and character pressure
AquaSynth owns:
- mapping expression vectors to synthesis controls
- consuming pronunciation or IPA plans when Weksa provides them
- phonetic feature interpretation
- timing, articulation, tract, and DSP
- audio evaluation
## Vector Contract
The vector is dense and model-owned, but the packet around it must be explicit.
```yaml
schema_version: weksa.line_expression_vector.v0
source_output_ref:
speaker_agent_id:
encoder:
model_id:
version:
training_set:
text:
spoken_text:
normalized_text:
vector:
dimensionality:
values_ref:
audit_projection:
semantic_preservation:
emphasis:
prosody:
character_pressure:
delivery_shape:
training_refs:
positive_examples:
negative_examples:
trace:
notes:
uncertainties:
```
`values_ref` may point to an external binary or JSON artifact once the vector is
large. Early fixtures may inline tiny toy vectors.
## Audit Projection
The audit projection is not the vector. It is a human-readable probe of what the
vector is supposed to contain.
Useful audit families:
- `semantic_preservation`: what source meaning must remain audible.
- `emphasis`: which words or spans carry prominence.
- `prosody`: clipped, rising, flat, hesitant, compressed, etc.
- `character_pressure`: active state pressures shaping delivery.
- `delivery_shape`: pace, pause pattern, intensity, warmth, contempt, tenderness,
threat, or play.
These are labels for review and training. The learned vector is allowed to find
better internal dimensions, but it does not get to skip accountability.
## Training Loop
First loop:
1. Author or generate an interlingua packet.
2. Project agent-local context.
3. Lower to English.
4. Human-review whether the line preserves meaning and voice.
5. Encode the reviewed line into a line-expression vector.
6. AquaSynth decodes the vector into synth-control intent.
7. Compare rendered speech against human notes and reference takes when present.
8. Feed corrections back into the Weksa encoder and AquaSynth decoder.
The same fixture can carry:
- accepted line
- rejected line
- why the rejected line failed
- audit projection
- vector artifact
- downstream AquaSynth evaluation pointer
## Non-Goals
- Do not make Weksa emit raw vocal-tract controls.
- Do not make AquaSynth infer character psychology from prose.
- Do not treat named audit axes as the true latent space.
- Do not make realtime neural voice output the authority.
- Do not hide bad semantic preservation behind pleasant delivery.

View file

@ -16,6 +16,10 @@
- Validate one minimal interlingua packet.
- Lower one packet through Nibu's projected agent state into flavored English.
- Add one English pronunciation plan that strings the lowered line into broad
IPA.
- Add one toy line-expression vector fixture, then replace hand-authored values
with a learned encoder.
- Preserve the first lowering proof as fixture data under
`examples/english-lowering/`.
- Parse or load one language project definition.