15 lines
528 B
JavaScript
15 lines
528 B
JavaScript
import { spawnSync } from 'node:child_process';
|
|
|
|
const commandAvailable = (command) => spawnSync('which', [command], { stdio: 'ignore' }).status === 0;
|
|
const report = {
|
|
pipewireCapture: commandAvailable('pw-cat'),
|
|
wakeEngine: Boolean(process.env.JARVIS_WAKE_COMMAND),
|
|
wakeCommand: process.env.JARVIS_WAKE_COMMAND || null,
|
|
sampleRate: 16000,
|
|
channels: 1,
|
|
ttsPlayback: commandAvailable('pw-cat'),
|
|
gpuRequired: true,
|
|
};
|
|
console.log(JSON.stringify(report, null, 2));
|
|
if (!report.pipewireCapture) process.exitCode = 1;
|