Skip to content

Commit a4e8b4e

Browse files
thegreatLUCYclaude
andcommitted
fix(cli): turn off onnxruntime telemetry for Kokoro synthesis
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>
1 parent bb9e507 commit a4e8b4e

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

‎packages/cli/src/tts/synthesize.cache.test.ts‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@ describe("synthesis script cache", () => {
5353
fs.rmSync(paths.home, { recursive: true, force: true });
5454
});
5555

56+
it("turns off onnxruntime telemetry for the synthesis process", async () => {
57+
const { synthesize } = await import("./synthesize.js");
58+
await synthesize("Hello", outputPath);
59+
60+
const options = vi.mocked(execFileSync).mock.calls.at(-1)?.[2];
61+
expect(options?.env?.ORT_DISABLE_TELEMETRY).toBe("1");
62+
});
63+
5664
it("creates the script, removes only old script versions, and reuses the current cache", async () => {
5765
fs.writeFileSync(join(cacheDir, "synth-v2.py"), "old script");
5866
fs.writeFileSync(join(cacheDir, "notes.txt"), "keep");

‎packages/cli/src/tts/synthesize.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ export async function synthesize(
202202
encoding: "utf-8",
203203
timeout: 300_000,
204204
stdio: ["pipe", "pipe", "pipe"],
205+
env: { ...process.env, ORT_DISABLE_TELEMETRY: "1" },
205206
},
206207
);
207208

0 commit comments

Comments
 (0)