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
ci(meeting-aec): prebuild helper binaries on CI, download at prebuild
Gabriel Steincf14bfd36efa
diff --git a/.github/workflows/build-and-notarize.yml b/.github/workflows/build-and-notarize.ymlindex 4d4b08153..42b2a8b55 100644--- a/.github/workflows/build-and-notarize.yml+++ b/.github/workflows/build-and-notarize.yml@@ -37,7 +37,7 @@ jobs:uses: actions/cache@v4with:path: resources/bin- key: linux-x64-bin-${{ hashFiles('scripts/download-*.js', 'scripts/build-meeting-aec-helper.js', 'scripts/lib/meeting-aec-build.js', 'native/meeting-aec-helper/**') }}+ key: linux-x64-bin-${{ hashFiles('scripts/download-*.js') }}- name: Download whisper.cpp binariesrun: node scripts/download-whisper-cpp.js --current@@ -59,6 +59,11 @@ jobs:env:GITHUB_TOKEN: ${{ secrets.GH_TOKEN || github.token }}+ - name: Download meeting AEC helper+ run: node scripts/download-meeting-aec-helper.js --current+ env:+ GITHUB_TOKEN: ${{ secrets.GH_TOKEN || github.token }}+- name: Cache Electronuses: actions/cache@v4with:@@ -112,7 +117,7 @@ jobs:uses: actions/cache@v4with:path: resources/bin- key: windows-x64-bin-${{ hashFiles('scripts/download-*.js', 'scripts/build-meeting-aec-helper.js', 'scripts/lib/meeting-aec-build.js', 'native/meeting-aec-helper/**') }}+ key: windows-x64-bin-${{ hashFiles('scripts/download-*.js') }}- name: Download whisper.cpp binariesrun: node scripts/download-whisper-cpp.js --current@@ -134,6 +139,11 @@ jobs:env:GITHUB_TOKEN: ${{ secrets.GH_TOKEN || github.token }}+ - name: Download meeting AEC helper+ run: node scripts/download-meeting-aec-helper.js --current+ env:+ GITHUB_TOKEN: ${{ secrets.GH_TOKEN || github.token }}+- name: Download nircmd.exerun: node scripts/download-nircmd.jsenv:@@ -213,7 +223,7 @@ jobs:uses: actions/cache@v4with:path: resources/bin- key: macos-${{ matrix.arch }}-bin-${{ hashFiles('scripts/download-*.js', 'scripts/build-globe-listener.js', 'resources/macos-globe-listener.swift', 'scripts/build-macos-fast-paste.js', 'resources/macos-fast-paste.swift', 'scripts/build-meeting-aec-helper.js', 'scripts/lib/meeting-aec-build.js', 'native/meeting-aec-helper/**') }}+ key: macos-${{ matrix.arch }}-bin-${{ hashFiles('scripts/download-*.js', 'scripts/build-globe-listener.js', 'resources/macos-globe-listener.swift', 'scripts/build-macos-fast-paste.js', 'resources/macos-fast-paste.swift') }}- name: Download whisper.cpp binariesrun: node scripts/download-whisper-cpp.js --current --platform darwin --arch ${{ matrix.arch }}@@ -235,6 +245,11 @@ jobs:env:GITHUB_TOKEN: ${{ secrets.GH_TOKEN || github.token }}+ - name: Download meeting AEC helper+ run: node scripts/download-meeting-aec-helper.js --current --platform darwin --arch ${{ matrix.arch }}+ env:+ GITHUB_TOKEN: ${{ secrets.GH_TOKEN || github.token }}+- name: Cache Electronuses: actions/cache@v4with:diff --git a/.github/workflows/build-meeting-aec-helper.yml b/.github/workflows/build-meeting-aec-helper.ymlnew file mode 100644index 000000000..452f0d5e3--- /dev/null+++ b/.github/workflows/build-meeting-aec-helper.yml@@ -0,0 +1,92 @@+name: Build Meeting AEC Helper++on:+ push:+ paths:+ - "native/meeting-aec-helper/**"+ - "scripts/build-meeting-aec-helper.js"+ - "scripts/lib/meeting-aec-build.js"+ - ".github/workflows/build-meeting-aec-helper.yml"+ branches:+ - main+ workflow_dispatch:+ inputs:+ version:+ description: "Version tag (e.g., 1.0.0)"+ required: false+ default: "1.0.0"+ type: string++permissions:+ contents: write++jobs:+ build:+ strategy:+ fail-fast: false+ matrix:+ include:+ - { os: ubuntu-latest, platform: linux, arch: x64 }+ - { os: windows-latest, platform: win32, arch: x64 }+ - { os: macos-latest, platform: darwin, arch: arm64 }+ - { os: macos-latest, platform: darwin, arch: x64 }+ runs-on: ${{ matrix.os }}+ steps:+ - uses: actions/checkout@v4++ - name: Setup Node.js+ uses: actions/setup-node@v4+ with:+ node-version: "22"++ - name: Setup MSVC (Windows)+ if: matrix.platform == 'win32'+ uses: ilammy/msvc-dev-cmd@v1++ - name: Install Linux build deps+ if: matrix.platform == 'linux'+ run: sudo apt-get update && sudo apt-get install -y cmake build-essential python3++ - name: Build meeting AEC helper+ run: node scripts/build-meeting-aec-helper.js --arch ${{ matrix.arch }}+ env:+ TARGET_ARCH: ${{ matrix.arch }}++ - name: Verify binary+ shell: bash+ run: |+ BIN="resources/bin/meeting-aec-helper-${{ matrix.platform }}-${{ matrix.arch }}${{ matrix.platform == 'win32' && '.exe' || '' }}"+ test -f "$BIN" || { echo "Binary not found: $BIN"; exit 1; }+ ls -la "$BIN"++ - name: Package (tar.gz)+ if: matrix.platform != 'win32'+ run: |+ cd resources/bin+ tar -czf "../../meeting-aec-helper-${{ matrix.platform }}-${{ matrix.arch }}.tar.gz" "meeting-aec-helper-${{ matrix.platform }}-${{ matrix.arch }}"++ - name: Package (zip)+ if: matrix.platform == 'win32'+ shell: pwsh+ run: |+ Compress-Archive -Path "resources/bin/meeting-aec-helper-win32-x64.exe" -DestinationPath "meeting-aec-helper-win32-x64.zip"++ - name: Upload artifact+ uses: actions/upload-artifact@v4+ with:+ name: meeting-aec-helper-${{ matrix.platform }}-${{ matrix.arch }}+ path: meeting-aec-helper-${{ matrix.platform }}-${{ matrix.arch }}.*++ - name: Create or update release+ uses: softprops/action-gh-release@v2+ with:+ tag_name: meeting-aec-helper-v${{ inputs.version || '1.0.0' }}+ name: Meeting AEC Helper v${{ inputs.version || '1.0.0' }}+ body: |+ Prebuilt WebRTC Audio Processing sidecar for meeting mic echo cancellation.++ Binaries built from `native/meeting-aec-helper/` against pinned webrtc-apm + abseil-cpp commits.+ files: meeting-aec-helper-${{ matrix.platform }}-${{ matrix.arch }}.*+ make_latest: false+ env:+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex 65a316f2e..87d298824 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -36,7 +36,7 @@ jobs:uses: actions/cache@v4with:path: resources/bin- key: linux-x64-bin-${{ hashFiles('scripts/download-*.js', 'scripts/build-meeting-aec-helper.js', 'scripts/lib/meeting-aec-build.js', 'native/meeting-aec-helper/**') }}+ key: linux-x64-bin-${{ hashFiles('scripts/download-*.js') }}- name: Download whisper.cpp binariesrun: node scripts/download-whisper-cpp.js --current@@ -58,6 +58,11 @@ jobs:env:GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}+ - name: Download meeting AEC helper+ run: node scripts/download-meeting-aec-helper.js --current+ env:+ GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}+- name: Cache Electronuses: actions/cache@v4with:@@ -104,7 +109,7 @@ jobs:uses: actions/cache@v4with:path: resources/bin- key: windows-x64-bin-${{ hashFiles('scripts/download-*.js', 'scripts/build-meeting-aec-helper.js', 'scripts/lib/meeting-aec-build.js', 'native/meeting-aec-helper/**') }}+ key: windows-x64-bin-${{ hashFiles('scripts/download-*.js') }}- name: Download whisper.cpp binariesrun: node scripts/download-whisper-cpp.js --current@@ -126,6 +131,11 @@ jobs:env:GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}+ - name: Download meeting AEC helper+ run: node scripts/download-meeting-aec-helper.js --current+ env:+ GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}+- name: Download nircmd.exerun: node scripts/download-nircmd.jsenv:@@ -198,7 +208,7 @@ jobs:uses: actions/cache@v4with:path: resources/bin- key: macos-${{ matrix.arch }}-bin-${{ hashFiles('scripts/download-*.js', 'scripts/build-globe-listener.js', 'resources/macos-globe-listener.swift', 'scripts/build-macos-fast-paste.js', 'resources/macos-fast-paste.swift', 'scripts/build-meeting-aec-helper.js', 'scripts/lib/meeting-aec-build.js', 'native/meeting-aec-helper/**') }}+ key: macos-${{ matrix.arch }}-bin-${{ hashFiles('scripts/download-*.js', 'scripts/build-globe-listener.js', 'resources/macos-globe-listener.swift', 'scripts/build-macos-fast-paste.js', 'resources/macos-fast-paste.swift') }}- name: Download whisper.cpp binariesrun: node scripts/download-whisper-cpp.js --current --platform darwin --arch ${{ matrix.arch }}@@ -220,6 +230,11 @@ jobs:env:GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}+ - name: Download meeting AEC helper+ run: node scripts/download-meeting-aec-helper.js --current --platform darwin --arch ${{ matrix.arch }}+ env:+ GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}+- name: Cache Electronuses: actions/cache@v4with:diff --git a/package.json b/package.jsonindex bfad5e59e..90870ab84 100644--- a/package.json+++ b/package.json@@ -18,34 +18,33 @@"compile:media-remote": "node scripts/build-media-remote.js","compile:mic-listener": "node scripts/build-macos-mic-listener.js","compile:audio-tap": "node scripts/build-macos-audio-tap.js",- "compile:meeting-aec": "node scripts/build-meeting-aec-helper.js",- "compile:native": "npm run compile:globe && npm run compile:fast-paste && npm run compile:winkeys && npm run compile:winpaste && npm run compile:linux-paste && npm run compile:linux-system-audio && npm run compile:text-monitor && npm run compile:media-remote && npm run compile:mic-listener && npm run compile:audio-tap && npm run compile:meeting-aec",- "prestart": "npm run compile:native && npm run download:qdrant && npm run download:embedding-model",+ "compile:native": "npm run compile:globe && npm run compile:fast-paste && npm run compile:winkeys && npm run compile:winpaste && npm run compile:linux-paste && npm run compile:linux-system-audio && npm run compile:text-monitor && npm run compile:media-remote && npm run compile:mic-listener && npm run compile:audio-tap",+ "prestart": "npm run compile:native && npm run download:meeting-aec-helper && npm run download:qdrant && npm run download:embedding-model","start": "electron .",- "predev": "npm run compile:native && npm run download:qdrant && npm run download:embedding-model",+ "predev": "npm run compile:native && npm run download:meeting-aec-helper && npm run download:qdrant && npm run download:embedding-model","dev": "concurrently -k -r \"npm:dev:renderer\" \"npm:dev:main\"",- "predev:main": "npm run compile:native && npm run download:qdrant && npm run download:embedding-model",+ "predev:main": "npm run compile:native && npm run download:meeting-aec-helper && npm run download:qdrant && npm run download:embedding-model","dev:main": "cross-env NODE_ENV=development node scripts/run-electron.js --dev","dev:renderer": "cd src && vite",- "prebuild": "npm run compile:native && npm run download:whisper-cpp && npm run download:llama-server && npm run download:sherpa-onnx && npm run download:qdrant && npm run download:embedding-model -- --for-build && npm run download:diarization-models -- --output-dir resources/bin/diarization-models",+ "prebuild": "npm run compile:native && npm run download:whisper-cpp && npm run download:llama-server && npm run download:sherpa-onnx && npm run download:qdrant && npm run download:meeting-aec-helper && npm run download:embedding-model -- --for-build && npm run download:diarization-models -- --output-dir resources/bin/diarization-models","build": "cd src && vite build && cd .. && electron-builder","postinstall": "electron-builder install-app-deps","build:renderer": "cd src && vite build",- "prebuild:mac": "npm run compile:native && npm run download:whisper-cpp && npm run download:llama-server && npm run download:sherpa-onnx && npm run download:qdrant && npm run download:diarization-models -- --output-dir resources/bin/diarization-models",+ "prebuild:mac": "npm run compile:native && npm run download:whisper-cpp && npm run download:llama-server && npm run download:sherpa-onnx && npm run download:qdrant && npm run download:meeting-aec-helper && npm run download:diarization-models -- --output-dir resources/bin/diarization-models","build:mac": "npm run build:renderer && electron-builder --mac","build:mac:arm64": "npm run build:renderer && electron-builder --mac --arm64","build:mac:x64": "npm run build:renderer && electron-builder --mac --x64",- "prebuild:win": "npm run compile:native && npm run download:whisper-cpp && npm run download:llama-server && npm run download:sherpa-onnx && npm run download:qdrant && npm run download:diarization-models -- --output-dir resources/bin/diarization-models && npm run download:nircmd && npm run download:windows-fast-paste && npm run download:windows-key-listener && npm run download:windows-mic-listener",+ "prebuild:win": "npm run compile:native && npm run download:whisper-cpp && npm run download:llama-server && npm run download:sherpa-onnx && npm run download:qdrant && npm run download:meeting-aec-helper && npm run download:diarization-models -- --output-dir resources/bin/diarization-models && npm run download:nircmd && npm run download:windows-fast-paste && npm run download:windows-key-listener && npm run download:windows-mic-listener","build:win": "npm run build:renderer && electron-builder --win",- "prebuild:linux": "npm run compile:native && npm run download:whisper-cpp && npm run download:llama-server && npm run download:sherpa-onnx && npm run download:qdrant && npm run download:diarization-models -- --output-dir resources/bin/diarization-models",+ "prebuild:linux": "npm run compile:native && npm run download:whisper-cpp && npm run download:llama-server && npm run download:sherpa-onnx && npm run download:qdrant && npm run download:meeting-aec-helper && npm run download:diarization-models -- --output-dir resources/bin/diarization-models","build:linux": "npm run build:renderer && electron-builder --linux","build:linux:appimage": "npm run build:renderer && electron-builder --linux AppImage","build:linux:deb": "npm run build:renderer && electron-builder --linux deb","build:linux:rpm": "npm run build:renderer && electron-builder --linux rpm","build:linux:tar": "npm run build:renderer && electron-builder --linux tar.gz",- "prepack": "npm run compile:native && npm run download:whisper-cpp && npm run download:llama-server && npm run download:sherpa-onnx && npm run download:qdrant && npm run download:diarization-models -- --output-dir resources/bin/diarization-models",+ "prepack": "npm run compile:native && npm run download:whisper-cpp && npm run download:llama-server && npm run download:sherpa-onnx && npm run download:qdrant && npm run download:meeting-aec-helper && npm run download:diarization-models -- --output-dir resources/bin/diarization-models","pack": "npm run build:renderer && cross-env CSC_IDENTITY_AUTO_DISCOVERY=false electron-builder --dir",- "predist": "npm run compile:native && npm run download:whisper-cpp && npm run download:llama-server && npm run download:sherpa-onnx && npm run download:qdrant && npm run download:diarization-models -- --output-dir resources/bin/diarization-models",+ "predist": "npm run compile:native && npm run download:whisper-cpp && npm run download:llama-server && npm run download:sherpa-onnx && npm run download:qdrant && npm run download:meeting-aec-helper && npm run download:diarization-models -- --output-dir resources/bin/diarization-models","dist": "npm run build:renderer && electron-builder","download:whisper-cpp": "node scripts/download-whisper-cpp.js --current","download:whisper-cpp:all": "node scripts/download-whisper-cpp.js --all",@@ -57,6 +56,8 @@"download:windows-fast-paste": "node scripts/download-windows-fast-paste.js","download:windows-key-listener": "node scripts/download-windows-key-listener.js","download:windows-mic-listener": "node scripts/download-windows-mic-listener.js",+ "download:meeting-aec-helper": "node scripts/download-meeting-aec-helper.js --current",+ "download:meeting-aec-helper:all": "node scripts/download-meeting-aec-helper.js --all","download:qdrant": "node scripts/download-qdrant.js --current","download:qdrant:all": "node scripts/download-qdrant.js --all","download:embedding-model": "node scripts/download-minilm.js",diff --git a/scripts/download-meeting-aec-helper.js b/scripts/download-meeting-aec-helper.jsnew file mode 100644index 000000000..5cad1dd16--- /dev/null+++ b/scripts/download-meeting-aec-helper.js@@ -0,0 +1,126 @@+#!/usr/bin/env node+/**+ * Downloads prebuilt meeting AEC helper binary from GitHub releases.+ *+ * Usage:+ * node scripts/download-meeting-aec-helper.js [--current|--all] [--platform p --arch a] [--force]+ */++const fs = require("fs");+const path = require("path");+const {+ cleanupFiles,+ downloadFile,+ extractArchive,+ fetchLatestRelease,+ parseArgs,+ setExecutable,+} = require("./lib/download-utils");++const REPO = "OpenWhispr/openwhispr";+const TAG_PREFIX = "meeting-aec-helper-v";+const VERSION_OVERRIDE = process.env.MEETING_AEC_HELPER_VERSION || null;+const BIN_DIR = path.join(__dirname, "..", "resources", "bin");++const TARGETS = [+ { platform: "darwin", arch: "arm64", ext: "tar.gz" },+ { platform: "darwin", arch: "x64", ext: "tar.gz" },+ { platform: "linux", arch: "x64", ext: "tar.gz" },+ { platform: "win32", arch: "x64", ext: "zip" },+];++const binaryName = ({ platform, arch }) =>+ `meeting-aec-helper-${platform}-${arch}${platform === "win32" ? ".exe" : ""}`;++const archiveName = ({ platform, arch, ext }) =>+ `meeting-aec-helper-${platform}-${arch}.${ext}`;++async function downloadTarget(target, release, force) {+ const binary = binaryName(target);+ const outputPath = path.join(BIN_DIR, binary);++ if (fs.existsSync(outputPath) && !force) {+ console.log(`[meeting-aec-helper] ${binary} already exists`);+ return;+ }++ const archive = archiveName(target);+ const asset = release.assets.find((a) => a.name === archive);+ if (!asset) {+ console.warn(`[meeting-aec-helper] Release ${release.tag} missing ${archive}`);+ return;+ }++ fs.mkdirSync(BIN_DIR, { recursive: true });+ const archivePath = path.join(BIN_DIR, archive);+ const extractDir = path.join(BIN_DIR, `temp-meeting-aec-helper-${target.platform}-${target.arch}`);++ try {+ console.log(` Downloading ${archive}...`);+ await downloadFile(asset.url, archivePath);++ fs.mkdirSync(extractDir, { recursive: true });+ await extractArchive(archivePath, extractDir);++ const extractedBinary = path.join(extractDir, binary);+ if (!fs.existsSync(extractedBinary)) {+ throw new Error(`Binary not found in archive: ${binary}`);+ }++ fs.copyFileSync(extractedBinary, outputPath);+ setExecutable(outputPath);++ const sizeKb = Math.round(fs.statSync(outputPath).size / 1024);+ console.log(`[meeting-aec-helper] Downloaded ${binary} (${sizeKb}KB)`);+ } catch (error) {+ console.error(`[meeting-aec-helper] ${binary} failed: ${error.message}`);+ console.log("[meeting-aec-helper] Meeting AEC will fall back to JS echo leak detector");+ } finally {+ fs.rmSync(extractDir, { recursive: true, force: true });+ if (fs.existsSync(archivePath)) {+ fs.unlinkSync(archivePath);+ }+ }+}++async function main() {+ const args = parseArgs();++ const selected = args.isAll+ ? TARGETS+ : TARGETS.filter((t) => t.platform === args.targetPlatform && t.arch === args.targetArch);++ if (selected.length === 0) {+ console.log(+ `[meeting-aec-helper] No target for ${args.targetPlatform}-${args.targetArch}, skipping`+ );+ return;+ }++ if (VERSION_OVERRIDE) {+ console.log(`\n[meeting-aec-helper] Using pinned version: ${VERSION_OVERRIDE}`);+ } else {+ console.log("\n[meeting-aec-helper] Fetching latest release...");+ }+ const release = await fetchLatestRelease(REPO, {+ tagPrefix: VERSION_OVERRIDE || TAG_PREFIX,+ });++ if (!release) {+ console.warn("[meeting-aec-helper] No release found, skipping download");+ console.log("[meeting-aec-helper] Meeting AEC will fall back to JS echo leak detector");+ return;+ }++ for (const target of selected) {+ await downloadTarget(target, release, args.isForce);+ }++ if (args.shouldCleanup && !args.isAll) {+ cleanupFiles(BIN_DIR, "meeting-aec-helper-", `meeting-aec-helper-${args.platformArch}`);+ }+}++main().catch((error) => {+ console.error("[meeting-aec-helper] Unexpected error:", error.message);+});