diff --git a/tools/dings-voices/src/gen_page.py b/tools/dings-voices/src/gen_page.py index cd258af..df139f0 100644 --- a/tools/dings-voices/src/gen_page.py +++ b/tools/dings-voices/src/gen_page.py @@ -8,7 +8,7 @@ J = lambda *p: json.load(open(os.path.join(root, *p))) M = J("metrics.json"); V = J("voices.json")["voices"]; OB = J("findings", "onsets-before.json"); OA = J("findings", "onsets-after.json"); NB = J("findings", "nibu-after.json") MOTIFS = ["mention", "dm", "message", "invite"] RHY = {"mention": "one note", "dm": "two slower notes, rising", "message": "two quick notes, rising", "invite": "a long pause, then a short one: three notes"} -clip = {(r["sender"], r["motif"]): r for r in M["clips"] + M["proposals"]}; neu = {n["motif"]: n for n in M["neutral"]}; S = M["summary"] +clip = {(r["sender"], r["motif"]): r for r in M["clips"] + M["proposals"]}; S = M["summary"] e = html.escape def aud(src, label, role="voice"): return f'' @@ -59,7 +59,7 @@ def nibu_section():

spectrum, invite against mention · invite spectrogram · message · dm

''' unchanged = ["aqua", "eureka", "heimdall", "kiko", "libby", "weksa"] def plain(s): - rows = "".join(f'{m}
{e(RHY[m])}{aud(f"out/senders/{s}/{m}.ogg", f"{s} {m}")}{ms(s, m)}{aud(f"out/neutral/{m}.ogg", f"neutral {m}", "neutral", min(1.0, 10 ** ((clip[(s, m)]["laeDb"] - neu[m]["laeDb"]) / 20)))}' for m in MOTIFS) + rows = "".join(f'{m}
{e(RHY[m])}{aud(f"out/senders/{s}/{m}.ogg", f"{s} {m}")}{ms(s, m)}{aud(f"out/neutral/{m}.ogg", f"neutral {m}", "neutral")}' for m in MOTIFS) return f'

{s.capitalize()} {e(V[s]["object"])} · unchanged since v3

{e(V[s]["caption"])}

{rows}
{s}: voice beside the neutral fallback
NotificationVoiceNeutral fallback
' page = f'''