Skip to content

Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.

refactor: move whisper.cpp to extraResources only

Gabriel Steinfd912545e126
diff --git a/electron-builder.json b/electron-builder.json
index 4584b99c2..4e84dc0dd 100644
--- a/electron-builder.json
+++ b/electron-builder.json
@@ -24,14 +24,17 @@
],
"asarUnpack": [
"**/node_modules/ffmpeg-static/**/*",
- "**/node_modules/better-sqlite3/**/*",
- "resources/bin/whisper-cpp-*"
+ "**/node_modules/better-sqlite3/**/*"
],
"extraResources": [
"src/assets/**/*",
"resources/macos-globe-listener.swift",
"resources/bin/macos-globe-listener",
- "resources/bin/whisper-cpp-*"
+ {
+ "from": "resources/bin/",
+ "to": "bin/",
+ "filter": ["whisper-cpp-*"]
+ }
],
"mac": {
"category": "public.app-category.productivity",
diff --git a/src/helpers/whisper.js b/src/helpers/whisper.js
index fd33629b3..4369a1d0f 100644
--- a/src/helpers/whisper.js
+++ b/src/helpers/whisper.js
@@ -80,25 +80,12 @@ class WhisperManager {
const candidates = [];
- // Production: check resources path (extraResources destination)
+ // Production: extraResources copies to {resourcesPath}/bin/ via from/to mapping
if (process.resourcesPath) {
+ // Primary location: extraResources with "to": "bin/"
candidates.push(
path.join(process.resourcesPath, "bin", platformBinaryName),
- path.join(process.resourcesPath, "bin", genericBinaryName),
- path.join(process.resourcesPath, "resources", "bin", platformBinaryName),
- path.join(process.resourcesPath, "resources", "bin", genericBinaryName)
- );
-
- // ASAR unpacked paths (for when binary is in asarUnpack)
- candidates.push(
- path.join(
- process.resourcesPath,
- "app.asar.unpacked",
- "resources",
- "bin",
- platformBinaryName
- ),
- path.join(process.resourcesPath, "app.asar.unpacked", "resources", "bin", genericBinaryName)
+ path.join(process.resourcesPath, "bin", genericBinaryName)
);
}