openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
19 lines (18 loc) • 738 B
JavaScript
import { n as readTtsPrefs } from "../tts-config-CNw5woLC.mjs";
import { r as writePrivateTextFileAtomicSync } from "../private-file-store-D564pKJx.mjs";
import { n as serveWorkerTasks } from "../worker-task-server-J1vG-XRl.mjs";
import { d as normalizeTtsPersonaId } from "../tts-settings-DMe0GS9W.mjs";
//#region src/tts/tts-settings-write.worker.ts
serveWorkerTasks(({ prefsPath: e, stateDir: t, patch: n }) => {
const r = readTtsPrefs(e, { forUpdate: true });
const i = {
...r.tts,
...n
};
if (n.auto !== void 0) delete i.enabled;
if (Object.hasOwn(n, "persona")) i.persona = normalizeTtsPersonaId(n.persona) ?? null;
r.tts = i;
writePrivateTextFileAtomicSync(e, JSON.stringify(r, null, 2), t);
});
//#endregion
export {};