Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.
JavaScript aianthropiccross-platformgeminigroqlinuxmacosnvidiaopen-sourceopenaiparakeetspeech-to-texttranscribewhisperwindows
fix(windows): hide nvidia-smi console windows during GPU detection
stantheman01282a36f5938b5e
diff --git a/src/utils/gpuDetection.js b/src/utils/gpuDetection.jsindex f6caaae65..33102e092 100644--- a/src/utils/gpuDetection.js+++ b/src/utils/gpuDetection.js@@ -14,7 +14,7 @@ function detectNvidiaGpu() {execFile("nvidia-smi",["--query-gpu=name,driver_version,memory.total", "--format=csv,noheader,nounits"],- { timeout: 5000 },+ { timeout: 5000, windowsHide: true },(error, stdout) => {if (error || !stdout) {cachedGpuInfo = { hasNvidiaGpu: false };@@ -58,7 +58,7 @@ function listNvidiaGpus() {execFile("nvidia-smi",["--query-gpu=index,uuid,name,memory.total", "--format=csv,noheader,nounits"],- { timeout: 5000 },+ { timeout: 5000, windowsHide: true },(error, stdout) => {if (error || !stdout) {cachedGpuList = [];diff --git a/test/utils/gpuDetection-windows-hide.test.js b/test/utils/gpuDetection-windows-hide.test.jsnew file mode 100644index 000000000..a0d0c5cb3--- /dev/null+++ b/test/utils/gpuDetection-windows-hide.test.js@@ -0,0 +1,20 @@+const test = require("node:test");+const assert = require("node:assert/strict");+const fs = require("fs");+const path = require("path");++const SOURCE = fs.readFileSync(+ path.join(__dirname, "../../src/utils/gpuDetection.js"),+ "utf8"+);++test("nvidia-smi GPU probes pass windowsHide to avoid console flashes", () => {+ const matches = SOURCE.match(/execFile\(\s*"nvidia-smi"/g) || [];+ assert.equal(matches.length, 2, "expected detectNvidiaGpu and listNvidiaGpus probes");+ assert.match(+ SOURCE,+ /execFile\(\s*"nvidia-smi"[\s\S]*?\{\s*timeout:\s*5000,\s*windowsHide:\s*true\s*\}/+ );+ const hideCount = (SOURCE.match(/windowsHide:\s*true/g) || []).length;+ assert.equal(hideCount, 2, "both nvidia-smi execFile calls must set windowsHide");+});