Archilyzer · Source

archilyzer

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

commit 93357f00ff7c463c4a3ad1b2a03753afa001d257
parent 1bc406ec77e3bbe867f24587eabaeb6e68b57d7e
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Sun, 18 Oct 2026 17:26:19 -0400

common: the fake speaker embedder knows it is the script by its URL, not a cwd-derived path (next-build-trace)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Diffstat:
Mcommon/testing/audio/fakeSpeakerEmbed.mjs | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/testing/audio/fakeSpeakerEmbed.mjs b/common/testing/audio/fakeSpeakerEmbed.mjs @@ -12,7 +12,7 @@ // — which is all a test of the plumbing needs. It is not a speaker model. // Point VOICE_MATCH_PYTHON at `node` and VOICE_MATCH_SCRIPT at this file. import { readFileSync } from "node:fs"; -import path from "node:path"; +import { pathToFileURL } from "node:url"; const BANDS = 32; const FRAME = 512; @@ -64,7 +64,7 @@ export function fakeEmbedding(x, rate) { return n > 0 ? v.map((e) => Math.round((e / n) * 1e6) / 1e6) : null; } -const isMain = process.argv[1] && path.resolve(process.argv[1]) === path.resolve(new URL(import.meta.url).pathname); +const isMain = !!process.argv[1] && pathToFileURL(process.argv[1]).href === import.meta.url; if (isMain) { const args = process.argv.slice(2); const req = args.filter((a, i) => !a.startsWith("--") && !(i > 0 && args[i - 1].startsWith("--"))).pop();