Archilyzer · Source

archilyzer

Archilyzer
git clone https://archilyzer.pages.dev/source/archilyzer.git
Log | Files | Refs | README | LICENSE

commit e0d4436e63bcf312267eae7d3a7c0e6d477d452d
parent 87c6de73113590cf6dba08a564d3a32c7498cc96
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Wed, 11 Nov 2026 18:01:30 -0500

voice-convert: say that a request naming a followed pitch and no semitones takes the default semitones (resolveVoicePitch, settings doc, ops help)

Co-Authored-By: Claude <noreply@anthropic.com>

Diffstat:
MCOMMANDS.md | 2+-
MSETTINGS.md | 2+-
Mcommon/controller/voiceFile.test.ts | 7+++++++
Mcommon/lib/voiceApps.ts | 4+++-
Mcommon/lib/voiceSettings.ts | 3++-
Mscripts/archilyzer-ops.mjs | 3++-
6 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/COMMANDS.md b/COMMANDS.md @@ -184,7 +184,7 @@ Drives a running editor over HTTP (`/api/ops/*`, the same actions its pages run) | `transcribe` | transcribe runs ONE local file through a local transcription worker, as a job: {"path": "/abs/file"} (audio or video), "start"/"end" (seconds) for a window, "workerId" (a settings worker id; default: the one auto-transcribe would get), "out" (an absolute path for the result JSON, never inside the corpus). The result is {path, window, worker: {id, appId, model, device}, cues: \[{start, end, text}\], text, ...}, cue times on the file's own clock. "words": true adds words: \[{w, start, end, conf?}\] on the same clock -- from parakeet, which keeps its word timestamps; \[\] from an engine that does not. "whilePaused": true runs it during a pause-all on a worker the pause alone switched off (never one drained, degraded or disabled by hand); the pause stays on. With --wait it is printed on stdout (the response and the log go to stderr), so `pnpm ops transcribe ... --wait \| jq -r .text` works. | `pnpm ops transcribe --json '{"path":"/abs/clip.mp4","start":120,"end":150}' --wait`<br>`pnpm ops transcribe --json '{"path":"/abs/a.wav","workerId":"parakeet-cpu","out":"/tmp/a.json"}' --wait` | | `tts` | tts speaks a line with a local text-to-speech engine and a STOCK voice, as a job on the `tts` queue: {"text": "..."} or {"file": "/abs/script.txt"} (UTF-8, at most 20,000 characters), "engine" (kokoro \| orpheus \| espeak-ng), "voice" (one of the engine's stock voices; kokoro: af\_heart, bm\_george, ...; orpheus: leah, zac, ...), "speed" (0.5-2; orpheus has none) — defaults from settings.tts (kokoro, af\_heart, 1) — and "out" (an absolute .wav path the result is copied to, never inside the corpus). The expressive tags &lt;laugh&gt; &lt;chuckle&gt; &lt;sigh&gt; &lt;cough&gt; &lt;sniffle&gt; &lt;groan&gt; &lt;yawn&gt; &lt;gasp&gt; are performed by orpheus and stripped for the others; any other &lt;...&gt; is refused. Numbers, years, money and times are spoken (2024: "twenty twenty-four"). The result is {wav, seconds, engine, voice, cached, durationMs, waitedMs, sha, sampleRate, speed, disclosure}: wav is the 48 kHz mono WAV the editor wrote (out, or its cache), disclosure the line a narrated export carries. The same ask again is answered from the cache (cached: true, no engine run). Kokoro and orpheus need `archilyzer tts setup [--engine orpheus]` first; orpheus runs on the GPU (a local llama-server the editor starts and stops) and waits while a transcription holds it. With --wait the result is printed on stdout. | `pnpm ops tts --json '{"text":"In 2024 the archive spoke."}' --wait`<br>`pnpm ops tts --json '{"file":"/abs/script.txt","voice":"bm_george","out":"/abs/line.wav"}' --wait` | | `voice-enhance` | voice-enhance cleans a speech recording up (denoise, soften the room, level it) as a job on the `voice` queue, behind the heavy slot: {"file": "/abs/take.wav", "out": "/abs/clean.wav"} (never inside the corpus; 48 kHz mono, exactly as long as the input), "engine" (deepfilternet \| rnnoise; settings.voice), "params" (the engine's knobs: lufs, highpass, attenLimDb, postFilter, mix), "parts" (\[{file, out}\], a take recorded part by part). deepfilternet needs `archilyzer voice setup --engine deepfilternet`; rnnoise needs nothing. The result is {op, engine, wav, seconds, samples, sampleRate, engineMs, durationMs, waitedMs, gainDb, params, parts?, synthetic}; with --wait it is printed on stdout. | | -| `voice-convert` | voice-convert keeps a recording's performance (timing, pitch contour) and swaps its timbre for a STOCK synthetic voice, as voice-enhance's job: the same body plus "voice" — "&lt;tts engine&gt;:&lt;stock voice&gt;" (orpheus:zac, orpheus:leah, kokoro:am\_michael, ...; settings.voice.convert.target); a file, a path or a recording is REFUSED as a target (no real person's voice) — and "engine" (openvoice \| seed-vc, each installed by `archilyzer voice setup --engine <id>`). "pitch" is where the result's pitch comes from (settings.voice.convert.pitch): "target" — the stock voice's own, the read's intonation flattened to it; "source" — the pitch the take was read at (raise your voice and it rises); "contour" — the read's rises and falls, moved as a whole to the stock voice's register. "semitones" (-12 to 12) then moves a followed pitch. source and contour are seed-vc's, on its optional f0 model (`archilyzer voice setup --engine seed-vc --with f0`; slower, 44.1 kHz); openvoice refuses them. The target's reference is synthesized once through the tts op and kept. The result adds target, voice, pitch (semitones and f0 — the medians heard and the move applied — when followed), synthetic: true and the disclosure line. | | +| `voice-convert` | voice-convert keeps a recording's performance (timing, pitch contour) and swaps its timbre for a STOCK synthetic voice, as voice-enhance's job: the same body plus "voice" — "&lt;tts engine&gt;:&lt;stock voice&gt;" (orpheus:zac, orpheus:leah, kokoro:am\_michael, ...; settings.voice.convert.target); a file, a path or a recording is REFUSED as a target (no real person's voice) — and "engine" (openvoice \| seed-vc, each installed by `archilyzer voice setup --engine <id>`). "pitch" is where the result's pitch comes from (settings.voice.convert.pitch): "target" — the stock voice's own, the read's intonation flattened to it; "source" — the pitch the take was read at (raise your voice and it rises); "contour" — the read's rises and falls, moved as a whole to the stock voice's register. "semitones" (-12 to 12) then moves a followed pitch; left out, a followed pitch takes settings.voice.convert.semitones (0 unless set). source and contour are seed-vc's, on its optional f0 model (`archilyzer voice setup --engine seed-vc --with f0`; slower, 44.1 kHz); openvoice refuses them. The target's reference is synthesized once through the tts op and kept. The result adds target, voice, pitch (semitones and f0 — the medians heard and the move applied — when followed), synthetic: true and the disclosure line. | | | `settings` | settings patches settings.json through the editor's one writer: {"patch": {"&lt;top-level key&gt;": value, …}} (SETTINGS.md). A block's keys merge one level; an array, a scalar or an object nested in a block replaces. Refused before anything is written: an unknown key; a key another writer owns (channelPriority, autoQueue, workers, storage — the refusal names it); a value the schema would not keep as sent (clamped, dropped), named with what would be saved. Answers the saved values. | `pnpm ops settings --json '{"patch":{"diarization":{"cleanAfterCapture":true}}}'`<br>`pnpm ops settings --json '{"patch":{"minFreeDiskGB":20}}'` | | `clear-platform-hold` | clear-platform-hold clears a platform's rate-limit hold, backoff and raised pace, as the lane strip's Clear hold: {"platform"}. Answers the sentence. | | | `recheck-service` | recheck-service asks a service whose cookie refresh alert is up ONE request through its own path, as the dashboard banner's Recheck: {"service"} ("rumble", "youtube", "odysee", "archive.today", "x" or a forum host). Waits for it: {jobId, result: "clean" \| "stale" \| "failed", message}; "clean" clears the alert (and a yt-dlp service's backoff, as any clean request). For "x" it sends X NO request: clean when the login on disk was renewed after the alert (Refresh cookies on /settings) — for a jar-age alert, when the jar is within social.x.maxCookieAgeMinutes. The editor also rechecks by itself on a timer (settings.serviceCookies.recheckIntervalMinutes, default 180, 0 = off; `pnpm ops settings --json '{"patch":{"serviceCookies":{"recheckIntervalMinutes":0}}}'`). dismiss-service clears a service's cookie alert by hand: {"service"}. rerun-service-jobs retries every job a service's cookie alert stopped, once it is OK again: {"service"} -&gt; {jobIds, skipped}. --wait follows them. | `pnpm ops recheck-service --json '{"service":"rumble"}'`<br>`pnpm ops recheck-service --json '{"service":"x"}'` | diff --git a/SETTINGS.md b/SETTINGS.md @@ -1073,7 +1073,7 @@ The voice ops (release 39): a speech recording ENHANCED (denoised, de-reverbed, | `engine` | `"openvoice"` | The engine `voice-convert` uses when the request names none: `openvoice` (OpenVoice v2's tone-colour converter, MIT, light) or `seed-vc` (Seed-VC v1, GPL-3.0, a closer timbre match, slower). Both run on the CPU; `archilyzer voice setup --engine <id>` installs one. An unknown id falls back to the default. | | `target` | `"orpheus:zac"` | The stock synthetic voice a conversion lands on when the request names none: `<tts engine>:<stock voice>` (`orpheus:zac`, `orpheus:leah`, `kokoro:am_michael`, …). Never a file or a recording — no real person's voice is a target. Its reference clip is synthesized once through the `tts` op and kept under `home`. Anything else falls back to `orpheus:zac`. | | `pitch` | `"target"` | The pitch a conversion lands on when the request names none — for an engine that can follow the input's (seed-vc, with its optional f0 model: `archilyzer voice setup --engine seed-vc --with f0`; openvoice always lands on the target's). `target`: the stock voice's own pitch — the read's intonation is flattened to it (what there was before). `source`: the pitch the take was read at — raise your voice and the result rises. `contour`: the read's rises and falls, moved as a whole so their median sits on the stock voice's. Anything else falls back to `target`. | -| `semitones` | `0` | Semitones a FOLLOWED pitch (`source`, `contour`) is moved by when the request names none: -12 to 12, 0 = as followed. Ignored for `target`. | +| `semitones` | `0` | Semitones a FOLLOWED pitch (`source`, `contour`) is moved by when the request names none: -12 to 12, 0 = as followed. Ignored for `target`. It applies to a request that names its own `pitch` too: `{"pitch": "source"}` with no `semitones` is moved by this many — send `"semitones": 0` for none. | Default: diff --git a/common/controller/voiceFile.test.ts b/common/controller/voiceFile.test.ts @@ -240,6 +240,13 @@ test("a pitch is the engine's to follow: openvoice refuses one, seed-vc takes so const d = ask({ engine: "seed-vc" }, follow); assert.ok(d.ok); if (d.ok) assert.deepEqual(d.value.pitch, { pitch: "contour", semitones: 2 }); + // A request naming its own followed pitch and no semitones takes the default semitones; 0 says none. + const named = ask({ engine: "seed-vc", pitch: "source" }, follow); + assert.ok(named.ok); + if (named.ok) assert.deepEqual(named.value.pitch, { pitch: "source", semitones: 2 }); + const zero = ask({ engine: "seed-vc", pitch: "source", semitones: 0 }, follow); + assert.ok(zero.ok); + if (zero.ok) assert.deepEqual(zero.value.pitch, { pitch: "source", semitones: 0 }); const over = ask({ engine: "seed-vc", pitch: "target" }, follow); assert.ok(over.ok); if (over.ok) assert.deepEqual(over.value.pitch, { pitch: "target", semitones: 0 }); diff --git a/common/lib/voiceApps.ts b/common/lib/voiceApps.ts @@ -449,7 +449,9 @@ type Check<T> = { ok: true; value: T } | { ok: false; error: string }; * defaults (settings.voice.convert). An engine with one pitch refuses a request * for another (the defaults are not a request: they are for the engines that * can); `semitones` asked of the target's own pitch is refused, since nothing - * is followed to move. Pure. + * is followed to move. A request that names a followed `pitch` and no + * `semitones` takes the DEFAULT semitones (settings.voice.convert.semitones), + * whichever pitch the settings name — say `"semitones": 0` for none. Pure. */ export function resolveVoicePitch( engine: Pick<VoiceEngine, "id" | "label" | "pitch">, diff --git a/common/lib/voiceSettings.ts b/common/lib/voiceSettings.ts @@ -98,7 +98,8 @@ export const VOICE_CONVERT_SETTINGS_FIELD_DOCS: FieldDocs<VoiceConvertSettings> "their median sits on the stock voice's. Anything else falls back to `target`.", semitones: "Semitones a FOLLOWED pitch (`source`, `contour`) is moved by when the request names none: -12 to 12, " + - "0 = as followed. Ignored for `target`.", + "0 = as followed. Ignored for `target`. It applies to a request that names its own `pitch` too: " + + "`{\"pitch\": \"source\"}` with no `semitones` is moved by this many — send `\"semitones\": 0` for none.", }; // "" (the default), an absolute path, or a `~/` one; anything else is "". diff --git a/scripts/archilyzer-ops.mjs b/scripts/archilyzer-ops.mjs @@ -2010,7 +2010,8 @@ export function usage() { ' "target" — the stock voice\'s own, the read\'s intonation flattened to it;', ' "source" — the pitch the take was read at (raise your voice and it rises);', ' "contour" — the read\'s rises and falls, moved as a whole to the stock voice\'s', - ' register. "semitones" (-12 to 12) then moves a followed pitch. source and', + ' register. "semitones" (-12 to 12) then moves a followed pitch; left out, a', + " followed pitch takes settings.voice.convert.semitones (0 unless set). source and", " contour are seed-vc's, on its optional f0 model (`archilyzer voice setup", " --engine seed-vc --with f0`; slower, 44.1 kHz); openvoice refuses them.", " The target's reference is synthesized once through the tts op and kept. The",