21 lines
635 B
JavaScript
21 lines
635 B
JavaScript
import { access } from 'node:fs/promises';
|
|
|
|
const commandAvailable = async (command) => {
|
|
for (const dir of ['/usr/bin', '/usr/local/bin', '/bin']) {
|
|
try { await access(`${dir}/${command}`); return true; } catch {}
|
|
}
|
|
return false;
|
|
};
|
|
const pipewire = await commandAvailable('pw-cat');
|
|
const report = {
|
|
pipewireCapture: pipewire,
|
|
wakeEngine: Boolean(process.env.JARVIS_WAKE_COMMAND),
|
|
wakeCommand: process.env.JARVIS_WAKE_COMMAND || null,
|
|
sampleRate: 16000,
|
|
channels: 1,
|
|
ttsPlayback: pipewire,
|
|
gpuRequired: true,
|
|
};
|
|
console.log(JSON.stringify(report, null, 2));
|
|
if (!report.pipewireCapture) process.exitCode = 1;
|