fix(cli): turn off onnxruntime telemetry for Kokoro synthesis (#5425)

onnxruntime's 1DS telemetry, on by default in its macOS wheels, can abort the
Python process at exit when an upload response races teardown. execFileSync
then throws for a line whose WAV was already written, and the audio skill drops
it as non-fatal.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
thegreatLUCY
2026-10-13 04:32:45 +00:00
committed by GitHub
co-authored by Claude Opus 5.5
parent 7c73b3caee
commit f25cfbd6bd
2 changed files with 9 additions and 0 deletions
@@ -53,6 +53,14 @@ describe("synthesis script cache", () => {
fs.rmSync(paths.home, { recursive: true, force: true });
});
it("turns off onnxruntime telemetry for the synthesis process", async () => {
const { synthesize } = await import("./synthesize.js");
await synthesize("Hello", outputPath);
const options = vi.mocked(execFileSync).mock.calls.at(-1)?.[2];
expect(options?.env?.ORT_DISABLE_TELEMETRY).toBe("1");
});
it("creates the script, removes only old script versions, and reuses the current cache", async () => {
fs.writeFileSync(join(cacheDir, "synth-v2.py"), "old script");
fs.writeFileSync(join(cacheDir, "notes.txt"), "keep");
+1
View File
@@ -202,6 +202,7 @@ export async function synthesize(
encoding: "utf-8",
timeout: 300_000,
stdio: ["pipe", "pipe", "pipe"],
env: { ...process.env, ORT_DISABLE_TELEMETRY: "1" },
},
);