Run daemon on packaged Bare runtime
This commit is contained in:
+10
-4
@@ -1,13 +1,19 @@
|
||||
import { spawnSync } from 'node:child_process';
|
||||
import { access } from 'node:fs/promises';
|
||||
|
||||
const commandAvailable = (command) => spawnSync('which', [command], { stdio: 'ignore' }).status === 0;
|
||||
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: commandAvailable('pw-cat'),
|
||||
pipewireCapture: pipewire,
|
||||
wakeEngine: Boolean(process.env.JARVIS_WAKE_COMMAND),
|
||||
wakeCommand: process.env.JARVIS_WAKE_COMMAND || null,
|
||||
sampleRate: 16000,
|
||||
channels: 1,
|
||||
ttsPlayback: commandAvailable('pw-cat'),
|
||||
ttsPlayback: pipewire,
|
||||
gpuRequired: true,
|
||||
};
|
||||
console.log(JSON.stringify(report, null, 2));
|
||||
|
||||
Reference in New Issue
Block a user