Skip to content

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

fix(windows): pin llama.cpp to b8857 to keep whisper-server loadable

Gabriel Steindac4a1ba82ad
diff --git a/package-lock.json b/package-lock.json
index 50a99e598..b44be99ed 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "open-whispr",
- "version": "1.7.0",
+ "version": "1.7.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "open-whispr",
- "version": "1.7.0",
+ "version": "1.7.1",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
diff --git a/package.json b/package.json
index 90f3ebd80..65febeec5 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "open-whispr",
- "version": "1.7.0",
+ "version": "1.7.1",
"description": "A desktop dictation application using whisper.cpp for speech-to-text transcription",
"main": "main.js",
"private": true,
diff --git a/scripts/download-llama-server.js b/scripts/download-llama-server.js
index 64120323c..cbce61e5e 100644
--- a/scripts/download-llama-server.js
+++ b/scripts/download-llama-server.js
@@ -13,8 +13,11 @@ const {
const LLAMA_CPP_REPO = "ggerganov/llama.cpp";
-// Version can be pinned via environment variable for reproducible builds
-const VERSION_OVERRIDE = process.env.LLAMA_CPP_VERSION || null;
+// Pinned: whisper-server.exe (built against OpenWhispr/whisper.cpp 0.0.6) loads
+// ggml-*.dll from this script's output dir on Windows. Newer llama.cpp builds
+// bumped ggml's ABI and crash whisper-server on load_backend. Bump only after
+// verifying local Whisper starts on Windows.
+const LLAMA_CPP_TAG = process.env.LLAMA_CPP_VERSION || "b8857";
const BINARIES = {
"darwin-arm64": {
@@ -53,12 +56,7 @@ let cachedRelease = null;
async function getRelease() {
if (cachedRelease) return cachedRelease;
-
- if (VERSION_OVERRIDE) {
- cachedRelease = await fetchLatestRelease(LLAMA_CPP_REPO, { tagPrefix: VERSION_OVERRIDE });
- } else {
- cachedRelease = await fetchLatestRelease(LLAMA_CPP_REPO);
- }
+ cachedRelease = await fetchLatestRelease(LLAMA_CPP_REPO, { tag: LLAMA_CPP_TAG });
return cachedRelease;
}
@@ -170,11 +168,7 @@ function getEntriesForPlatformArch(platformArch) {
}
async function main() {
- if (VERSION_OVERRIDE) {
- console.log(`\n[llama-server] Using pinned version: ${VERSION_OVERRIDE}`);
- } else {
- console.log("\n[llama-server] Fetching latest release...");
- }
+ console.log(`\n[llama-server] Using pinned version: ${LLAMA_CPP_TAG}`);
const release = await getRelease();
if (!release) {
diff --git a/scripts/lib/download-utils.js b/scripts/lib/download-utils.js
index 18d0018b1..7c1afcdfc 100644
--- a/scripts/lib/download-utils.js
+++ b/scripts/lib/download-utils.js
@@ -45,9 +45,7 @@ function fetchJson(url, redirectCount = 0) {
reject(new Error("Redirect without location header"));
return;
}
- const redirectUrl = location.startsWith("/")
- ? new URL(location, url).href
- : location;
+ const redirectUrl = location.startsWith("/") ? new URL(location, url).href : location;
fetchJson(redirectUrl, redirectCount + 1)
.then(resolve)
.catch(reject);
@@ -76,25 +74,30 @@ function fetchJson(url, redirectCount = 0) {
}
/**
- * Fetch the latest release from a GitHub repository.
+ * Fetch a release from a GitHub repository.
* @param {string} repo - Repository in "owner/repo" format
* @param {object} options - Options
- * @param {string} [options.tagPrefix] - Only match releases with this tag prefix (e.g., "windows-key-listener-v")
- * @param {boolean} [options.includePrerelease=false] - Include prerelease versions
+ * @param {string} [options.tag] - Exact tag to fetch (works for any release age, no pagination)
+ * @param {string} [options.tagPrefix] - Latest release whose tag starts with this prefix (searches the 50 most recent only)
+ * @param {boolean} [options.includePrerelease=false] - Include prereleases (tagPrefix only)
* @returns {Promise<{tag: string, assets: Array<{name: string, url: string}>, url: string} | null>}
*/
async function fetchLatestRelease(repo, options = {}) {
- const { tagPrefix, includePrerelease = false } = options;
+ const { tag, tagPrefix, includePrerelease = false } = options;
try {
- // If no tag prefix, use the simple /latest endpoint
+ if (tag) {
+ const url = `https://api.github.com/repos/${repo}/releases/tags/${encodeURIComponent(tag)}`;
+ const release = await fetchJson(url);
+ return formatRelease(release);
+ }
+
if (!tagPrefix) {
const url = `https://api.github.com/repos/${repo}/releases/latest`;
const release = await fetchJson(url);
return formatRelease(release);
}
- // Otherwise, fetch all releases and filter by prefix
const url = `https://api.github.com/repos/${repo}/releases?per_page=50`;
const releases = await fetchJson(url);