Skip to content

the ultimate vocal synthesizer - sing, speak, beatbox, and more

Rust

Realism pass: a continuous vocal tract, recalibrated vowels, gliding diphthongs

Jameson Hodge92fce630909c
diff --git a/src/engine/anatomy/human.ts b/src/engine/anatomy/human.ts
index 6f0884b..3364e7a 100644
--- a/src/engine/anatomy/human.ts
+++ b/src/engine/anatomy/human.ts
@@ -112,6 +112,8 @@ export interface GridSample {
/** distance from the glottis along the centreline (cm) */
s: number;
region: 0 | 1 | 2 | 3; // 0 epilarynx, 1 pharynx, 2 oral (radial), 3 front (teeth/lips)
+ /** the gap the ray measured, before the contact models (cm) */
+ ray: number;
}
export interface HumanFrame {
@@ -150,6 +152,8 @@ export interface HumanFrame {
}
const DEG = Math.PI / 180;
+/** points on the tongue body's arc */
+const ARC_POINTS = 32;
export class HumanVocalTract {
readonly body: HumanBody;
@@ -245,13 +249,35 @@ export class HumanVocalTract {
velNasal.push(sub(c, scale(nrm, th)));
vel.push(c);
}
+ // the velum's oral surface runs into the hard palate's: its root sat below the palate's edge,
+ // folding the roof back on itself there, and rays crossed the fold as the velum turned
+ const pal0 = this.palate[0];
+ for (let i = 0; i < velOral.length; i++) {
+ const u = i / 10 / 0.35;
+ if (u < 1) velOral[i] = lerpV(velOral[i], pal0, (1 - u) * (1 - u));
+ }
const uvula = vel[vel.length - 1];
- // ---- outer contour: pharyngeal wall up to uvula height, then velum oral surface (tip→PNS), palate, incisors, upper lip
+ // ---- outer contour: pharyngeal wall up to just below the uvula, then velum oral surface
+ // (tip→PNS), palate, incisors, upper lip
const outer = new Polyline();
- const uvY = uvula.y;
- for (const p of this.pharWall) {
- if (p.y < uvY) outer.push(p);
+ // The port window's lid runs from the posterior wall up to the uvula's tip. It must slope
+ // up: a lid leaving the wall above the tip left rays just under the tip to hit the wall far
+ // behind, so the back of the oral tract jumped as the velum moved.
+ const uvY = velOral[velOral.length - 1].y - 0.3 * k;
+ for (let i = 0; i < this.pharWall.length; i++) {
+ const p = this.pharWall[i];
+ if (p.y < uvY) {
+ outer.push(p);
+ continue;
+ }
+ // end exactly at that height: whole wall points popping in and out made the port
+ // window, and every ray through it, jump as the velum moved
+ if (i > 0) {
+ const a = this.pharWall[i - 1];
+ outer.push(lerpV(a, p, clamp((uvY - a.y) / Math.max(1e-9, p.y - a.y), 0, 1)));
+ }
+ break;
}
// bridge to the uvula tip (velopharyngeal port window)
const roofStart = outer.length;
@@ -299,7 +325,8 @@ export class HumanVocalTract {
// arc runs from thB (200°) decreasing to thF
while (thF > thB) thF -= 2 * Math.PI;
while (thF < thB - 2 * Math.PI) thF += 2 * Math.PI;
- const arcPts = arc(B, r, thB, thF, Math.max(6, Math.round(((thB - thF) / DEG) / 6)));
+ // a fixed number of points: a count that changed with the angle re-spaced every vertex at once
+ const arcPts = arc(B, r, thB, thF, ARC_POINTS);
const pF = arcPts[arcPts.length - 1];
const tanF = v(Math.sin(thF), -Math.cos(thF)); // direction of decreasing angle
// blade: quadratic from the tangent point to the tip; curl lifts the tip and turns it back
@@ -336,8 +363,14 @@ export class HumanVocalTract {
// pharyngeal rays (a pocket makes ray crossings flip discontinuously)
const inner = new Polyline();
inner.push(epiBase).push(epiTip);
- let rootStart = root.findIndex((q) => q.y > epiTip.y + 0.05 * k);
+ const yRoot = epiTip.y + 0.05 * k;
+ let rootStart = root.findIndex((q) => q.y > yRoot);
if (rootStart < 0) rootStart = root.length - 1;
+ else if (rootStart > 0) {
+ // start exactly at that height, not at the next sample point (which jumped along the root)
+ const a = root[rootStart - 1], b = root[rootStart];
+ inner.push(lerpV(a, b, clamp((yRoot - a.y) / Math.max(1e-9, b.y - a.y), 0, 1)));
+ }
for (let i = rootStart; i < root.length; i++) inner.push(root[i]);
inner.append(arcPts, true);
inner.append(blade, true);
@@ -352,7 +385,9 @@ export class HumanVocalTract {
const yEpiTop = glottis.y + 2.4 * k * this.body.pharynx;
const yPharTop = this.polarC.y;
const nPh = 12;
- const measure = (o: Vec, dir: Vec, maxLen: number): { inner: Vec; outer: Vec; d: number } | null => {
+ // `fan`: a ray of the oral fan, whose origin the tongue can move off (the others start below
+ // or in front of all tissue they measure)
+ const measure = (o: Vec, dir: Vec, maxLen: number, fan = false): { inner: Vec; outer: Vec; d: number } | null => {
// walk from o along dir: last inner crossing before the first outer crossing
const nOut = rayPolyline(o.x, o.y, dir.x, dir.y, outer, 0, maxLen, tmp);
if (nOut === 0) return null;
@@ -361,7 +396,16 @@ export class HumanVocalTract {
const nIn = rayPolyline(o.x, o.y, dir.x, dir.y, inner, 0, tOut + 1.5 * k, tmp);
let tIn = -Infinity;
for (let i = 0; i < nIn; i++) if (tmp[i] > tIn && tmp[i] < tOut + 1.5 * k) tIn = tmp[i];
- if (tIn === -Infinity) tIn = Math.max(0, tOut - 3.5 * k);
+ if (tIn === -Infinity && !fan) tIn = Math.max(0, tOut - 3.5 * k);
+ else if (tIn === -Infinity) {
+ // the tongue has moved off the ray's origin: its surface is behind it (a fixed fallback
+ // gap here jumped as the surface crossed the origin)
+ const back = 2.5 * k;
+ const nBack = rayPolyline(o.x, o.y, -dir.x, -dir.y, inner, 0, back, tmp);
+ let tb = back;
+ for (let i = 0; i < nBack; i++) tb = Math.min(tb, tmp[i]);
+ tIn = -tb;
+ }
// if the tongue crosses the wall, the outermost inner crossing lies beyond tOut → closed
const d = Math.max(0, tOut - tIn);
const pIn = add(o, scale(dir, Math.min(tIn, tOut)));
@@ -372,7 +416,7 @@ export class HumanVocalTract {
for (let i = 0; i < nPh; i++) {
const y = lerp(yEpiTop + 0.12 * k, yPharTop, i / nPh);
const m = measure(v(4.6 * k, y), v(-1, 0), 9 * k);
- if (m) grid.push({ ...m, mid: lerpV(m.inner, m.outer, 0.5), area: 0, s: 0, region: 1 });
+ if (m) grid.push({ ...m, mid: lerpV(m.inner, m.outer, 0.5), area: 0, s: 0, ray: m.d, region: 1 });
}
// oral family: rays from a centre that glides from C1 (mid-oral) to C2 (behind the incisors)
// while the angle sweeps back → up → forward; consecutive rays never cross inside the airway.
@@ -384,11 +428,11 @@ export class HumanVocalTract {
const w = t < 0.45 ? 0 : (t - 0.45) / 0.55;
const c = lerpV(this.polarC, this.polarC2, w * w * (3 - 2 * w));
const dir = v(Math.cos(ang), Math.sin(ang));
- const m = measure(c, dir, 8 * k);
+ const m = measure(c, dir, 8 * k, true);
if (!m) continue;
if (splitIndex < 0 && ang <= 150 * DEG) splitIndex = grid.length;
// rays behind the velum still measure the (laterally wide) oropharynx
- grid.push({ ...m, mid: lerpV(m.inner, m.outer, 0.5), area: 0, s: 0, region: splitIndex < 0 ? 1 : 2 });
+ grid.push({ ...m, mid: lerpV(m.inner, m.outer, 0.5), area: 0, s: 0, ray: m.d, region: splitIndex < 0 ? 1 : 2 });
}
// front verticals (upper incisor edge → lip opening), looking up
const incisorTip = this.palate[this.palate.length - 1];
@@ -401,12 +445,15 @@ export class HumanVocalTract {
const x = lerp(xStart, xEnd, i / (nFr - 1));
const m = measure(v(x, 4.0 * k), v(0, 1), 8 * k);
if (!m) continue;
- grid.push({ ...m, mid: lerpV(m.inner, m.outer, 0.5), area: 0, s: 0, region: 3 });
+ grid.push({ ...m, mid: lerpV(m.inner, m.outer, 0.5), area: 0, s: 0, ray: m.d, region: 3 });
}
- // ---- soft-tissue contact model: the gap near the closest approach of the tongue (tip/blade,
- // and dorsum) to the oral roof follows a curved-body profile d = δ + Δs²/2R (δ < 0 = pressed in),
- // giving monotonic constriction areas and seals whose length grows with contact pressure.
+ // ---- soft-tissue contact model: near the oral roof, the gap at each roof point is its
+ // distance to the tongue surface itself (dorsum arc, blade, tip and underside), negative
+ // where the tongue is pressed into the roof. The raw ray crossings of the tissue polygon can
+ // leave sealed pockets beside a contact, and a jet released into such a pocket water-hammers;
+ // the surface distance has none, gives seals whose length grows with contact pressure, and
+ // handles two contacts at once (a single contact point hopped between them, jumping areas).
const roof = { xs: outer.xs.slice(roofStart, roofEnd + 1), ys: outer.ys.slice(roofStart, roofEnd + 1) };
const cum = new Float64Array(roof.xs.length);
for (let i = 1; i < roof.xs.length; i++) cum[i] = cum[i - 1] + Math.hypot(roof.xs[i] - roof.xs[i - 1], roof.ys[i] - roof.ys[i - 1]);
@@ -417,33 +464,43 @@ export class HumanVocalTract {
this.contactBody = bodyC.d;
this.contactTipN = tipC.n;
this.contactBodyN = bodyC.n;
- // Near a close approach the contact model *defines* the gap (one parabolic constriction):
- // the raw ray crossings of the tissue polygon can leave sealed pockets beside the contact,
- // and a jet released into such a pocket water-hammers. Blended back to the rays with distance.
if (tipC.d < 0.6 * k || bodyC.d < 0.6 * k) {
- const Rt = 0.45 * k, Rb = 1.6 * k;
- const apply = (g: GridSample, c: { d: number; s: number }, R: number, sArc: number, win: number) => {
- const ds = sArc - c.s;
- const ad = Math.abs(ds);
- if (ad > 2 * win) return;
- const dc = Math.max(0, c.d + (ds * ds) / (2 * R));
- // override weight: full inside the window, fading out to 2× window; strongest when pressed in
- const near = 1 - smoothstep(win, 2 * win, ad);
- const regime = 1 - smoothstep(0.15 * k, 0.6 * k, c.d);
- const w = near * regime;
- // the parabola also caps the ray gap; the cap fades out at the edges of the window and
- // of the contact regime, so the gap stays continuous as the tongue moves (a cap that
- // switched on at full strength made the area jump, heard as a tick)
- const cap = (1 - smoothstep(1.5 * win, 2 * win, ad)) * (1 - smoothstep(0.45 * k, 0.6 * k, c.d));
- const dm = g.d + (Math.min(g.d, dc) - g.d) * cap;
- g.d = dm + (dc - dm) * w;
+ // the whole tongue outline, closed: distance to its surface, signed by whether the roof
+ // point is inside it (so the sign only changes where the distance is zero)
+ const outl: Vec[] = [...root, ...arcPts.slice(1), ...blade.slice(1), ...under.slice(1), ...floor.slice(1), root[0]];
+ const tongueOutline = { xs: outl.map((q) => q.x), ys: outl.map((q) => q.y) };
+ const tongueGap = (x: number, y: number) => {
+ const gap = distToPolyline(tongueOutline, x, y);
+ return insidePolygon(tongueOutline, x, y) ? -gap : gap;
};
+ // Each roof ray takes the narrowest gap along its own stretch of roof: ±1 mm, so the rays
+ // near a contact seal together and open together (a sharp burst), widening to ±2 mm while
+ // the tongue is pressed in, because the tip's contact on the alveolar ridge is narrower
+ // than the ~4 mm between rays there and could otherwise fall between two and never seal.
+ const press = 1 - smoothstep(-0.06 * k, 0, Math.min(tipC.d, bodyC.d));
+ const half = 0.1 * k * (1 + press);
+ const roofLen = cum[cum.length - 1];
for (const g of grid) {
if (g.region === 0) continue;
+ // only rays ending on the oral roof, fading out (not switching off) as they leave it
const pr = projectOn(roof, cum, g.outer.x, g.outer.y);
- if (pr.dist > 0.25 * k) continue; // this ray's outer point is not on the oral roof
- if (g.region >= 2 && tipC.d < 0.6 * k) apply(g, tipC, Rt, pr.s, 0.9 * k);
- if (bodyC.d < 0.6 * k) apply(g, bodyC, Rb, pr.s, 1.6 * k);
+ const onRoof = 1 - smoothstep(0.15 * k, 0.25 * k, pr.dist);
+ if (onRoof <= 0) continue;
+ let dc = tongueGap(g.outer.x, g.outer.y);
+ // the gap changes no faster than the distance moved along the roof
+ if (dc - half <= 0.6 * k)
+ for (const f of [-1, -0.5, 0.5, 1]) {
+ const q = pointAlong(roof, cum, clamp(pr.s + f * half, 0, roofLen));
+ dc = Math.min(dc, tongueGap(q.x, q.y));
+ }
+ // the surface distance takes over as the tongue comes within ~6 mm of this roof point,
+ // fully from 1.5 mm; it also caps the ray's gap from 4.5 mm in
+ const w = (1 - smoothstep(0.15 * k, 0.6 * k, dc)) * onRoof;
+ const cap = (1 - smoothstep(0.45 * k, 0.6 * k, dc)) * onRoof;
+ if (w <= 0 && cap <= 0) continue;
+ const dp = Math.max(0, dc);
+ const dm = g.d + (Math.min(g.d, dp) - g.d) * cap;
+ g.d = dm + (dp - dm) * w;
}
}
@@ -536,13 +593,17 @@ export class HumanVocalTract {
/** Epilarynx area profile at s ∈ [0, epiLen]. */
epilarynxArea(a: HumanArtic, s: number, epiLen: number): number {
- const k2 = this.k * this.k;
const u = s / epiLen;
- const vent = 1 - 0.75 * clamp(a.ventricular, 0, 1);
- if (u < 0.3) return 1.3 * k2; // laryngeal ventricle
- if (u < 0.5) return 0.95 * k2 * vent; // ventricular folds
- const top = lerp(1.9, 0.35, clamp(a.epilarynx, 0, 1)) * k2;
- return lerp(1.2 * k2, top, (u - 0.5) / 0.5);
+ const vent = 0.95 * (1 - 0.75 * clamp(a.ventricular, 0, 1));
+ const top = lerp(1.9, 0.35, clamp(a.epilarynx, 0, 1));
+ // laryngeal ventricle, ventricular folds, then the tube to its top
+ const f = (x: number) => (x < 0.3 ? 1.3 : x < 0.5 ? vent : lerp(1.2, top, (x - 0.5) / 0.5));
+ // the steps between them are short ramps: a section boundary sliding across a step made
+ // that section's area jump
+ const r = 0.03;
+ let A = f(u);
+ for (const u0 of [0.3, 0.5]) if (Math.abs(u - u0) < r) A = lerp(f(u0 - r), f(u0 + r), (u - (u0 - r)) / (2 * r));
+ return A * this.k * this.k;
}
/**
@@ -553,9 +614,12 @@ export class HumanVocalTract {
resample(a: HumanArtic, f: HumanFrame, nPh: number, nOr: number, outPh: Float64Array, outOr: Float64Array, minPh?: Float64Array, minOr?: Float64Array): { phLen: number; orLen: number } {
const epiLen = 2.4 * this.k * this.body.pharynx;
const g = f.grid;
+ // the epilarynx's last few millimetres flare into the pharynx (no step at its top)
+ const flare = 0.1 * epiLen;
const areaAt = (s: number): number => {
- if (s <= epiLen) return this.epilarynxArea(a, s, epiLen);
- if (s <= g[0].s) return lerp(this.epilarynxArea(a, epiLen, epiLen), g[0].area, (s - epiLen) / Math.max(1e-6, g[0].s - epiLen));
+ if (s <= epiLen - flare) return this.epilarynxArea(a, s, epiLen);
+ if (s <= epiLen) return lerp(this.epilarynxArea(a, s, epiLen), g[0].area, (s - (epiLen - flare)) / flare);
+ if (s <= g[0].s) return g[0].area;
// binary search
let lo = 0, hi = g.length - 1;
if (s >= g[hi].s) return g[hi].area;
@@ -627,21 +691,55 @@ function projectOn(pl: { xs: number[]; ys: number[] }, cum: Float64Array, px: nu
return { s: bs, dist: best, signed: sign * best, x: bx, y: by, seg: bseg };
}
-/** Closest approach of a set of tissue points to the roof: signed gap δ (negative = pressed in) and arc position. */
-function closestApproach(pl: { xs: number[]; ys: number[] }, cum: Float64Array, pts: Vec[]): { d: number; s: number; n: { x: number; y: number } } {
- let d = Infinity, sAt = 0, seg = 0;
+/** The point at arc length s along a polyline. */
+function pointAlong(pl: { xs: number[]; ys: number[] }, cum: Float64Array, s: number): Vec {
+ let i = 0;
+ while (i < cum.length - 2 && cum[i + 1] < s) i++;
+ const L = cum[i + 1] - cum[i];
+ const u = L > 1e-9 ? clamp((s - cum[i]) / L, 0, 1) : 0;
+ return { x: pl.xs[i] + (pl.xs[i + 1] - pl.xs[i]) * u, y: pl.ys[i] + (pl.ys[i + 1] - pl.ys[i]) * u };
+}
+
+/** Shortest distance from a point to a polyline. */
+function distToPolyline(pl: { xs: number[]; ys: number[] }, px: number, py: number): number {
+ let best = Infinity;
+ const xs = pl.xs, ys = pl.ys;
+ for (let i = 0; i < xs.length - 1; i++) {
+ const ax = xs[i], ay = ys[i], ex = xs[i + 1] - ax, ey = ys[i + 1] - ay;
+ const L2 = ex * ex + ey * ey;
+ let t = L2 > 1e-12 ? ((px - ax) * ex + (py - ay) * ey) / L2 : 0;
+ t = t < 0 ? 0 : t > 1 ? 1 : t;
+ const dx = px - ax - ex * t, dy = py - ay - ey * t;
+ const d2 = dx * dx + dy * dy;
+ if (d2 < best) best = d2;
+ }
+ return Math.sqrt(best);
+}
+
+/** Even-odd point-in-polygon test (the polygon's last point repeats its first). */
+function insidePolygon(pl: { xs: number[]; ys: number[] }, px: number, py: number): boolean {
+ let inside = false;
+ for (let i = 0; i < pl.xs.length - 1; i++) {
+ const xa = pl.xs[i], ya = pl.ys[i], xb = pl.xs[i + 1], yb = pl.ys[i + 1];
+ if (ya > py !== yb > py && px < xa + ((py - ya) * (xb - xa)) / (yb - ya)) inside = !inside;
+ }
+ return inside;
+}
+
+/** Closest approach of a set of tissue points to the roof: signed gap δ (negative = pressed in) and the roof normal there. */
+function closestApproach(pl: { xs: number[]; ys: number[] }, cum: Float64Array, pts: Vec[]): { d: number; n: { x: number; y: number } } {
+ let d = Infinity, seg = 0;
for (const p of pts) {
const pr = projectOn(pl, cum, p.x, p.y);
if (pr.signed < d) {
d = pr.signed;
- sAt = pr.s;
seg = pr.seg;
}
}
// inward normal of the roof segment (airway side is to the right of travel: (ey, −ex))
const ex = pl.xs[seg + 1] - pl.xs[seg], ey = pl.ys[seg + 1] - pl.ys[seg];
const L = Math.hypot(ex, ey) || 1;
- return { d, s: sAt, n: { x: ey / L, y: -ex / L } };
+ return { d, n: { x: ey / L, y: -ex / L } };
}
/** Clamp drawn tissue points that penetrate a wall onto its surface (drawing only). */
diff --git a/src/engine/phonetics/beatbox.ts b/src/engine/phonetics/beatbox.ts
index ffb53ff..aea50fd 100644
--- a/src/engine/phonetics/beatbox.ts
+++ b/src/engine/phonetics/beatbox.ts
@@ -18,7 +18,10 @@ import { oralGestures, vowelArtic } from "./planner.ts";
/** A beatboxer's ready posture: jaw nearly closed, lips just apart, tongue relaxed. */
export function beatReady(body: string): Partial<HumanArtic> {
- return { ...(vowelArtic("ə", body) ?? {}), jaw: 0.4, lipAp: 0.25, lipProt: 0.1 };
+ // with the jaw nearly closed the tongue rests a little higher than in a spoken schwa; the
+ // velar hits need it there: from lower, the release peels open and loses its punch
+ const schwa = vowelArtic("ə", body) ?? {};
+ return { ...schwa, tbY: (schwa.tbY ?? 6.85) + 0.1, jaw: 0.4, lipAp: 0.25, lipProt: 0.1 };
}
export type BeatRole = "kick" | "snare" | "hat" | "perc" | "bass";
@@ -192,7 +195,9 @@ export const BEAT_SOUNDS: BeatSound[] = [
latency: -0.013,
build: (body, o) => {
const end = Math.max(0.14, Math.min(0.34, o.len * 2));
- return [...snap(oral(body, "k", -0.06, 0, 2, "kch"), 4, 0.008), ...after(oral(body, "ʃ", 0.014, end, 1.4, "kch")), ...blow(-0.035, end, 1.45 * o.accent, 0.45, "kch", 0.14)];
+ // the "ch": the back of the tongue lingers by the velum after the burst ([x]) while the
+ // blade rises into the long rounded [ʃ]
+ return [...snap(oral(body, "k", -0.06, 0, 2, "kch"), 4, 0.008), ...after(oral(body, "x", 0.002, 0.045, 2, "kch")), ...after(oral(body, "ʃ", 0.025, end, 1.4, "kch")), ...blow(-0.035, end, 1.75 * o.accent, 0.45, "kch", 0.14)];
},
},
{
@@ -205,9 +210,12 @@ export const BEAT_SOUNDS: BeatSound[] = [
build: (body, o) => {
const end = Math.max(0.06, o.len * 0.92);
return [
- // lips shut before the voice starts, so the note begins as a hum rather than a vowel
+ // lips shut before the voice starts, so the note begins as a hum rather than a vowel;
+ // the folds stay apart (breathing) while the velum drops into the sealed mouth, so the
+ // squeezed air goes to the lungs instead of popping out through the nose
...oral(body, "m", -0.03, end, 1.6, "m"),
g(-0.02, end, 0.03, 0.03, 4, { velum: 0.9 }, "m"),
+ g(-0.08, -0.03, 0.02, 0.02, 5, { abduction: 0.3 }, "m"),
g(-0.01, end, 0.02, 0.04, 1, { breath: 0.95 * o.accent }, "m"),
g(-0.02, end, 0.015, 0.02, 8, { f0: o.f0 }, "m"),
];
diff --git a/src/engine/phonetics/consonantTargets.generated.json b/src/engine/phonetics/consonantTargets.generated.json
index 9cafaeb..f5e7bbf 100644
--- a/src/engine/phonetics/consonantTargets.generated.json
+++ b/src/engine/phonetics/consonantTargets.generated.json
@@ -13,52 +13,52 @@
"lipAp": 0.031
},
"θ": {
- "ttY": 8.236
+ "ttY": 8.228
},
"ð": {
- "ttY": 8.21
+ "ttY": 8.19
},
"s": {
- "ttY": 9.132
+ "ttY": 9.111
},
"z": {
- "ttY": 9.112
+ "ttY": 9.097
},
"ʃ": {
- "ttY": 9.512
+ "ttY": 9.513
},
"ʒ": {
- "ttY": 9.498
+ "ttY": 9.496
},
"ʂ": {
- "ttY": 9.747
+ "ttY": 9.73
},
"ʐ": {
- "ttY": 9.735
+ "ttY": 9.718
},
"ç": {
- "tbY": 7.928
+ "tbY": 7.93
},
"ʝ": {
- "tbY": 7.916
+ "tbY": 7.918
},
"x": {
- "tbY": 7.124
+ "tbY": 7.364
},
"ɣ": {
- "tbY": 7.105
+ "tbY": 7.351
},
"χ": {
- "tbY": 6.902
+ "tbY": 7.06
},
"ʁ": {
- "tbY": 6.891
+ "tbY": 7.048
},
"ħ": {
- "tbX": 1.245
+ "tbX": 1.248
},
"ʕ": {
- "tbX": 1.282
+ "tbX": 1.285
}
},
"female": {
@@ -75,90 +75,90 @@
"lipAp": 0.028
},
"θ": {
- "ttY": 8.252
+ "ttY": 8.244
},
"ð": {
- "ttY": 8.228
+ "ttY": 8.209
},
"s": {
- "ttY": 9.135
+ "ttY": 9.117
},
"z": {
- "ttY": 9.116
+ "ttY": 9.104
},
"ʃ": {
- "ttY": 9.521
+ "ttY": 9.522
},
"ʒ": {
- "ttY": 9.508
+ "ttY": 9.506
},
"ʂ": {
- "ttY": 9.754
+ "ttY": 9.738
},
"ʐ": {
- "ttY": 9.742
+ "ttY": 9.727
},
"ç": {
- "tbY": 7.983
+ "tbY": 7.985
},
"ʝ": {
- "tbY": 7.971
+ "tbY": 7.973
},
"x": {
- "tbY": 7.189
+ "tbY": 7.428
},
"ɣ": {
- "tbY": 7.17
+ "tbY": 7.416
},
"χ": {
- "tbY": 6.961
+ "tbY": 7.12
},
"ʁ": {
- "tbY": 6.949
+ "tbY": 7.109
},
"ħ": {
- "tbX": 1.183
+ "tbX": 1.186
},
"ʕ": {
- "tbX": 1.218
+ "tbX": 1.22
}
},
"child": {
"ɸ": {
- "lipAp": 0.037
+ "lipAp": 0.045
},
"β": {
- "lipAp": 0.046
+ "lipAp": 0.056
},
"f": {
- "lipAp": 0.007
+ "lipAp": 0.008
},
"v": {
- "lipAp": 0.021
+ "lipAp": 0.022
},
"θ": {
- "ttY": 8.276
+ "ttY": 8.272
},
"ð": {
- "ttY": 8.253
+ "ttY": 8.245
},
"s": {
- "ttY": 9.144
+ "ttY": 9.126
},
"z": {
- "ttY": 9.127
+ "ttY": 9.114
},
"ʃ": {
- "ttY": 9.537
+ "ttY": 9.538
},
"ʒ": {
- "ttY": 9.524
+ "ttY": 9.525
},
"ʂ": {
- "ttY": 9.763
+ "ttY": 9.75
},
"ʐ": {
- "ttY": 9.754
+ "ttY": 9.739
},
"ç": {
"tbY": 8.043
@@ -167,22 +167,22 @@
"tbY": 8.032
},
"x": {
- "tbY": 7.276
+ "tbY": 7.5
},
"ɣ": {
- "tbY": 7.25
+ "tbY": 7.488
},
"χ": {
- "tbY": 7.039
+ "tbY": 7.186
},
"ʁ": {
- "tbY": 7.029
+ "tbY": 7.176
},
"ħ": {
- "tbX": 1.104
+ "tbX": 1.106
},
"ʕ": {
- "tbX": 1.136
+ "tbX": 1.138
}
}
}
\ No newline at end of file
diff --git a/src/engine/phonetics/english.ts b/src/engine/phonetics/english.ts
index 135e8bc..0f52aa6 100644
--- a/src/engine/phonetics/english.ts
+++ b/src/engine/phonetics/english.ts
@@ -10,6 +10,19 @@ const ARPA: Record<string, string> = {
B: "b", CH: "tʃ", D: "d", DH: "ð", F: "f", G: "g", HH: "h", JH: "dʒ", K: "k", L: "l", M: "m", N: "n", NG: "ŋ", P: "p", R: "ɹ", S: "s", SH: "ʃ", T: "t", TH: "θ", V: "v", W: "w", Y: "j", Z: "z", ZH: "ʒ",
};
const VOWELS = new Set(["ɑ", "æ", "ʌ", "ə", "ɔ", "aʊ", "aɪ", "ɛ", "ɝ", "ɚ", "eɪ", "ɪ", "i", "oʊ", "ɔɪ", "ʊ", "u"]);
+/**
+ * The dictionary keeps one pronunciation per word; for these homographs it kept the rarer one
+ * (the verb "wind", past-tense "read"). Telling them apart needs grammar; the common reading wins.
+ */
+const HOMOGRAPHS: Record<string, string> = {
+ wind: "W IH1 N D",
+ read: "R IY1 D",
+ live: "L IH1 V",
+ lead: "L IY1 D",
+ close: "K L OW1 Z",
+ wound: "W UW1 N D",
+};
+
/** monosyllabic function words are unstressed in running speech (and reduce) */
const FUNCTION_WORDS = new Set("a an the of to in on at by for from with as and or but nor so if is am are was were be been do does did has have had will would can could should shall may might must it its i you he she we they me him her us them my your his our their this that than then there not no".split(" "));
const REDUCE: Record<string, string> = { ʌ: "ə", æ: "ə", ɑ: "ə", ɛ: "ə", ɔ: "ə", u: "ə", ʊ: "ə" };
@@ -96,7 +109,7 @@ export class EnglishG2P {
/** One word → segments with lexical stress. `reduce`: weak forms of function words (speech). */
word(w: string, reduce = true): Segment[] {
const clean = w.toLowerCase().replace(/^'+|'+$/g, "");
- const entry = this.dict?.get(clean);
+ const entry = HOMOGRAPHS[clean] ?? this.dict?.get(clean);
if (entry) {
const segs = arpabetToSegments(entry);
if (reduce && FUNCTION_WORDS.has(clean)) {
@@ -138,8 +151,9 @@ function applyAllophones(segs: Segment[]): void {
const prev = segs[i - 1], next = segs[i + 1];
const pv = VOWELS.has(prev.ipa) || prev.ipa === "ɹ";
const nv = VOWELS.has(next.ipa);
- // /t d/ between a vowel and an unstressed vowel → tap ("water", "ladder", "got it")
- if ((s.ipa === "t" || s.ipa === "d") && pv && nv && !next.stress) s.ipa = "ɾ";
+ // /t d/ between a vowel and an unstressed vowel → tap ("water", "ladder", "got it"), but not
+ // at the start of a word ("were disputing" keeps its /d/)
+ if ((s.ipa === "t" || s.ipa === "d") && pv && nv && !next.stress && !prev.wordEnd) s.ipa = "ɾ";
}
for (let i = 0; i < segs.length; i++) {
const s = segs[i];
diff --git a/src/engine/phonetics/planner.ts b/src/engine/phonetics/planner.ts
index e484f86..003ff8c 100644
--- a/src/engine/phonetics/planner.ts
+++ b/src/engine/phonetics/planner.ts
@@ -59,13 +59,18 @@ const VOWEL_KEYS = ["tbX", "tbY", "jaw", "lipAp", "lipProt", "lipWidth", "root",
type VTable = Record<string, Record<string, { artic: Partial<HumanArtic> }>>;
const VT = vowelTable as unknown as VTable;
-/** Diphthongs and r-coloured vowels expand to vowel sequences. */
+/**
+ * Diphthongs and r-coloured vowels expand to vowel sequences. American /eɪ oʊ/ glide toward
+ * [i u] (Hillenbrand et al. 1995: /e/ F2 rises ~150 Hz, /o/ F1 falls with F2 steady); with
+ * [ɪ ʊ] as targets they barely moved (/e/ and /ɪ/ share F2) and sounded like the steady
+ * [eː oː] of Indian English. The other offglides undershoot toward [ɪ ʊ].
+ */
const EXPAND: Record<string, string[]> = {
aɪ: ["a", "ɪ"],
aʊ: ["a", "ʊ"],
ɔɪ: ["ɔ", "ɪ"],
- eɪ: ["e", "ɪ"],
- oʊ: ["o", "ʊ"],
+ eɪ: ["e", "i"],
+ oʊ: ["o", "u"],
ɚ: ["ɝ"],
};
diff --git a/src/engine/phonetics/vowelTargets.generated.json b/src/engine/phonetics/vowelTargets.generated.json
index 43c4366..855ee3b 100644
--- a/src/engine/phonetics/vowelTargets.generated.json
+++ b/src/engine/phonetics/vowelTargets.generated.json
@@ -2,23 +2,23 @@
"male": {
"i": {
"artic": {
- "tbX": 3.741,
- "tbY": 7.754,
- "jaw": 0.199,
- "lipAp": 0.873,
- "lipProt": 0.024,
- "lipWidth": 0.998,
- "root": 0.521,
- "larynx": 0.751,
- "ttX": 6.636,
- "ttY": 7.492,
- "ttCurl": 0.003
+ "tbX": 3.668,
+ "tbY": 7.744,
+ "jaw": 0.438,
+ "lipAp": 1.065,
+ "lipProt": 0,
+ "lipWidth": 1,
+ "root": 0.548,
+ "larynx": 0.818,
+ "ttX": 6.531,
+ "ttY": 7.268,
+ "ttCurl": 0
},
"formants": [
337,
- 2237,
- 2918,
- 3946
+ 2236,
+ 2905,
+ 3911
],
"target": [
342,
@@ -26,30 +26,30 @@
3000
],
"err": [
- -1.4,
+ -1.5,
-3.7,
- -2.7
+ -3.2
]
},
"ɪ": {
"artic": {
- "tbX": 3.798,
- "tbY": 7.328,
- "jaw": 0.571,
- "lipAp": 1.144,
+ "tbX": 3.633,
+ "tbY": 7.412,
+ "jaw": 0.63,
+ "lipAp": 1.201,
"lipProt": 0,
"lipWidth": 1,
- "root": 0.18,
- "larynx": 0.235,
- "ttX": 6.522,
- "ttY": 7.003,
+ "root": 0.039,
+ "larynx": 0.244,
+ "ttX": 6.45,
+ "ttY": 6.981,
"ttCurl": 0
},
"formants": [
- 425,
- 2005,
- 2643,
- 3785
+ 423,
+ 2016,
+ 2599,
+ 3689
],
"target": [
427,
@@ -57,30 +57,30 @@
2684
],
"err": [
- -0.6,
- -1.4,
- -1.5
+ -0.9,
+ -0.9,
+ -3.1
]
},
"e": {
"artic": {
- "tbX": 3.758,
- "tbY": 7.129,
- "jaw": 0.796,
- "lipAp": 1.335,
+ "tbX": 3.598,
+ "tbY": 7.247,
+ "jaw": 0.861,
+ "lipAp": 1.395,
"lipProt": 0,
"lipWidth": 1,
- "root": 0.29,
- "larynx": 0.548,
- "ttX": 6.424,
- "ttY": 6.735,
+ "root": 0.257,
+ "larynx": 0.497,
+ "ttX": 6.35,
+ "ttY": 6.719,
"ttCurl": 0
},
"formants": [
- 469,
- 1994,
- 2644,
- 3836
+ 466,
+ 2005,
+ 2598,
+ 3782
],
"target": [
476,
@@ -88,30 +88,30 @@
2691
],
"err": [
- -1.4,
- -4.5,
- -1.8
+ -2,
+ -4,
+ -3.4
]
},
"ɛ": {
"artic": {
- "tbX": 3.715,
- "tbY": 6.187,
- "jaw": 1.08,
- "lipAp": 1.526,
+ "tbX": 3.416,
+ "tbY": 6.575,
+ "jaw": 1.155,
+ "lipAp": 1.597,
"lipProt": 0,
"lipWidth": 1,
- "root": 0.037,
- "larynx": 0.199,
- "ttX": 6.295,
- "ttY": 6.158,
- "ttCurl": 0.001
+ "root": 0.06,
+ "larynx": 0.331,
+ "ttX": 6.174,
+ "ttY": 6.228,
+ "ttCurl": 0
},
"formants": [
- 576,
- 1777,
- 2618,
- 3797
+ 572,
+ 1776,
+ 2547,
+ 3714
],
"target": [
580,
@@ -119,30 +119,30 @@
2605
],
"err": [
- -0.6,
- -1.2,
- 0.5
+ -1.4,
+ -1.3,
+ -2.2
]
},
"æ": {
"artic": {
- "tbX": 3.533,
- "tbY": 5.379,
- "jaw": 1.527,
- "lipAp": 1.86,
- "lipProt": 0.322,
+ "tbX": 3.265,
+ "tbY": 6.226,
+ "jaw": 1.587,
+ "lipAp": 1.925,
+ "lipProt": 0,
"lipWidth": 1,
- "root": -0.183,
- "larynx": 0.096,
- "ttX": 6.045,
- "ttY": 5.492,
- "ttCurl": 0.001
+ "root": -0.106,
+ "larynx": 0.353,
+ "ttX": 5.938,
+ "ttY": 5.736,
+ "ttCurl": 0
},
"formants": [
- 634,
- 1730,
- 2637,
- 3876
+ 626,
+ 1714,
+ 2556,
+ 3770
],
"target": [
640,
@@ -150,30 +150,30 @@
2500
],
"err": [
- -0.9,
- -1.7,
- 5.5
+ -2.2,
+ -2.6,
+ 2.2
]
},
"a": {
"artic": {
- "tbX": 2.161,
- "tbY": 5.731,
- "jaw": 1.729,
+ "tbX": 2.305,
+ "tbY": 5.715,
+ "jaw": 1.764,
"lipAp": 2,
"lipProt": 0,
"lipWidth": 1,
- "root": -0.254,
- "larynx": 0.501,
- "ttX": 5.54,
- "ttY": 5.443,
+ "root": -0.292,
+ "larynx": 0.351,
+ "ttX": 5.566,
+ "ttY": 5.407,
"ttCurl": 0
},
"formants": [
- 744,
- 1436,
- 2553,
- 4014
+ 733,
+ 1454,
+ 2520,
+ 3983
],
"target": [
780,
@@ -181,30 +181,30 @@
2550
],
"err": [
- -4.6,
- -1,
- 0.1
+ -6,
+ 0.3,
+ -1.2
]
},
"ɑ": {
"artic": {
- "tbX": 1.966,
- "tbY": 5.775,
- "jaw": 1.728,
+ "tbX": 2.027,
+ "tbY": 5.707,
+ "jaw": 1.759,
"lipAp": 2,
"lipProt": 0,
"lipWidth": 1,
- "root": -0.27,
- "larynx": 0.212,
- "ttX": 5.482,
- "ttY": 5.459,
+ "root": -0.246,
+ "larynx": 0.181,
+ "ttX": 5.485,
+ "ttY": 5.409,
"ttCurl": 0
},
"formants": [
- 741,
- 1330,
- 2528,
- 3950
+ 740,
+ 1338,
+ 2507,
+ 3966
],
"target": [
768,
@@ -212,30 +212,30 @@
2522
],
"err": [
- -3.5,
- -0.2,
- 0.3
+ -3.6,
+ 0.3,
+ -0.6
]
},
"ɒ": {
"artic": {
- "tbX": 1.333,
- "tbY": 5.818,
- "jaw": 1.539,
- "lipAp": 0.957,
- "lipProt": 0.354,
- "lipWidth": 0.476,
- "root": -0.239,
- "larynx": 0.016,
- "ttX": 5.38,
- "ttY": 5.633,
+ "tbX": 1.366,
+ "tbY": 5.803,
+ "jaw": 1.559,
+ "lipAp": 0.959,
+ "lipProt": 0.343,
+ "lipWidth": 0.48,
+ "root": -0.157,
+ "larynx": -0.032,
+ "ttX": 5.381,
+ "ttY": 5.611,
"ttCurl": 0
},
"formants": [
- 606,
- 890,
- 2529,
- 3898
+ 607,
+ 891,
+ 2471,
+ 3934
],
"target": [
620,
@@ -243,30 +243,30 @@
2500
],
"err": [
- -2.2,
- 1.1,
- 1.1
+ -2,
+ 1.3,
+ -1.2
]
},
"ɔ": {
"artic": {
- "tbX": 1.491,
- "tbY": 5.896,
- "jaw": 1.22,
- "lipAp": 0.851,
- "lipProt": 0.306,
- "lipWidth": 0.547,
- "root": -0.29,
- "larynx": 0.133,
- "ttX": 5.569,
- "ttY": 5.933,
- "ttCurl": 0
+ "tbX": 1.504,
+ "tbY": 6.109,
+ "jaw": 1.143,
+ "lipAp": 0.836,
+ "lipProt": 0.311,
+ "lipWidth": 0.532,
+ "root": -0.273,
+ "larynx": 0.165,
+ "ttX": 5.605,
+ "ttY": 6.076,
+ "ttCurl": 0.001
},
"formants": [
- 629,
- 1002,
- 2481,
- 3913
+ 628,
+ 1010,
+ 2418,
+ 3940
],
"target": [
652,
@@ -274,30 +274,30 @@
2538
],
"err": [
- -3.5,
- 0.5,
- -2.3
+ -3.7,
+ 1.3,
+ -4.7
]
},
"o": {
"artic": {
- "tbX": 1.885,
- "tbY": 6.87,
- "jaw": 1.022,
- "lipAp": 0.482,
- "lipProt": 1.4,
- "lipWidth": 0.127,
- "root": 0.596,
- "larynx": 0.586,
- "ttX": 5.768,
- "ttY": 6.457,
- "ttCurl": 0.006
+ "tbX": 1.77,
+ "tbY": 6.937,
+ "jaw": 0.919,
+ "lipAp": 0.233,
+ "lipProt": 1.399,
+ "lipWidth": 0.302,
+ "root": 0.496,
+ "larynx": 0.421,
+ "ttX": 5.778,
+ "ttY": 6.56,
+ "ttCurl": 0
},
"formants": [
- 490,
- 923,
- 2213,
- 3821
+ 491,
+ 924,
+ 2236,
+ 3714
],
"target": [
497,
@@ -305,30 +305,30 @@
2459
],
"err": [
- -1.4,
+ -1.3,
1.5,
- -10
+ -9.1
]
},
"ʊ": {
"artic": {
- "tbX": 2.489,
- "tbY": 6.894,
+ "tbX": 2.343,
+ "tbY": 7.161,
"jaw": 0.528,
"lipAp": 0.44,
- "lipProt": 1.4,
- "lipWidth": 0.154,
- "root": 0.421,
- "larynx": 0.342,
- "ttX": 6.145,
- "ttY": 6.89,
+ "lipProt": 1.387,
+ "lipWidth": 0.254,
+ "root": 0.448,
+ "larynx": 0.393,
+ "ttX": 6.101,
+ "ttY": 6.983,
"ttCurl": 0
},
"formants": [
467,
- 1127,
- 2284,
- 3681
+ 1125,
+ 2272,
+ 3685
],
"target": [
469,
@@ -336,30 +336,30 @@
2434
],
"err": [
- -0.3,
- 0.4,
- -6.1
+ -0.4,
+ 0.3,
+ -6.6
]
},
"u": {
"artic": {
- "tbX": 2.633,
- "tbY": 7.283,
- "jaw": 0.177,
- "lipAp": 0.122,
- "lipProt": 0.856,
- "lipWidth": 0.089,
- "root": 0.451,
- "larynx": -0.011,
- "ttX": 6.312,
- "ttY": 7.341,
+ "tbX": 2.426,
+ "tbY": 7.432,
+ "jaw": 0.196,
+ "lipAp": 0.3,
+ "lipProt": 1.4,
+ "lipWidth": 0.067,
+ "root": 0.446,
+ "larynx": 0.284,
+ "ttX": 6.243,
+ "ttY": 7.376,
"ttCurl": 0
},
"formants": [
- 377,
- 998,
- 2237,
- 3677
+ 378,
+ 997,
+ 2249,
+ 3733
],
"target": [
378,
@@ -367,30 +367,30 @@
2343
],
"err": [
- -0.4,
- 0.1,
- -4.5
+ 0,
+ 0,
+ -4
]
},
"ʌ": {
"artic": {
- "tbX": 1.858,
- "tbY": 5.449,
- "jaw": 1.1,
- "lipAp": 0.838,
- "lipProt": 0.35,
- "lipWidth": 0.71,
- "root": 0,
- "larynx": 0,
- "ttX": 5.73,
- "ttY": 5.881,
- "ttCurl": 0
+ "tbX": 1.96,
+ "tbY": 6.199,
+ "jaw": 0.935,
+ "lipAp": 0.693,
+ "lipProt": 0,
+ "lipWidth": 0.651,
+ "root": 0.24,
+ "larynx": 0.059,
+ "ttX": 5.828,
+ "ttY": 6.29,
+ "ttCurl": 0.001
},
"formants": [
- 623,
- 1200,
- 2550,
- 3928
+ 622,
+ 1212,
+ 2393,
+ 3816
],
"target": [
623,
@@ -398,30 +398,30 @@
2550
],
"err": [
- 0,
- 0,
- 0
+ -0.1,
+ 1,
+ -6.2
]
},
"ə": {
"artic": {
- "tbX": 2.881,
- "tbY": 7.023,
- "jaw": 0.832,
- "lipAp": 0.603,
- "lipProt": 0.354,
+ "tbX": 2.936,
+ "tbY": 6.647,
+ "jaw": 0.503,
+ "lipAp": 0.31,
+ "lipProt": 0,
"lipWidth": 0.54,
- "root": 0.425,
- "larynx": 0.238,
- "ttX": 6.146,
- "ttY": 6.667,
- "ttCurl": 0.001
+ "root": 0.393,
+ "larynx": 0.153,
+ "ttX": 6.288,
+ "ttY": 6.826,
+ "ttCurl": 0
},
"formants": [
- 501,
- 1455,
- 2321,
- 3690
+ 502,
+ 1456,
+ 2356,
+ 3618
],
"target": [
500,
@@ -429,30 +429,30 @@
2450
],
"err": [
- 0.2,
+ 0.5,
0.4,
- -5.3
+ -3.9
]
},
"ɐ": {
"artic": {
- "tbX": 2.24,
- "tbY": 5.538,
- "jaw": 1.4,
- "lipAp": 1.05,
- "lipProt": 0.246,
- "lipWidth": 0.67,
- "root": 0,
- "larynx": 0,
- "ttX": 5.715,
- "ttY": 5.654,
+ "tbX": 2.391,
+ "tbY": 6.042,
+ "jaw": 1.348,
+ "lipAp": 1.007,
+ "lipProt": 0,
+ "lipWidth": 0.667,
+ "root": 0.161,
+ "larynx": -0.004,
+ "ttX": 5.783,
+ "ttY": 5.875,
"ttCurl": 0
},
"formants": [
- 640,
- 1350,
- 2500,
- 3895
+ 638,
+ 1372,
+ 2405,
+ 3754
],
"target": [
640,
@@ -460,30 +460,30 @@
2500
],
"err": [
- 0,
- 0,
- 0
+ -0.3,
+ 1.6,
+ -3.8
]
},
"ɝ": {
"artic": {
- "tbX": 2.581,
- "tbY": 7.127,
- "jaw": 0.647,
- "lipAp": 0.69,
- "lipProt": 0.555,
- "lipWidth": 0.394,
+ "tbX": 2.804,
+ "tbY": 7.242,
+ "jaw": 0.905,
+ "lipAp": 0.64,
+ "lipProt": 0.598,
+ "lipWidth": 0.348,
"root": -0.9,
- "larynx": -0.818,
- "ttX": 5.728,
- "ttY": 8.866,
+ "larynx": -0.891,
+ "ttX": 5.694,
+ "ttY": 8.678,
"ttCurl": 1
},
"formants": [
- 464,
- 1346,
- 1848,
- 2968
+ 465,
+ 1359,
+ 1820,
+ 3033
],
"target": [
474,
@@ -491,30 +491,30 @@
1710
],
"err": [
- -2.2,
- -2.4,
- 8.1
+ -1.8,
+ -1.5,
+ 6.5
]
},
"y": {
"artic": {
- "tbX": 3.665,
- "tbY": 7.814,
- "jaw": 0.199,
- "lipAp": 0.172,
- "lipProt": 0.675,
- "lipWidth": 0,
- "root": 0.053,
- "larynx": 0.016,
- "ttX": 6.614,
- "ttY": 7.507,
+ "tbX": 3.478,
+ "tbY": 7.838,
+ "jaw": 0.203,
+ "lipAp": 0.3,
+ "lipProt": 1.371,
+ "lipWidth": 0.3,
+ "root": 0.039,
+ "larynx": 0.039,
+ "ttX": 6.557,
+ "ttY": 7.513,
"ttCurl": 0
},
"formants": [
300,
1800,
- 2136,
- 3647
+ 2135,
+ 3678
],
"target": [
300,
@@ -522,30 +522,30 @@
2150
],
"err": [
+ -0.1,
0,
- 0,
- -0.6
+ -0.7
]
},
"ø": {
"artic": {
- "tbX": 3.55,
- "tbY": 7.332,
- "jaw": 0.637,
- "lipAp": 0.325,
- "lipProt": 0.6,
- "lipWidth": 0.04,
- "root": 0.025,
- "larynx": 0.016,
- "ttX": 6.423,
- "ttY": 6.947,
+ "tbX": 3.461,
+ "tbY": 7.301,
+ "jaw": 0.61,
+ "lipAp": 0.323,
+ "lipProt": 0.598,
+ "lipWidth": 0.01,
+ "root": 0.173,
+ "larynx": 0.094,
+ "ttX": 6.406,
+ "ttY": 6.96,
"ttCurl": 0
},
"formants": [
390,
- 1550,
- 2247,
- 3399
+ 1551,
+ 2213,
+ 3439
],
"target": [
390,
@@ -553,30 +553,30 @@
2250
],
"err": [
+ 0.1,
0,
- 0,
- -0.1
+ -1.6
]
},
"œ": {
"artic": {
- "tbX": 3.048,
- "tbY": 6.091,
- "jaw": 1.025,
- "lipAp": 0.684,
- "lipProt": 0.777,
- "lipWidth": 0.297,
- "root": 0,
- "larynx": 0,
- "ttX": 6.118,
- "ttY": 6.171,
+ "tbX": 3.029,
+ "tbY": 6.635,
+ "jaw": 1.034,
+ "lipAp": 0.685,
+ "lipProt": 0.637,
+ "lipWidth": 0.301,
+ "root": 0.151,
+ "larynx": 0.093,
+ "ttX": 6.109,
+ "ttY": 6.353,
"ttCurl": 0
},
"formants": [
- 520,
- 1450,
- 2350,
- 3579
+ 518,
+ 1463,
+ 2295,
+ 3513
],
"target": [
520,
@@ -584,30 +584,30 @@
2350
],
"err": [
- 0,
- 0,
- 0
+ -0.5,
+ 0.9,
+ -2.3
]
},
"ɨ": {
"artic": {
- "tbX": 3.22,
- "tbY": 7.692,
- "jaw": 0.165,
- "lipAp": 0.162,
- "lipProt": 0.005,
- "lipWidth": 0.549,
- "root": 0.547,
- "larynx": 0.195,
- "ttX": 6.492,
- "ttY": 7.496,
- "ttCurl": 0
+ "tbX": 2.939,
+ "tbY": 7.71,
+ "jaw": 0.188,
+ "lipAp": 0.191,
+ "lipProt": 0.002,
+ "lipWidth": 1,
+ "root": 0.669,
+ "larynx": 0.241,
+ "ttX": 6.399,
+ "ttY": 7.483,
+ "ttCurl": 0.001
},
"formants": [
331,
1600,
- 2331,
- 3904
+ 2272,
+ 3778
],
"target": [
330,
@@ -617,28 +617,28 @@
"err": [
0.3,
0,
- -2.9
+ -5.3
]
},
"ɯ": {
"artic": {
- "tbX": 2.811,
- "tbY": 7.459,
- "jaw": 0.055,
- "lipAp": 0.19,
- "lipProt": 0.309,
- "lipWidth": 0.637,
- "root": 0.9,
- "larynx": 0.01,
- "ttX": 6.405,
- "ttY": 7.516,
- "ttCurl": 0.001
+ "tbX": 2.725,
+ "tbY": 7.631,
+ "jaw": 0.175,
+ "lipAp": 0.177,
+ "lipProt": 0.35,
+ "lipWidth": 0.55,
+ "root": 0.702,
+ "larynx": 0.273,
+ "ttX": 6.34,
+ "ttY": 7.465,
+ "ttCurl": 0
},
"formants": [
- 354,
- 1342,
- 2296,
- 3662
+ 341,
+ 1350,
+ 2284,
+ 3773
],
"target": [
340,
@@ -646,30 +646,30 @@
2400
],
"err": [
- 4.2,
- -0.6,
- -4.3
+ 0.4,
+ 0,
+ -4.8
]
},
"ɤ": {
"artic": {
- "tbX": 2.602,
- "tbY": 7.127,
- "jaw": 0.491,
- "lipAp": 0.316,
- "lipProt": 0.355,
- "lipWidth": 0.534,
- "root": 0.5,
- "larynx": 0.357,
- "ttX": 6.192,
- "ttY": 7.005,
+ "tbX": 2.258,
+ "tbY": 7.257,
+ "jaw": 0.637,
+ "lipAp": 0.465,
+ "lipProt": 0.352,
+ "lipWidth": 0.545,
+ "root": 0.642,
+ "larynx": 0.392,
+ "ttX": 6.035,
+ "ttY": 6.921,
"ttCurl": 0
},
"formants": [
- 460,
- 1256,
- 2309,
- 3830
+ 461,
+ 1251,
+ 2284,
+ 3720
],
"target": [
460,
@@ -677,32 +677,32 @@
2450
],
"err": [
- 0,
- 0.5,
- -5.8
+ 0.2,
+ 0.1,
+ -6.8
]
}
},
"female": {
"i": {
"artic": {
- "tbX": 3.757,
- "tbY": 7.68,
- "jaw": 0.557,
- "lipAp": 1.178,
+ "tbX": 3.746,
+ "tbY": 7.655,
+ "jaw": 0.508,
+ "lipAp": 1.132,
"lipProt": 0,
"lipWidth": 1,
- "root": 0.276,
- "larynx": 0.825,
- "ttX": 6.515,
- "ttY": 7.139,
+ "root": 0.332,
+ "larynx": 1.016,
+ "ttX": 6.529,
+ "ttY": 7.175,
"ttCurl": 0
},
"formants": [
- 424,
- 2643,
- 3201,
- 4499
+ 428,
+ 2670,
+ 3235,
+ 4543
],
"target": [
437,
@@ -710,30 +710,30 @@
3372
],
"err": [
- -3.1,
- -4.3,
- -5.1
+ -2,
+ -3.3,
+ -4.1
]
},
"ɪ": {
"artic": {
- "tbX": 3.824,
- "tbY": 7.342,
- "jaw": 0.548,
- "lipAp": 1.12,
+ "tbX": 3.65,
+ "tbY": 7.423,
+ "jaw": 0.587,
+ "lipAp": 1.16,
"lipProt": 0,
"lipWidth": 1,
- "root": 0.072,
- "larynx": 0.118,
- "ttX": 6.538,
- "ttY": 7.029,
+ "root": 0.07,
+ "larynx": 0.165,
+ "ttX": 6.471,
+ "ttY": 7.023,
"ttCurl": 0
},
"formants": [
481,
- 2345,
- 3030,
- 4391
+ 2357,
+ 2967,
+ 4299
],
"target": [
483,
@@ -741,30 +741,30 @@
3053
],
"err": [
+ -0.5,
-0.3,
- -0.8,
- -0.7
+ -2.8
]
},
"e": {
"artic": {
- "tbX": 3.628,
- "tbY": 7.385,
- "jaw": 0.908,
- "lipAp": 1.439,
+ "tbX": 3.577,
+ "tbY": 7.384,
+ "jaw": 0.918,
+ "lipAp": 1.451,
"lipProt": 0,
"lipWidth": 1,
- "root": 0.196,
- "larynx": 0.714,
- "ttX": 6.34,
- "ttY": 6.726,
+ "root": 0.105,
+ "larynx": 0.81,
+ "ttX": 6.321,
+ "ttY": 6.716,
"ttCurl": 0
},
"formants": [
522,
- 2417,
- 3011,
- 4448
+ 2406,
+ 2999,
+ 4453
],
"target": [
536,
@@ -772,30 +772,30 @@
3047
],
"err": [
- -2.7,
- -4.5,
- -1.2
+ -2.6,
+ -4.9,
+ -1.6
]
},
"ɛ": {
"artic": {
- "tbX": 3.246,
- "tbY": 6.134,
- "jaw": 1.251,
- "lipAp": 1.684,
+ "tbX": 3.101,
+ "tbY": 6.531,
+ "jaw": 1.277,
+ "lipAp": 1.705,
"lipProt": 0,
"lipWidth": 1,
- "root": 0.011,
- "larynx": 0.395,
- "ttX": 6.08,
- "ttY": 6,
- "ttCurl": 0.005
+ "root": -0.077,
+ "larynx": 0.746,
+ "ttX": 6.027,
+ "ttY": 6.106,
+ "ttCurl": 0
},
"formants": [
- 717,
- 2014,
- 2989,
- 4453
+ 713,
+ 2033,
+ 2971,
+ 4475
],
"target": [
731,
@@ -803,30 +803,30 @@
2979
],
"err": [
- -1.9,
- -2.1,
- 0.3
+ -2.5,
+ -1.2,
+ -0.3
]
},
"æ": {
"artic": {
- "tbX": 4.329,
- "tbY": 5.141,
- "jaw": 1.502,
- "lipAp": 1.837,
- "lipProt": 0.091,
+ "tbX": 3.644,
+ "tbY": 6.45,
+ "jaw": 1.565,
+ "lipAp": 1.916,
+ "lipProt": 0,
"lipWidth": 1,
- "root": -0.198,
- "larynx": 0.535,
- "ttX": 6.296,
- "ttY": 5.428,
+ "root": -0.03,
+ "larynx": 0.806,
+ "ttX": 6.061,
+ "ttY": 5.832,
"ttCurl": 0
},
"formants": [
- 666,
- 2260,
- 3243,
- 4474
+ 657,
+ 2204,
+ 3124,
+ 4472
],
"target": [
669,
@@ -834,30 +834,30 @@
2972
],
"err": [
- -0.4,
- -3.8,
- 9.1
+ -1.8,
+ -6.2,
+ 5.1
]
},
"a": {
"artic": {
- "tbX": 2.072,
- "tbY": 5.688,
- "jaw": 1.728,
+ "tbX": 2.222,
+ "tbY": 5.785,
+ "jaw": 1.778,
"lipAp": 2,
"lipProt": 0,
"lipWidth": 1,
- "root": -0.295,
- "larynx": 0.69,
- "ttX": 5.514,
- "ttY": 5.429,
+ "root": -0.311,
+ "larynx": 0.626,
+ "ttX": 5.535,
+ "ttY": 5.42,
"ttCurl": 0
},
"formants": [
- 852,
- 1712,
- 2934,
- 4435
+ 840,
+ 1735,
+ 2887,
+ 4545
],
"target": [
913,
@@ -865,30 +865,30 @@
2933
],
"err": [
- -6.7,
- -1.6,
- 0
+ -8,
+ -0.3,
+ -1.6
]
},
"ɑ": {
"artic": {
- "tbX": 1.783,
- "tbY": 5.944,
- "jaw": 1.73,
+ "tbX": 1.858,
+ "tbY": 5.835,
+ "jaw": 1.853,
"lipAp": 2,
"lipProt": 0,
"lipWidth": 1,
- "root": -0.572,
- "larynx": 0.608,
- "ttX": 5.426,
- "ttY": 5.517,
+ "root": -0.534,
+ "larynx": 0.506,
+ "ttX": 5.389,
+ "ttY": 5.375,
"ttCurl": 0
},
"formants": [
- 865,
- 1544,
- 2848,
- 4464
+ 858,
+ 1553,
+ 2820,
+ 4543
],
"target": [
936,
@@ -896,29 +896,29 @@
2815
],
"err": [
- -7.6,
- -0.4,
- 1.2
+ -8.4,
+ 0.1,
+ 0.2
]
},
"ɒ": {
"artic": {
- "tbX": 1.304,
- "tbY": 5.782,
- "jaw": 1.513,
- "lipAp": 0.997,
- "lipProt": 0.326,
- "lipWidth": 0.518,
- "root": -0.226,
- "larynx": 0.059,
- "ttX": 5.383,
- "ttY": 5.643,
- "ttCurl": 0
+ "tbX": 1.332,
+ "tbY": 5.86,
+ "jaw": 1.486,
+ "lipAp": 0.993,
+ "lipProt": 0.318,
+ "lipWidth": 0.519,
+ "root": -0.18,
+ "larynx": 0.005,
+ "ttX": 5.403,
+ "ttY": 5.694,
+ "ttCurl": 0.001
},
"formants": [
- 706,
- 1063,
- 2831
+ 704,
+ 1069,
+ 2757
],
"target": [
725,
@@ -926,30 +926,29 @@
2875
],
"err": [
- -2.7,
- 0.7,
- -1.5
+ -2.9,
+ 1.2,
+ -4.1
]
},
"ɔ": {
"artic": {
- "tbX": 1.37,
- "tbY": 6.087,
- "jaw": 1.244,
- "lipAp": 0.901,
- "lipProt": 0.279,
- "lipWidth": 0.595,
- "root": -0.521,
- "larynx": 0.32,
- "ttX": 5.522,
- "ttY": 5.979,
+ "tbX": 1.403,
+ "tbY": 6.232,
+ "jaw": 1.253,
+ "lipAp": 0.895,
+ "lipProt": 0.285,
+ "lipWidth": 0.582,
+ "root": -0.57,
+ "larynx": 0.24,
+ "ttX": 5.528,
+ "ttY": 6.022,
"ttCurl": 0
},
"formants": [
- 732,
- 1153,
- 2755,
- 4556
+ 728,
+ 1162,
+ 2700
],
"target": [
781,
@@ -957,30 +956,30 @@
2824
],
"err": [
- -6.2,
- 1.5,
- -2.5
+ -6.7,
+ 2.3,
+ -4.4
]
},
"o": {
"artic": {
- "tbX": 1.991,
- "tbY": 6.966,
- "jaw": 1.013,
- "lipAp": 0.547,
- "lipProt": 1.395,
- "lipWidth": 0.148,
- "root": 0.33,
- "larynx": 0.512,
- "ttX": 5.806,
- "ttY": 6.488,
+ "tbX": 1.879,
+ "tbY": 7.125,
+ "jaw": 0.994,
+ "lipAp": 0.304,
+ "lipProt": 1.4,
+ "lipWidth": 0.304,
+ "root": 0.269,
+ "larynx": 0.469,
+ "ttX": 5.781,
+ "ttY": 6.56,
"ttCurl": 0
},
"formants": [
- 545,
- 1051,
- 2616,
- 4342
+ 546,
+ 1048,
+ 2643,
+ 4234
],
"target": [
555,
@@ -988,30 +987,30 @@
2828
],
"err": [
- -1.8,
- 1.6,
- -7.5
+ -1.6,
+ 1.2,
+ -6.5
]
},
"ʊ": {
"artic": {
- "tbX": 2.506,
- "tbY": 7.103,
- "jaw": 0.591,
- "lipAp": 0.394,
- "lipProt": 1.394,
+ "tbX": 2.34,
+ "tbY": 7.274,
+ "jaw": 0.571,
+ "lipAp": 0.374,
+ "lipProt": 1.4,
"lipWidth": 0.301,
- "root": 0.269,
- "larynx": 0.296,
- "ttX": 6.126,
- "ttY": 6.908,
- "ttCurl": 0.001
+ "root": 0.343,
+ "larynx": 0.395,
+ "ttX": 6.084,
+ "ttY": 6.985,
+ "ttCurl": 0
},
"formants": [
- 516,
- 1230,
- 2727,
- 4236
+ 517,
+ 1229,
+ 2713,
+ 4316
],
"target": [
519,
@@ -1019,30 +1018,30 @@
2827
],
"err": [
- -0.6,
- 0.4,
- -3.5
+ -0.5,
+ 0.3,
+ -4
]
},
"u": {
"artic": {
- "tbX": 1.851,
- "tbY": 7.769,
- "jaw": 0.764,
- "lipAp": 0.305,
- "lipProt": 0.556,
- "lipWidth": 0.308,
- "root": -0.9,
- "larynx": -1.3,
- "ttX": 5.821,
- "ttY": 7.202,
- "ttCurl": 0.108
+ "tbX": 2.256,
+ "tbY": 7.388,
+ "jaw": 0.263,
+ "lipAp": 0.194,
+ "lipProt": 1.4,
+ "lipWidth": 0.301,
+ "root": 0.206,
+ "larynx": 0.237,
+ "ttX": 6.17,
+ "ttY": 7.3,
+ "ttCurl": 0
},
"formants": [
- 284,
- 2000,
- 2484,
- 4319
+ 457,
+ 1107,
+ 2657,
+ 4413
],
"target": [
459,
@@ -1050,30 +1049,29 @@
2735
],
"err": [
- -38,
- 81,
- -9.2
+ -0.4,
+ 0.2,
+ -2.8
]
},
"ʌ": {
"artic": {
- "tbX": 1.74,
- "tbY": 5.289,
- "jaw": 1.1,
- "lipAp": 1.391,
- "lipProt": 0.343,
- "lipWidth": 0.797,
- "root": 0,
- "larynx": 0,
- "ttX": 5.695,
- "ttY": 5.825,
+ "tbX": 1.891,
+ "tbY": 6.293,
+ "jaw": 1.053,
+ "lipAp": 0.894,
+ "lipProt": 0,
+ "lipWidth": 1,
+ "root": 0.178,
+ "larynx": 0.086,
+ "ttX": 5.759,
+ "ttY": 6.217,
"ttCurl": 0
},
"formants": [
- 753,
- 1426,
- 2933,
- 4577
+ 748,
+ 1447,
+ 2729
],
"target": [
753,
@@ -1081,30 +1079,30 @@
2933
],
"err": [
- 0,
- 0,
- 0
+ -0.7,
+ 1.5,
+ -7
]
},
"ə": {
"artic": {
- "tbX": 2.99,
- "tbY": 7.037,
- "jaw": 0.944,
- "lipAp": 0.707,
- "lipProt": 0.35,
- "lipWidth": 0.774,
- "root": 0.159,
- "larynx": 0.136,
- "ttX": 6.134,
- "ttY": 6.573,
+ "tbX": 2.976,
+ "tbY": 6.838,
+ "jaw": 0.749,
+ "lipAp": 0.531,
+ "lipProt": 0,
+ "lipWidth": 0.544,
+ "root": 0.262,
+ "larynx": 0.111,
+ "ttX": 6.207,
+ "ttY": 6.675,
"ttCurl": 0
},
"formants": [
- 584,
- 1743,
- 2756,
- 4241
+ 587,
+ 1745,
+ 2741,
+ 4248
],
"target": [
585,
@@ -1112,29 +1110,30 @@
2818
],
"err": [
- -0.1,
- 0.1,
- -2.2
+ 0.4,
+ 0.3,
+ -2.7
]
},
"ɐ": {
"artic": {
- "tbX": 2.163,
- "tbY": 5.406,
- "jaw": 1.399,
- "lipAp": 1.587,
- "lipProt": 0.286,
- "lipWidth": 0.594,
- "root": 0,
- "larynx": 0,
- "ttX": 5.692,
- "ttY": 5.608,
+ "tbX": 2.392,
+ "tbY": 6.13,
+ "jaw": 1.393,
+ "lipAp": 1.124,
+ "lipProt": 0,
+ "lipWidth": 1,
+ "root": 0.139,
+ "larynx": 0.032,
+ "ttX": 5.763,
+ "ttY": 5.866,
"ttCurl": 0
},
"formants": [
- 749,
- 1620,
- 2875
+ 744,
+ 1646,
+ 2769,
+ 4459
],
"target": [
749,
@@ -1142,30 +1141,30 @@
2875
],
"err": [
- 0,
- 0,
- 0
+ -0.6,
+ 1.6,
+ -3.7
]
},
"ɝ": {
"artic": {
- "tbX": 3.174,
- "tbY": 7.114,
- "jaw": 0.962,
- "lipAp": 0.668,
- "lipProt": 1.235,
- "lipWidth": 0.391,
- "root": -0.842,
- "larynx": -1.072,
- "ttX": 5.801,
- "ttY": 8.488,
- "ttCurl": 0.952
+ "tbX": 2.85,
+ "tbY": 7.334,
+ "jaw": 0.824,
+ "lipAp": 0.645,
+ "lipProt": 0.592,
+ "lipWidth": 0.35,
+ "root": -0.898,
+ "larynx": -0.829,
+ "ttX": 5.741,
+ "ttY": 8.777,
+ "ttCurl": 0.998
},
"formants": [
- 516,
- 1547,
- 2216,
- 3401
+ 508,
+ 1567,
+ 2173,
+ 3414
],
"target": [
523,
@@ -1173,30 +1172,30 @@
1929
],
"err": [
- -1.3,
- -2.6,
- 14.9
+ -2.8,
+ -1.4,
+ 12.6
]
},
"y": {
"artic": {
- "tbX": 3.504,
- "tbY": 7.881,
- "jaw": 0.217,
- "lipAp": 0.301,
- "lipProt": 0.6,
- "lipWidth": 0.301,
- "root": -0.272,
- "larynx": -0.087,
- "ttX": 6.559,
- "ttY": 7.514,
- "ttCurl": 0
+ "tbX": 3.501,
+ "tbY": 7.868,
+ "jaw": 0.225,
+ "lipAp": 0.303,
+ "lipProt": 0.741,
+ "lipWidth": 0.303,
+ "root": -0.308,
+ "larynx": 0.213,
+ "ttX": 6.556,
+ "ttY": 7.505,
+ "ttCurl": 0.001
},
"formants": [
- 351,
+ 350,
2159,
2514,
- 4453
+ 4499
],
"target": [
351,
@@ -1204,30 +1203,30 @@
2473
],
"err": [
- -0.1,
+ -0.2,
-0.1,
1.7
]
},
"ø": {
"artic": {
- "tbX": 3.53,
- "tbY": 7.388,
- "jaw": 0.67,
- "lipAp": 0.449,
- "lipProt": 1.189,
- "lipWidth": 0.301,
- "root": -0.099,
- "larynx": -0.052,
- "ttX": 6.404,
- "ttY": 6.936,
+ "tbX": 3.458,
+ "tbY": 7.421,
+ "jaw": 0.648,
+ "lipAp": 0.508,
+ "lipProt": 1.09,
+ "lipWidth": 0.265,
+ "root": -0.027,
+ "larynx": -0.027,
+ "ttX": 6.391,
+ "ttY": 6.968,
"ttCurl": 0
},
"formants": [
- 456,
+ 457,
1859,
- 2608,
- 3892
+ 2595,
+ 3971
],
"target": [
456,
@@ -1237,28 +1236,28 @@
"err": [
0,
0,
- 0.8
+ 0.3
]
},
"œ": {
"artic": {
- "tbX": 3.083,
- "tbY": 6.591,
- "jaw": 1.002,
- "lipAp": 0.744,
+ "tbX": 3.071,
+ "tbY": 6.652,
+ "jaw": 1.044,
+ "lipAp": 0.748,
"lipProt": 0.573,
- "lipWidth": 0.375,
- "root": -0.175,
- "larynx": 0.087,
- "ttX": 6.138,
- "ttY": 6.366,
+ "lipWidth": 0.379,
+ "root": -0.208,
+ "larynx": 0.166,
+ "ttX": 6.118,
+ "ttY": 6.351,
"ttCurl": 0
},
"formants": [
- 599,
- 1723,
- 2713,
- 4148
+ 596,
+ 1732,
+ 2700,
+ 4145
],
"target": [
608,
@@ -1266,30 +1265,29 @@
2703
],
"err": [
- -1.6,
- -1,
- 0.4
+ -2.1,
+ -0.5,
+ -0.1
]
},
"ɨ": {
"artic": {
- "tbX": 3.183,
- "tbY": 7.729,
- "jaw": 0.414,
- "lipAp": 0.458,
- "lipProt": 0.229,
- "lipWidth": 0.55,
- "root": 0.144,
- "larynx": 0.06,
- "ttX": 6.395,
- "ttY": 7.284,
+ "tbX": 2.866,
+ "tbY": 7.732,
+ "jaw": 0.195,
+ "lipAp": 0.644,
+ "lipProt": 0.35,
+ "lipWidth": 0.78,
+ "root": 0.339,
+ "larynx": 0.172,
+ "ttX": 6.376,
+ "ttY": 7.482,
"ttCurl": 0
},
"formants": [
386,
1920,
- 2741,
- 4456
+ 2698
],
"target": [
386,
@@ -1299,28 +1297,28 @@
"err": [
0,
0,
- -0.7
+ -2.2
]
},
"ɯ": {
"artic": {
- "tbX": 2.806,
- "tbY": 7.503,
- "jaw": 0.052,
- "lipAp": 0.253,
+ "tbX": 2.648,
+ "tbY": 7.644,
+ "jaw": 0.182,
+ "lipAp": 0.263,
"lipProt": 0,
- "lipWidth": 0.997,
- "root": 0.851,
- "larynx": 0.033,
- "ttX": 6.4,
- "ttY": 7.555,
- "ttCurl": 0.012
+ "lipWidth": 1,
+ "root": 0.364,
+ "larynx": 0.186,
+ "ttX": 6.314,
+ "ttY": 7.464,
+ "ttCurl": 0
},
"formants": [
- 407,
- 1615,
- 2790,
- 4459
+ 399,
+ 1620,
+ 2699,
+ 4573
],
"target": [
398,
@@ -1328,30 +1326,30 @@
2760
],
"err": [
- 2.2,
- -0.3,
- 1.1
+ 0.2,
+ 0,
+ -2.2
]
},
"ɤ": {
"artic": {
- "tbX": 2.701,
- "tbY": 7.185,
- "jaw": 0.671,
- "lipAp": 0.485,
- "lipProt": 0.354,
- "lipWidth": 0.542,
- "root": 0.279,
- "larynx": 0.195,
- "ttX": 6.155,
- "ttY": 6.864,
+ "tbX": 2.315,
+ "tbY": 7.3,
+ "jaw": 0.687,
+ "lipAp": 0.514,
+ "lipProt": 0,
+ "lipWidth": 0.837,
+ "root": 0.431,
+ "larynx": 0.283,
+ "ttX": 6.033,
+ "ttY": 6.891,
"ttCurl": 0
},
"formants": [
- 538,
- 1504,
- 2742,
- 4411
+ 539,
+ 1500,
+ 2699,
+ 4488
],
"target": [
538,
@@ -1359,31 +1357,31 @@
2818
],
"err": [
- -0.1,
- 0.3,
- -2.7
+ 0.2,
+ 0,
+ -4.2
]
}
},
"child": {
"i": {
"artic": {
- "tbX": 3.903,
- "tbY": 7.7,
- "jaw": 0.2,
- "lipAp": 0.208,
- "lipProt": 0.343,
- "lipWidth": 0.996,
- "root": 0,
- "larynx": 0,
- "ttX": 6.685,
- "ttY": 7.466,
- "ttCurl": 0
+ "tbX": 3.72,
+ "tbY": 7.753,
+ "jaw": 0.094,
+ "lipAp": 0.381,
+ "lipProt": 0,
+ "lipWidth": 0.636,
+ "root": 0.095,
+ "larynx": -0.002,
+ "ttX": 6.665,
+ "ttY": 7.583,
+ "ttCurl": 0.001
},
"formants": [
- 452,
- 3081,
- 3702
+ 453,
+ 3102,
+ 3632
],
"target": [
452,
@@ -1391,29 +1389,29 @@
3702
],
"err": [
- 0,
- 0,
- 0
+ 0.1,
+ 0.7,
+ -1.9
]
},
"ɪ": {
"artic": {
- "tbX": 3.315,
- "tbY": 7.757,
- "jaw": 0.517,
- "lipAp": 0.491,
- "lipProt": 0.35,
- "lipWidth": 0.954,
- "root": -0.289,
- "larynx": -0.122,
- "ttX": 6.397,
- "ttY": 7.202,
+ "tbX": 3.379,
+ "tbY": 7.696,
+ "jaw": 0.486,
+ "lipAp": 0.363,
+ "lipProt": 0,
+ "lipWidth": 0.55,
+ "root": 0.007,
+ "larynx": -0.024,
+ "ttX": 6.427,
+ "ttY": 7.208,
"ttCurl": 0
},
"formants": [
- 511,
+ 512,
2551,
- 3457
+ 3416
],
"target": [
511,
@@ -1421,29 +1419,29 @@
3403
],
"err": [
- -0.1,
+ 0.1,
0,
- 1.6
+ 0.4
]
},
"e": {
"artic": {
- "tbX": 3.559,
- "tbY": 7.554,
- "jaw": 0.703,
- "lipAp": 0.585,
- "lipProt": 0.353,
- "lipWidth": 0.549,
- "root": -0.367,
- "larynx": -0.129,
- "ttX": 6.399,
- "ttY": 6.968,
- "ttCurl": 0.001
+ "tbX": 3.484,
+ "tbY": 7.553,
+ "jaw": 0.678,
+ "lipAp": 0.704,
+ "lipProt": 0.351,
+ "lipWidth": 0.55,
+ "root": -0.202,
+ "larynx": -0.135,
+ "ttX": 6.387,
+ "ttY": 6.987,
+ "ttCurl": 0
},
"formants": [
- 562,
- 2656,
- 3402
+ 564,
+ 2651,
+ 3386
],
"target": [
564,
@@ -1451,29 +1449,29 @@
3323
],
"err": [
- -0.4,
0,
- 2.4
+ -0.2,
+ 1.9
]
},
"ɛ": {
"artic": {
- "tbX": 3.009,
- "tbY": 7.056,
- "jaw": 1.058,
- "lipAp": 1.456,
- "lipProt": 0.351,
- "lipWidth": 0.549,
- "root": -0.292,
- "larynx": -0.185,
- "ttX": 6.093,
- "ttY": 6.481,
- "ttCurl": 0.001
+ "tbX": 3.124,
+ "tbY": 6.839,
+ "jaw": 1.113,
+ "lipAp": 1.132,
+ "lipProt": 0.355,
+ "lipWidth": 0.548,
+ "root": -0.3,
+ "larynx": -0.152,
+ "ttX": 6.104,
+ "ttY": 6.356,
+ "ttCurl": 0
},
"formants": [
- 749,
- 2264,
- 3387
+ 745,
+ 2274,
+ 3402
],
"target": [
749,
@@ -1481,29 +1479,29 @@
3310
],
"err": [
- 0,
- -0.1,
- 2.3
+ -0.5,
+ 0.3,
+ 2.8
]
},
"æ": {
"artic": {
- "tbX": 3.236,
- "tbY": 7.218,
- "jaw": 1.474,
- "lipAp": 1.452,
- "lipProt": 0.354,
- "lipWidth": 0.978,
- "root": -0.412,
- "larynx": -0.146,
- "ttX": 5.981,
- "ttY": 6.179,
+ "tbX": 3.534,
+ "tbY": 6.687,
+ "jaw": 1.455,
+ "lipAp": 1.473,
+ "lipProt": 0.358,
+ "lipWidth": 0.547,
+ "root": -0.48,
+ "larynx": -0.227,
+ "ttX": 6.079,
+ "ttY": 6.009,
"ttCurl": 0
},
"formants": [
- 715,
- 2496,
- 3398
+ 719,
+ 2469,
+ 3475
],
"target": [
717,
@@ -1511,29 +1509,29 @@
3289
],
"err": [
- -0.2,
- -0.2,
- 3.3
+ 0.2,
+ -1.3,
+ 5.7
]
},
"a": {
"artic": {
- "tbX": 1.895,
- "tbY": 6.435,
- "jaw": 1.732,
+ "tbX": 2.076,
+ "tbY": 6.177,
+ "jaw": 1.952,
"lipAp": 2,
- "lipProt": 0,
+ "lipProt": 0.323,
"lipWidth": 1,
- "root": -0.494,
- "larynx": -0.08,
- "ttX": 5.459,
- "ttY": 5.686,
+ "root": -0.56,
+ "larynx": -0.058,
+ "ttX": 5.407,
+ "ttY": 5.413,
"ttCurl": 0
},
"formants": [
- 1001,
- 1916,
- 3331
+ 987,
+ 1959,
+ 3333
],
"target": [
1014,
@@ -1541,29 +1539,29 @@
3162
],
"err": [
- -1.3,
- -0.6,
- 5.3
+ -2.6,
+ 1.6,
+ 5.4
]
},
"ɑ": {
"artic": {
- "tbX": 1.437,
- "tbY": 6.434,
- "jaw": 2.067,
+ "tbX": 1.7,
+ "tbY": 6.233,
+ "jaw": 2.006,
"lipAp": 2,
- "lipProt": 0.063,
- "lipWidth": 1,
- "root": -0.505,
- "larynx": 0.039,
- "ttX": 5.158,
- "ttY": 5.408,
+ "lipProt": 0.361,
+ "lipWidth": 0.761,
+ "root": -0.9,
+ "larynx": -0.345,
+ "ttX": 5.267,
+ "ttY": 5.387,
"ttCurl": 0
},
"formants": [
- 981,
- 1697,
- 3083
+ 985,
+ 1709,
+ 3214
],
"target": [
1002,
@@ -1571,29 +1569,29 @@
2950
],
"err": [
- -2.1,
- 0.5,
- 4.5
+ -1.7,
+ 1.2,
+ 9
]
},
"ɒ": {
"artic": {
"tbX": 1.2,
- "tbY": 6.423,
- "jaw": 1.878,
- "lipAp": 0.932,
- "lipProt": 1.4,
- "lipWidth": 0.432,
- "root": -0.057,
- "larynx": -0.093,
- "ttX": 5.179,
- "ttY": 5.565,
- "ttCurl": 0.003
+ "tbY": 6.165,
+ "jaw": 1.787,
+ "lipAp": 0.947,
+ "lipProt": 1.075,
+ "lipWidth": 0.476,
+ "root": -0.056,
+ "larynx": -0.217,
+ "ttX": 5.224,
+ "ttY": 5.545,
+ "ttCurl": 0
},
"formants": [
- 784,
- 1213,
- 3011
+ 791,
+ 1203,
+ 3264
],
"target": [
806,
@@ -1601,29 +1599,29 @@
3100
],
"err": [
- -2.7,
- 3.6,
- -2.9
+ -1.9,
+ 2.8,
+ 5.3
]
},
"ɔ": {
"artic": {
- "tbX": 1.2,
- "tbY": 6.42,
- "jaw": 1.304,
+ "tbX": 1.22,
+ "tbY": 6.771,
+ "jaw": 1.398,
"lipAp": 0.761,
- "lipProt": 1.119,
+ "lipProt": 1.031,
"lipWidth": 0.459,
- "root": -0.141,
- "larynx": -0.044,
- "ttX": 5.445,
- "ttY": 6.045,
- "ttCurl": 0
+ "root": -0.453,
+ "larynx": -0.052,
+ "ttX": 5.41,
+ "ttY": 6.088,
+ "ttCurl": 0.001
},
"formants": [
788,
- 1236,
- 2992
+ 1229,
+ 3098
],
"target": [
803,
@@ -1631,29 +1629,29 @@
2982
],
"err": [
- -1.8,
- 2.2,
- 0.3
+ -1.9,
+ 1.6,
+ 3.9
]
},
"o": {
"artic": {
- "tbX": 1.621,
- "tbY": 7.075,
- "jaw": 0.671,
- "lipAp": 0.545,
- "lipProt": 1.4,
- "lipWidth": 0.233,
- "root": 0.028,
- "larynx": -0.067,
- "ttX": 5.831,
- "ttY": 6.828,
- "ttCurl": 0.001
+ "tbX": 1.862,
+ "tbY": 7.266,
+ "jaw": 0.787,
+ "lipAp": 0.129,
+ "lipProt": 1.188,
+ "lipWidth": 0.301,
+ "root": -0.587,
+ "larynx": -0.227,
+ "ttX": 5.858,
+ "ttY": 6.79,
+ "ttCurl": 0
},
"formants": [
- 599,
- 1135,
- 3004
+ 596,
+ 1139,
+ 3066
],
"target": [
597,
@@ -1661,29 +1659,29 @@
2987
],
"err": [
- 0.4,
-0.2,
- 0.6
+ 0.2,
+ 2.6
]
},
"ʊ": {
"artic": {
- "tbX": 2.49,
- "tbY": 7.318,
- "jaw": 0.576,
- "lipAp": 0.436,
- "lipProt": 0.599,
- "lipWidth": 0.309,
- "root": -0.65,
- "larynx": -0.295,
- "ttX": 6.127,
- "ttY": 6.996,
+ "tbX": 2.335,
+ "tbY": 7.487,
+ "jaw": 0.498,
+ "lipAp": 0.368,
+ "lipProt": 0.6,
+ "lipWidth": 0.266,
+ "root": -0.495,
+ "larynx": -0.248,
+ "ttX": 6.109,
+ "ttY": 7.124,
"ttCurl": 0
},
"formants": [
568,
- 1489,
- 3179
+ 1490,
+ 3162
],
"target": [
568,
@@ -1691,29 +1689,29 @@
3072
],
"err": [
+ 0.1,
0,
- -0.1,
- 3.5
+ 2.9
]
},
"u": {
"artic": {
- "tbX": 2.513,
- "tbY": 7.448,
- "jaw": 0.508,
- "lipAp": 0.291,
- "lipProt": 1.121,
- "lipWidth": 0.302,
- "root": -0.445,
- "larynx": -0.452,
- "ttX": 6.155,
- "ttY": 7.122,
- "ttCurl": 0.01
+ "tbX": 2.334,
+ "tbY": 7.569,
+ "jaw": 0.166,
+ "lipAp": 0.3,
+ "lipProt": 0.651,
+ "lipWidth": 0.057,
+ "root": -0.652,
+ "larynx": -0.325,
+ "ttX": 6.226,
+ "ttY": 7.452,
+ "ttCurl": 0
},
"formants": [
- 496,
- 1343,
- 3176
+ 495,
+ 1344,
+ 3081
],
"target": [
494,
@@ -1721,29 +1719,29 @@
2988
],
"err": [
- 0.3,
+ 0.2,
-0.1,
- 6.3
+ 3.1
]
},
"ʌ": {
"artic": {
- "tbX": 1.725,
- "tbY": 6.997,
- "jaw": 1.105,
- "lipAp": 0.829,
- "lipProt": 0.291,
- "lipWidth": 0.703,
- "root": -0.007,
- "larynx": -0.004,
- "ttX": 5.688,
- "ttY": 6.418,
+ "tbX": 1.915,
+ "tbY": 7.103,
+ "jaw": 0.882,
+ "lipAp": 0.578,
+ "lipProt": 0.373,
+ "lipWidth": 0.512,
+ "root": -0.172,
+ "larynx": -0.16,
+ "ttX": 5.837,
+ "ttY": 6.65,
"ttCurl": 0
},
"formants": [
749,
- 1546,
- 3147
+ 1565,
+ 3212
],
"target": [
749,
@@ -1751,29 +1749,29 @@
3145
],
"err": [
- 0,
- 0,
- 0.1
+ -0.1,
+ 1.2,
+ 2.1
]
},
"ə": {
"artic": {
- "tbX": 2.126,
- "tbY": 7.173,
- "jaw": 1.035,
- "lipAp": 1.493,
- "lipProt": 0,
+ "tbX": 2.54,
+ "tbY": 7.427,
+ "jaw": 0.801,
+ "lipAp": 0.56,
+ "lipProt": 0.359,
"lipWidth": 1,
- "root": -0.508,
- "larynx": -0.187,
- "ttX": 5.838,
- "ttY": 6.542,
+ "root": -0.519,
+ "larynx": -0.357,
+ "ttX": 6.056,
+ "ttY": 6.834,
"ttCurl": 0
},
"formants": [
- 650,
- 1918,
- 3131
+ 652,
+ 1937,
+ 3146
],
"target": [
650,
@@ -1781,29 +1779,29 @@
3038
],
"err": [
- 0,
- -0.5,
- 3.1
+ 0.4,
+ 0.4,
+ 3.6
]
},
"ɐ": {
"artic": {
- "tbX": 1.66,
- "tbY": 6.872,
- "jaw": 1.4,
- "lipAp": 1.73,
- "lipProt": 0.031,
- "lipWidth": 0.99,
- "root": 0,
- "larynx": 0,
- "ttX": 5.541,
- "ttY": 6.12,
+ "tbX": 2.235,
+ "tbY": 6.605,
+ "jaw": 1.373,
+ "lipAp": 0.981,
+ "lipProt": 0.38,
+ "lipWidth": 0.513,
+ "root": -0.317,
+ "larynx": -0.295,
+ "ttX": 5.726,
+ "ttY": 6.05,
"ttCurl": 0
},
"formants": [
832,
- 1795,
- 3100
+ 1827,
+ 3247
],
"target": [
832,
@@ -1812,29 +1810,29 @@
],
"err": [
0,
- 0,
- 0
+ 1.8,
+ 4.7
]
},
"ɝ": {
"artic": {
- "tbX": 2.344,
- "tbY": 6.637,
- "jaw": 0.379,
- "lipAp": 0.144,
+ "tbX": 1.908,
+ "tbY": 6.905,
+ "jaw": 0.05,
+ "lipAp": 0.12,
"lipProt": 1.4,
- "lipWidth": 0.331,
- "root": -0.897,
- "larynx": -1.3,
- "ttX": 5.774,
- "ttY": 8.837,
- "ttCurl": 0.952
+ "lipWidth": 0.341,
+ "root": -0.9,
+ "larynx": -1.014,
+ "ttX": 5.736,
+ "ttY": 9.324,
+ "ttCurl": 1
},
"formants": [
- 584,
- 1669,
- 2689,
- 3987
+ 569,
+ 1670,
+ 2411,
+ 3631
],
"target": [
586,
@@ -1842,29 +1840,29 @@
2143
],
"err": [
- -0.4,
+ -2.8,
-2.9,
- 25.5
+ 12.5
]
},
"y": {
"artic": {
- "tbX": 3.464,
- "tbY": 7.98,
- "jaw": 0.175,
- "lipAp": 0.23,
- "lipProt": 0.766,
+ "tbX": 3.55,
+ "tbY": 7.97,
+ "jaw": 0.241,
+ "lipAp": 0.183,
+ "lipProt": 1.024,
"lipWidth": 0.302,
- "root": -0.898,
- "larynx": -0.765,
- "ttX": 6.562,
- "ttY": 7.588,
- "ttCurl": 0.001
+ "root": -0.9,
+ "larynx": 0.122,
+ "ttX": 6.565,
+ "ttY": 7.524,
+ "ttCurl": 0
},
"formants": [
- 390,
- 2392,
- 2924
+ 389,
+ 2394,
+ 3127
],
"target": [
390,
@@ -1872,29 +1870,29 @@
2666
],
"err": [
- -0.1,
- -0.1,
- 9.7
+ -0.2,
+ 0,
+ 17.3
]
},
"ø": {
"artic": {
- "tbX": 3.444,
- "tbY": 7.712,
- "jaw": 0.797,
- "lipAp": 0.363,
- "lipProt": 1.399,
- "lipWidth": 0.306,
+ "tbX": 3.451,
+ "tbY": 7.637,
+ "jaw": 0.697,
+ "lipAp": 0.285,
+ "lipProt": 1.4,
+ "lipWidth": 0.302,
"root": -0.9,
- "larynx": -0.469,
- "ttX": 6.329,
- "ttY": 6.939,
+ "larynx": -0.599,
+ "ttX": 6.37,
+ "ttY": 7,
"ttCurl": 0
},
"formants": [
- 505,
- 2062,
- 3032
+ 507,
+ 2058,
+ 2971
],
"target": [
507,
@@ -1902,29 +1900,29 @@
2790
],
"err": [
- -0.4,
0,
- 8.7
+ -0.2,
+ 6.5
]
},
"œ": {
"artic": {
- "tbX": 2.99,
- "tbY": 7.044,
- "jaw": 1.089,
- "lipAp": 0.692,
- "lipProt": 0.999,
- "lipWidth": 0.316,
- "root": -0.899,
- "larynx": -0.514,
- "ttX": 6.073,
- "ttY": 6.457,
- "ttCurl": 0.004
- },
- "formants": [
- 675,
- 1924,
- 3097
+ "tbX": 2.999,
+ "tbY": 6.988,
+ "jaw": 1.197,
+ "lipAp": 0.695,
+ "lipProt": 1.169,
+ "lipWidth": 0.319,
+ "root": -0.9,
+ "larynx": -0.46,
+ "ttX": 6.031,
+ "ttY": 6.336,
+ "ttCurl": 0
+ },
+ "formants": [
+ 671,
+ 1932,
+ 3082
],
"target": [
676,
@@ -1932,29 +1930,29 @@
2914
],
"err": [
- -0.2,
- -0.2,
- 6.3
+ -0.8,
+ 0.2,
+ 5.8
]
},
"ɨ": {
"artic": {
- "tbX": 3.099,
- "tbY": 7.867,
- "jaw": 0.213,
- "lipAp": 0.205,
- "lipProt": 0.332,
- "lipWidth": 0.75,
- "root": -0.891,
- "larynx": -0.333,
- "ttX": 6.44,
- "ttY": 7.513,
+ "tbX": 3.09,
+ "tbY": 7.892,
+ "jaw": 0.178,
+ "lipAp": 0.131,
+ "lipProt": 0,
+ "lipWidth": 0.804,
+ "root": -0.868,
+ "larynx": 0.161,
+ "ttX": 6.449,
+ "ttY": 7.554,
"ttCurl": 0
},
"formants": [
- 429,
+ 430,
2128,
- 3129
+ 3161
],
"target": [
429,
@@ -1962,29 +1960,29 @@
2976
],
"err": [
- -0.1,
+ 0.2,
0,
- 5.1
+ 6.2
]
},
"ɯ": {
"artic": {
- "tbX": 2.756,
- "tbY": 7.577,
- "jaw": 0.297,
- "lipAp": 0.373,
- "lipProt": 0.374,
- "lipWidth": 0.549,
- "root": 0.377,
- "larynx": -0.82,
- "ttX": 6.306,
- "ttY": 7.342,
- "ttCurl": 0.003
+ "tbX": 2.712,
+ "tbY": 7.766,
+ "jaw": 0.155,
+ "lipAp": 0.198,
+ "lipProt": 0.352,
+ "lipWidth": 0.608,
+ "root": -0.55,
+ "larynx": -0.434,
+ "ttX": 6.343,
+ "ttY": 7.531,
+ "ttCurl": 0
},
"formants": [
- 458,
- 1786,
- 3279
+ 446,
+ 1793,
+ 3097
],
"target": [
442,
@@ -1992,29 +1990,29 @@
2976
],
"err": [
- 3.6,
- -0.5,
- 10.2
+ 1,
+ -0.1,
+ 4.1
]
},
"ɤ": {
"artic": {
- "tbX": 2.14,
- "tbY": 7.19,
- "jaw": 0.723,
- "lipAp": 1.037,
- "lipProt": 0.355,
- "lipWidth": 0.554,
- "root": -0.325,
- "larynx": -0.297,
- "ttX": 5.967,
- "ttY": 6.821,
+ "tbX": 1.934,
+ "tbY": 7.366,
+ "jaw": 0.721,
+ "lipAp": 0.816,
+ "lipProt": 0.095,
+ "lipWidth": 0.582,
+ "root": -0.442,
+ "larynx": -0.208,
+ "ttX": 5.905,
+ "ttY": 6.884,
"ttCurl": 0
},
"formants": [
- 602,
- 1661,
- 3146
+ 598,
+ 1662,
+ 3114
],
"target": [
598,
@@ -2022,9 +2020,9 @@
3038
],
"err": [
- 0.7,
- -0.1,
- 3.6
+ 0.1,
+ 0,
+ 2.5
]
}
}
diff --git a/src/engine/voice/humanAirway.ts b/src/engine/voice/humanAirway.ts
index c77066a..e9be1b9 100644
--- a/src/engine/voice/humanAirway.ts
+++ b/src/engine/voice/humanAirway.ts
@@ -103,11 +103,14 @@ export class HumanAirway {
* The last part of a closure is slower than a release: contact spreads over the palate as
* tissue compresses, while a release is ballistic. Sealing at the opening rate drove the air
* the articulator displaces through a slit that shut within ~1 ms (an audible click). Below
- * sealHi cm² the closing rate eases from maxAreaRate down to sealRate.
+ * sealHi cm² the closing rate eases from maxAreaRate down to sealRate, and below sealEase it
+ * slows further (∝ √A) so the seal itself is reached smoothly.
*/
sealRate = 5;
sealLo = 0.03;
sealHi = 0.4;
+ /** below this area (cm²) the closing rate slows with √A, so the seal is reached smoothly */
+ sealEase = 0.03;
/** areas committed at the start of the current control step (slew-limit baseline) */
private basePh: Float64Array | null = null;
@@ -155,9 +158,13 @@ export class HumanAirway {
const k2 = this.body.scale * this.body.scale;
const clampArr = (cur: Float64Array, old: Float64Array, mins: Float64Array, oldMins: Float64Array) => {
const openR = this.maxAreaRate * k2, gain = this.areaRateGain;
- const sealR = this.sealRate * k2, lo = this.sealLo * k2, hi = this.sealHi * k2;
- // closing rate at area A: the release rate eased down to the seal rate near contact
+ const sealR = this.sealRate * k2, lo = this.sealLo * k2, hi = this.sealHi * k2, ease = this.sealEase * k2;
+ // closing rate at area A: the release rate eased down to the seal rate near contact,
+ // and in the last part slowing with √A, so the area (and the jet through it, ∝ A) comes
+ // to rest at the seal instead of stopping dead: at a constant rate the flow's slope
+ // dropped to zero at once, a step in the radiated pressure (an audible click)
const closeR = (A: number) => {
+ if (A < ease) return sealR * Math.sqrt(Math.max(0, A) / ease);
const u = A <= lo ? 0 : A >= hi ? 1 : (A - lo) / (hi - lo);
return sealR + (openR - sealR) * u * u * (3 - 2 * u);
};
diff --git a/tests/geometry-continuity.test.ts b/tests/geometry-continuity.test.ts
new file mode 100644
index 0000000..884e831
--- /dev/null
+++ b/tests/geometry-continuity.test.ts
@@ -0,0 +1,54 @@
+/**
+ * The area function must change smoothly as the articulators move: a jump in a section's area
+ * is heard as a tick and a formant jump. Sweeps each articulator through its speech range from
+ * several vowel postures and flags any step far above its neighbours.
+ */
+import { describe, expect, test } from "bun:test";
+import { HumanVocalTract, NEUTRAL, BODY_MALE, restTip, type HumanArtic } from "../src/engine/anatomy/human.ts";
+import { vowelArtic } from "../src/engine/phonetics/planner.ts";
+
+const SWEEPS: [keyof HumanArtic, number, number][] = [
+ ["tbY", 5.5, 8.5],
+ ["tbX", 1.5, 4.2],
+ ["jaw", 0, 2],
+ ["ttY", 6, 9.5],
+ ["ttX", 5, 7],
+ ["root", -0.9, 0.9],
+ ["lipAp", -0.2, 2],
+ ["velum", -0.25, 1.2],
+];
+
+describe("tract geometry continuity", () => {
+ test("no area jumps anywhere in the articulators' speech ranges", () => {
+ const tract = new HumanVocalTract(BODY_MALE);
+ const ph = new Float64Array(20), or = new Float64Array(24);
+ const areas = (a: HumanArtic) => {
+ tract.resample(a, tract.compute(a), 20, 24, ph, or);
+ return [...ph, ...or];
+ };
+ const jumps: string[] = [];
+ const N = 400;
+ for (const vw of ["i", "ɑ", "u", "ə"]) {
+ const v = vowelArtic(vw, "male")!;
+ const tip = restTip(v.jaw ?? NEUTRAL.jaw, v.tbX!, v.tbY!);
+ const base: HumanArtic = { ...NEUTRAL, ...v, ttX: tip.x, ttY: tip.y };
+ for (const [key, lo, hi] of SWEEPS) {
+ const steps: number[] = [];
+ let prev = areas({ ...base, [key]: lo });
+ for (let i = 1; i <= N; i++) {
+ const cur = areas({ ...base, [key]: lo + ((hi - lo) * i) / N });
+ let m = 0;
+ for (let j = 0; j < cur.length; j++) m = Math.max(m, Math.abs(cur[j] - prev[j]));
+ steps.push(m);
+ prev = cur;
+ }
+ steps.forEach((s, i) => {
+ const nb = steps.slice(Math.max(0, i - 8), i + 9).filter((_, k) => k !== Math.min(8, i)).sort((a, b) => a - b);
+ const med = nb[Math.floor(nb.length / 2)] ?? 0;
+ if (s > 0.25 && s > 6 * Math.max(med, 0.01)) jumps.push(`${vw} ${key}=${(lo + ((hi - lo) * (i + 1)) / N).toFixed(3)}: ${s.toFixed(2)} cm²`);
+ });
+ }
+ }
+ expect(jumps).toEqual([]);
+ });
+});
diff --git a/tools/calibrate-vowels.ts b/tools/calibrate-vowels.ts
index 8c4daf7..41edd77 100644
--- a/tools/calibrate-vowels.ts
+++ b/tools/calibrate-vowels.ts
@@ -88,6 +88,10 @@ for (const [bname, body] of bodies) {
c += 0.05 * Math.pow(Math.max(0, 0.55 - p[5]), 2) + 0.05 * Math.pow(Math.max(0, p[4] - 0.35), 2) + 0.03 * Math.pow(Math.max(0, Math.abs(p[3] - apPrior) - 0.35), 2);
}
c += 0.002 * p[6] * p[6] + 0.006 * p[7] * p[7];
+ // the tongue body near where the vowel's height and backness put it: many postures give
+ // the same formants, and without this the fit wandered (a schwa with the tongue as low as
+ // /ɑ/), making every transition through it needlessly long
+ c += 0.006 * (Math.pow(p[0] - x0[0], 2) + Math.pow(p[1] - x0[1], 2));
if (vw.ipa !== "ɝ") c += 0.5 * p[8] * p[8];
return c;
};
diff --git a/tools/measure-closures.ts b/tools/measure-closures.ts
index 54f969d..df6fd6e 100644
--- a/tools/measure-closures.ts
+++ b/tools/measure-closures.ts
@@ -25,7 +25,9 @@ for (const c of items) {
return m;
};
const vowelStep = step(0.14, 0.26);
+ // the vowel's own pulses just before the closure window (they sharpen as the tract narrows)
+ const lateStep = step(seg.t0 - 0.045, seg.t0 - 0.015);
const closeStep = step(seg.t0 - 0.015, seg.t0 + 0.04);
- rows.push(`${c} closure-onset max step / vowel max step ${(closeStep / vowelStep).toFixed(2)}`);
+ rows.push(`${c} closure-onset max step / vowel max step ${(closeStep / vowelStep).toFixed(2)} (/ late-vowel step ${(closeStep / lateStep).toFixed(2)})`);
}
console.log(rows.join("\n"));
diff --git a/tools/speech-diagnostics.ts b/tools/speech-diagnostics.ts
index 442e94c..d86b23d 100644
--- a/tools/speech-diagnostics.ts
+++ b/tools/speech-diagnostics.ts
@@ -32,6 +32,7 @@ const SENTENCES = [
"She sells sea shells by the sea shore.",
];
const NASALS = new Set(["m", "n", "ŋ"]);
+const diphthongOf = (a: string, b: string) => ["aɪ", "aʊ", "ɔɪ", "eɪ", "oʊ"].some((d) => { const p = diphthongParts(d); return p && p[0] === a && p[1] === b; });
const g2p = new EnglishG2P();
g2p.setDictionaryText(gunzipSync(readFileSync("public/data/cmudict.txt.gz")).toString("utf8"));
const REF = new Map(VOWELS.map((v) => [v.ipa, v.male]));
@@ -63,6 +64,9 @@ for (const [si, text] of SENTENCES.entries()) {
const segs = plan.segments;
segs.forEach((s, k) => {
if (s.kind !== "vowel") return;
+ // the second half of a diphthong is a glide, not a vowel that should reach its target
+ const pv = segs[k - 1];
+ if (pv && pv.kind === "vowel" && Math.abs(pv.t1 - s.t0) < 1e-6 && diphthongOf(pv.ipa, s.ipa)) return;
const nasalNb = (segs[k - 1] && NASALS.has(segs[k - 1].ipa)) || (segs[k + 1] && NASALS.has(segs[k + 1].ipa));
if (!nasalNb)
for (let f = frameAt(s.t0); f <= frameAt(s.t1); f++) {