Two new open-source packages, AnySpeechRecognizer and AnyDecisionModel, have been announced to extend machine learning capabilities on Apple platforms beyond standard language models. While large language models handle text generation, these new tools provide specialized, faster, and more cost-effective solutions for speech recognition and decision-making tasks directly within Swift applications.

AnySpeechRecognizer builds upon the SpeechAnalyzer API introduced in macOS 26 and iOS 26, allowing developers to swap Apple's default engine with third-party open models. The package supports NVIDIA's Parakeet series, including the polyglot Parakeet v3 which recognizes 25 European languages, and Alibaba's Qwen3-ASR, which covers 30 languages and 22 Chinese dialects. Unlike Apple's native framework, AnySpeechRecognizer also introduces speaker diarization capabilities using NVIDIA's Streaming Sortformer models, enabling apps to track up to four speakers simultaneously even during overlapping speech.

The package mirrors the structure of Apple's Speech framework, meaning developers can switch engines by changing only the import statement and model initialization. Models are converted to Core ML format and hosted on the Hugging Face Hub, with downloads managed via AssetInventory to ensure assets are installed only when needed. Performance benchmarks conducted on an M4 Max Mac Studio running macOS 27 showed that Parakeet Unified achieved a word error rate of 1.43% on clean test files, outperforming Apple's default transcriber in specific scenarios. However, live transcription generally resulted in higher error rates compared to file processing.

AnyDecisionModel addresses the need for structured decision-making, such as classifying support tickets or gauging customer sentiment, without relying on text generation parsing. Instead of generating free-form text, the package derives answers from model probabilities, returning typed results with confidence scores and probability distributions for each option. It supports yes-or-no questions, multiple-choice selections, and rating scales through a session-based API that holds a single state of text or JSON.

The decision package offers six different backends to execute models locally or remotely. Local options include MLX for Apple silicon, Core AI for macOS 27 and iOS 27, and llama.cpp via GGUF models. For hosted solutions, it integrates with TypeSafe's Jev API and Ollama servers. A notable feature is the support for specialized decision heads, such as Cloudflare's Clef-Flash model, which uses a trained head to output decisions in a single forward pass rather than relying on next-token probabilities.

Both packages require Swift 6.2 or later and are compatible with macOS 26/iOS 26 or newer. While AnySpeechRecognizer requires Apple silicon for its Parakeet and Sortformer runtimes, AnyDecisionModel's local backends also depend on specific hardware architectures. Developers can add the libraries to their projects via Swift Package Manager, with detailed examples and conversion workflows available in their respective GitHub repositories.

Sources: Hugging Face Blog.