Language models can do a lot. They can write, summarize, translate, and call tools. But this is just the tip of the iceberg of what machine learning is capable of.
Suppose a customer calls your support hotline. First, you need to understand what they are saying (speech recognition). Then, you need to decide where to route them (decision making). You could hand both tasks over to a language model, but models purpose-built for each scenario are often better, faster, and cheaper.
In our AnyLanguageModel 1.0 retrospective, we looked back at a year of local and hosted models in Swift. With the 1.x releases of AnyLanguageModel and swift-huggingface, we are bringing that same design philosophy to speech and decision-making: offering familiar Swift APIs with the freedom to choose your model.
Today, we are officially releasing two packages:
- AnySpeechRecognizer implements Apple’s new speech-to-text API with swappable recognition engines—including NVIDIA Parakeet and Alibaba’s Qwen3-ASR running locally on Core ML—while also adding speaker diarization to track who spoke and when.
- AnyDecisionModel answers yes/no, multiple-choice, and rating questions, returning typed results along with their probabilities. Instead of generating text, it derives each answer directly from model probabilities. It supports running models on-device via MLX, Core AI, or llama.cpp, as well as using decision models from Jev or Ollama.
Both packages support downloading open-source models from the Hugging Face Hub and running them locally on-device.
AnySpeechRecognizer
Computers have been transcribing speech for decades, and over the past few years, the technology has gotten remarkably good. Apple platforms have long offered related APIs, but macOS 26 and iOS 26 introduced SpeechAnalyzer, Apple’s brand-new speech-to-text API. You add modules like SpeechTranscriber and SpeechDetector to an analyzer, feed in an audio file or an audio buffer stream, and consume results in real time as async sequences produce them. AssetInventory manages the installation of model assets, giving your app full control over when downloads happen.
It is a well-designed API, but it only supports Apple’s official built-in engine. AnySpeechRecognizer adopts this exact API surface while letting you swap out the underlying engine:
import Speechimport AnySpeechRecognizerThe package mirrors SpeechAnalyzer, SpeechTranscriber, DictationTranscriber, SpeechDetector, and AssetInventory, defaulting to Apple’s Speech framework under the hood. If your code already uses this common API, updating the import statement is all it takes. To switch to Parakeet instead, you simply change how the transcriber is created:
let transcriber = SpeechTranscriber( model: ParakeetSpeechModel(variant: .v3), transcriptionOptions: [], reportingOptions: [.volatileResults], attributeOptions: [.audioTimeRange])The steps for installing assets, running the analyzer, and reading results remain identical. The README provides a complete example and notes differences from Apple’s Speech framework.
Meet the Models
Parakeet v3 is NVIDIA’s Parakeet TDT 0.6B v3. It is a polyglot: supporting transcription across 25 European languages with automatic language detection, meaning you do not even need to specify a locale.
Parakeet Ultra is a post-trained version of v3 by Moondream. Across most of our real-world evaluations, it delivers higher accuracy.
Parakeet Unified is an English-only version of Parakeet from NVIDIA.
All three Parakeet models run on the package’s built-in Core ML runtime, supporting both audio files and live streaming input, volatile results, word-level timing, and word-level confidence scores.
Qwen3-ASR is Alibaba’s speech model, available in 0.6B and 1.7B sizes. It supports 30 languages and 22 Chinese dialects, covering languages not supported by Parakeet such as Mandarin, Cantonese, Japanese, and Korean. It can detect languages automatically or accept an explicit locale:
let transcriber = SpeechTranscriber( model: QwenSpeechModel(variant: .large, language: Locale.Language(identifier: "yue")), transcr