Skip to content

Private AI meeting notes that stay on your computer. No meeting bot. Free and open source for Mac, Windows and Linux. An alternative to Granola, Otter and Fireflies.

Linux build: the whisper-server build replaces only its own libraries in resources/bin, so the notes engine's allocator shim (#32) ships in the package

christianmat3d397cf7563b
diff --git a/app/scripts/whisper-build.mjs b/app/scripts/whisper-build.mjs
index 9366f04c..ed0f3f12 100644
--- a/app/scripts/whisper-build.mjs
+++ b/app/scripts/whisper-build.mjs
@@ -17,6 +17,7 @@ import { copyFileSync, existsSync, mkdirSync, readdirSync, readFileSync, renameS
import { cpus } from 'node:os'
import { dirname, join } from 'node:path'
import { fileURLToPath } from 'node:url'
+import { isWhisperLib } from './whisperLibs.mjs'
const WHISPER_COMMIT = 'd1be6fde11ac6e0407606b4e42fe72d34add8037' // v1.9.5, as in native.sh
const VAD_URL = 'https://huggingface.co/ggml-org/whisper-vad/resolve/9ffd54a1e1ee413ddf265af9913beaf518d1639b/ggml-silero-v6.2.0.bin'
@@ -71,7 +72,7 @@ if (!existsSync(out) || newer(script, out) || newer(patch, out) || newer(vadPatc
const built = win ? join(build, 'bin', 'Release') : join(build, 'bin')
mkdirSync(bin, { recursive: true })
const libs = readdirSync(built).filter((f) => win ? f.endsWith('.dll') : /^lib.*\.so$/.test(f))
- for (const f of readdirSync(bin)) if (win ? f.endsWith('.dll') : /^lib.*\.so$/.test(f)) rmSync(join(bin, f))
+ for (const f of readdirSync(bin)) if (isWhisperLib(f, win)) rmSync(join(bin, f))
for (const f of libs) copyFileSync(join(built, f), join(bin, f))
copyFileSync(join(built, win ? 'whisper-server.exe' : 'whisper-server'), out)
if (win) utf8Manifest(out)
diff --git a/app/scripts/whisperLibs.mjs b/app/scripts/whisperLibs.mjs
new file mode 100644
index 00000000..a91c0048
--- /dev/null
+++ b/app/scripts/whisperLibs.mjs
@@ -0,0 +1,3 @@
+// The shared libraries whisper-server's build owns in resources/bin, so a rebuild replaces them and nothing else:
+// on Linux the notes engine's allocator shim (libyogurt-bigalloc.so, #32) lives there too.
+export const isWhisperLib = (name, win) => win ? name.endsWith('.dll') : /^lib(ggml|whisper).*\.so/.test(name)
diff --git a/app/test/whisperLibs.test.ts b/app/test/whisperLibs.test.ts
new file mode 100644
index 00000000..21eaa565
--- /dev/null
+++ b/app/test/whisperLibs.test.ts
@@ -0,0 +1,16 @@
+import { describe, expect, it } from 'vitest'
+// @ts-expect-error plain .mjs build script helper
+import { isWhisperLib } from '../scripts/whisperLibs.mjs'
+
+describe('which files the whisper-server build replaces in resources/bin', () => {
+ it('replaces its own ggml and whisper libraries', () => {
+ expect(isWhisperLib('libggml-base.so', false)).toBe(true)
+ expect(isWhisperLib('libggml-vulkan.so', false)).toBe(true)
+ expect(isWhisperLib('libwhisper.so.1', false)).toBe(true)
+ expect(isWhisperLib('ggml-cuda.dll', true)).toBe(true)
+ })
+ it('never removes the notes engine allocator shim (#32) or other helpers', () => {
+ expect(isWhisperLib('libyogurt-bigalloc.so', false)).toBe(false)
+ expect(isWhisperLib('yogurt-audio', false)).toBe(false)
+ })
+})