Add MicroslopSam TTS, Flextalk voice profiles, effects, and engine controls
This commit is contained in:
+32
-2
@@ -9,7 +9,7 @@
|
||||
*/
|
||||
|
||||
import { spawn, type ChildProcess } from "node:child_process";
|
||||
import { existsSync } from "node:fs";
|
||||
import { existsSync, statSync } from "node:fs";
|
||||
import { join } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
@@ -17,7 +17,37 @@ const ROOT = fileURLToPath(new URL("../..", import.meta.url));
|
||||
|
||||
const DEFAULT_ARGS = "--no-sandbox --disable-gpu --disable-dev-shm-usage";
|
||||
const XVFB_ARGS = "-screen 0 1280x720x24 -nolisten tcp";
|
||||
const MAX_OUTPUT_LINES = 20;
|
||||
const MAX_OUTPUT_LINES = 200;
|
||||
|
||||
/**
|
||||
* Warn when the built client bundle predates the core sources. Without this, a
|
||||
* new daemon paired with a stale client reports UNKNOWN_ACTION for new actions.
|
||||
*/
|
||||
export function staleBundleWarning(): string | null {
|
||||
const sources = [
|
||||
"src/renderer/puppet/actions.ts",
|
||||
"src/renderer/puppet/events.ts",
|
||||
"src/shared/puppetProtocol.ts",
|
||||
"src/main/puppetBridge.ts"
|
||||
];
|
||||
const bundles = ["dist/js/renderer.js", "dist/js/main.js"];
|
||||
|
||||
try {
|
||||
let newest = 0;
|
||||
for (const source of sources) newest = Math.max(newest, statSync(join(ROOT, source)).mtimeMs);
|
||||
|
||||
let oldest = Number.POSITIVE_INFINITY;
|
||||
for (const bundle of bundles) oldest = Math.min(oldest, statSync(join(ROOT, bundle)).mtimeMs);
|
||||
|
||||
if (oldest < newest) {
|
||||
return "the built client bundle is older than the core sources; run `pnpm build` and restart the client";
|
||||
}
|
||||
} catch {
|
||||
// A missing bundle is reported by the client start itself.
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
export interface CoreExit {
|
||||
code: number | null;
|
||||
|
||||
Reference in New Issue
Block a user