FDSoundActivatedRecorder is a Swift library for iOS that implements sound-activated audio recording. It automatically starts recording when sound exceeds a dynamic threshold and stops when silence is detected, saving the output as an m4a file with fade-in/fade-out to prevent clicks. The core logic uses a moving average of audio power levels to dynamically adjust trigger thresholds, making it robust to varying noise environments. Built with modern Swift concurrency (actor) for thread safety, it provides a delegate protocol for callbacks and metering updates. The library is self-contained, depends only on standard iOS frameworks, and includes an example app demonstrating integration via SwiftUI.
Moonshine Voice is an open-source AI toolkit for building real-time voice agents and applications with on-device speech-to-text, text-to-speech, and voice cloning capabilities. The system emphasizes privacy, low latency, and offline operation through a cross-platform C++ core with language bindings for Python, Swift, Android, and WebAssembly. It includes optimized models for various platforms (from microcontrollers to desktops), multilingual grapheme-to-phoneme conversion, speaker diarization, and embedding-based phrase matching. The architecture features modular components for audio processing, model inference, and language-specific rules, with examples demonstrating microphone transcription, streaming TTS, agent workflows, and embedded deployments on RP2350 microcontrollers.
Silero VAD is a pre-trained enterprise-grade Voice Activity Detector library that provides speech detection capabilities for audio signals. The system consists of a core PyTorch model (also available in ONNX format) with Python utilities for audio processing, speech timestamp extraction, and streaming applications. It supports 8kHz and 16kHz sampling rates and includes a VADIterator class for real-time processing. The repository offers multi-language examples (C++, C#, Go, Haskell, Java, Rust) demonstrating integration, along with tools for model tuning and sequence-based ONNX optimization for improved performance on long audio files.
Swabble is a macOS 26 CLI daemon and Swift library that listens to the microphone, detects a configurable wake word (default 'clawd'), transcribes speech locally using Apple's Speech.framework (SpeechAnalyzer + SpeechTranscriber), and executes a user-defined shell hook with the transcript. It also supports offline file transcription to TXT or SRT. The architecture is a monolith Swift package with a library target (SwabbleCore) exposing reusable components like the speech pipeline, hook runner, config loader, and transcript store, and an executable target (SwabbleCLI) using the Commander library for command routing. Key data flows: microphone audio → AVAudioEngine tap → BufferConverter → SpeechAnalyzer → SpeechTranscriber → async stream → wake-word matching → HookRunner → shell process. External dependencies are limited to Apple frameworks and the Commander package. The codebase demonstrates strong use of Swift 6.2 concurrency (actors, async streams), careful process management with timeout and cancellation, and clean separation of concerns. It is well-tested with CI covering formatting, linting, unit tests, and release verification.