Repository navigation
Replace whisper.cpp with sherpa-onnx (Silero VAD + Moonshine ASR) - #1
Merged
Merged
Conversation
… models header Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…style Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace all WhisperEngine references in Pipeline.swift with SherpaEngine. Remove hallucination-phrase filters from TranscriptWriter (Silero VAD makes them unnecessary); keep the punctuation-only guard. Update Utterance doc comment in Types.swift to reflect SherpaEngine authorship. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace whisper.cpp build step with sherpa-onnx: call download-sherpa.sh, copy real dylibs into Contents/Frameworks/, patch rpath with @executable_path/../Frameworks, and bundle sherpa-models into Resources. Remove tools/build-whisper.sh. Also fix CSherpa header relative path (../../../ → ../../) to match actual project layout. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- SherpaEngine: set silero.max_speech_duration = 30.0 (zero-init caused VAD threshold to spike immediately on any speech, suppressing all output) - Pipeline: log call-stack on stop() entry to aid future diagnostics - tools/download-sherpa.sh: fix CSherpa forwarding header to use ../../../ (Sources/CSherpa/include/ is 3 levels from repo root, not 2) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Silero closes segments after 500 ms of silence, so continuous speech was being split into many short lines. Now utterances arriving within 3 seconds of each other are joined with a space on the same line. A newline is emitted when the gap exceeds the threshold, and flush() terminates the final line before the file is closed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ts/al - Replace Moonshine base en int8 with NeMo Parakeet TDT 0.6B v3 int8 via sherpa-onnx (transducer config + model_type=nemo_transducer, CoreML EP). Higher accuracy English ASR; ~4× larger model (~600 MB unpacked). - Move transcript output from ~/.al/ to ~/Documents/al/ in both TranscriptWriter and the menu-bar "Open Log Folder" action.
Adds an opt-in pipeline: sealed-box encrypt each utterance on the client,
ship to a small FastAPI server, search across all clients by text + dense
embedding from the new Browse window. Everything keyed by a pre-shared
key on every endpoint, including pubkey fetch.
Client (Sources/Al/):
- Settings.swift: UserDefaults-backed server URL, PSK, writeLocally
toggle (default on), stable client UUID.
- Crypto.swift: X25519 ephemeral keypair + HKDF-SHA256 + ChaCha20-Poly1305
sealed-box envelope; CryptoKit-only.
- LogShipper.swift: actor with JSONL outbox under Application Support,
worker loop, pubkey refresh ahead of valid_until.
- OptionsWindow.swift / BrowserWindow.swift: SwiftUI windows for config
and infinite-scroll hybrid search with document preview.
- AppDelegate.swift: install a hidden main menu so Cmd-C/V/A reach text
fields in accessory mode.
- TranscriptWriter / MenuBarContentView: respect writeLocally toggle.
- SherpaEngine.swift: bump VAD min_silence_duration to 1.5 s.
Server (server/):
- FastAPI app with PSK on every endpoint, including /pubkey.
- Auto-rotating X25519 keys with valid_until and retention window;
decrypts try every retained key.
- Server-side document grouping by temporal proximity across all
clients; embeddings cached per text_hash.
- Endpoints: /pubkey, /logs, /search, /search/semantic, /search/hybrid,
/documents, /document/{id}, /recent, /clients, /files/{...}.
- Dockerfile + docker-compose.yml.
CI (.github/workflows/server-image.yml):
- Build & push the server image to GHCR on changes under server/**.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tools/download-sherpa.shfor idempotent download of dylibs (~50 MB) and models (~150 MB);build.shupdated to bundle the real dylibs and copy sherpa-models into the appmax_speech_durationwas zero-initialized to0.0, causing Silero's threshold to spike immediately on any speech and suppress all transcription output; fixed to30.0Test Plan
LIVETRANSLATE_SIGN_IDENTITY=LiveTranslateDev ./build.sh— build completes cleanlyopen build/Al.app→ grant mic + screen recording permissionstail -f /tmp/al.logshowsSherpaEngine[mic]: "…"cat ~/.al/**/*.txt | tail -5— transcribed lines appear~/.al/<date>/ps -o rss,command -p $(pgrep -f 'build/Al.app')— RSS plateaus ~300 MBAl: bye🤖 Generated with Claude Code