{"id":177294,"topic":"ai","source":"","title":"Introducing AnySpeechRecognizer and AnyDecisionModel: Open Models for Speech and Decisions on Apple Platforms","url":"https://huggingface.co/blog/anydecisionmodel","url_hash":"85d975255b4f9d004ddb3cbeee15f8e8556ffee6","author":"","summary":"","content":"Introducing AnySpeechRecognizer and AnyDecisionModel: Open Models for Speech and Decisions on Apple Platforms\nLanguage models can do a lot. They write, summarize, translate, and call tools. But they're only a small part of what machine learning can do.\nSay a customer calls your support line. First, you want to know what they said (speech recognition). Then, you want to decide where to send them (decision). You could hand both to a language model, but there are models built for each that are better, faster, and less expensive.\nIn our AnyLanguageModel 1.0 recap, we looked at a year of local and hosted models in Swift. With AnyLanguageModel and swift-huggingface now on their 1.x releases, we're extending the same approach to speech and decisions: familiar Swift APIs with a choice of model.\nToday we're announcing two packages:\n- AnySpeechRecognizer implements Apple's new speech-to-text API with a choice of recognition engine, including NVIDIA's Parakeet and Alibaba's Qwen3-ASR running locally on Core ML, and adds speaker diarization to track who speaks when.\n- AnyDecisionModel answers yes-or-no, multiple-choice, and rating-scale questions with typed results and probabilities. It derives each answer from the model's probabilities instead of generating text, using a model on your device with MLX, Core AI, or llama.cpp, or a decision model from Jev or Ollama.\nBoth packages can download open models from the Hugging Face Hub and run them on device.\nComputers have been transcribing speech for decades,\nand in the past few years, they've gotten very good at it.\nApple platforms already have an API for it.\nmacOS 26 and iOS 26 introduced SpeechAnalyzer,\nApple's new speech-to-text API.\nYou add modules such as SpeechTranscriber and SpeechDetector to an analyzer,\ngive it a file or a stream of audio buffers,\nand read results from async sequences as they arrive.\nAssetInventory installs the models,\nso your app decides when downloads happen.\nIt's a well-designed API, but the only engine behind it is Apple's. AnySpeechRecognizer keeps the API and lets you choose the engine:\n- import Speech\n+ import AnySpeechRecognizer\nThe package mirrors SpeechAnalyzer, SpeechTranscriber, DictationTranscriber,\nSpeechDetector, and AssetInventory,\nwith Apple's Speech framework as the default engine.\nIf your code uses that shared API, changing the import is enough.\nTo use Parakeet instead,\nchange only how you create the transcriber:\nlet transcriber = SpeechTranscriber(\n    model: ParakeetSpeechModel(variant: .v3),\n    transcriptionOptions: [],\n    reportingOptions: [.volatileResults],\n    attributeOptions: [.audioTimeRange]\n)\nThe steps for installing assets, running the analyzer, and reading results stay the same. The README has a complete example and lists the differences from Apple's framework.\nParakeet v3 is NVIDIA's Parakeet TDT 0.6B v3. It's a polyglot: it recognizes 25 European languages and works out which one it's hearing, so you don't pass a locale.\nParakeet Ultra is Moondream's post-trained take on v3. It was more accurate in most of our measurements.\nParakeet Unified is NVIDIA's English-only Parakeet.\nAll three Parakeets run on the package's own Core ML runtime, which supports file and live input, volatile results, word timing, and word confidence.\nQwen3-ASR is Alibaba's speech model, in 0.6B and 1.7B sizes. It recognizes 30 languages and 22 Chinese dialects, including Mandarin, Cantonese, Japanese, and Korean, which Parakeet doesn't cover. It detects the language automatically, or you can set one:\nlet transcriber = SpeechTranscriber(\n    model: QwenSpeechModel(variant: .large, language: Locale.Language(identifier: \"yue\")),\n    transcriptionOptions: [],\n    reportingOptions: [],\n    attributeOptions: []\n)\nQwen3-ASR gives one final result for each segment of up to 40 seconds, without volatile results, word timing, or confidence. It runs on the GPU and is slower than Parakeet, so it's better suited to transcribing files than live input.\nTo add another engine, implement SpeechRecognitionModel for its configuration\nand SpeechRecognitionExecutor for one module's session.\nThe README includes a small provider\nthat reports placeholder text to help you get started.\nTo run these models in apps, we converted them to Core ML and published them on the Hub:\n| Model | Core ML conversion | Original checkpoint | License | \n|---|---|---|---|\n| Parakeet TDT 0.6B v3 | mattt/parakeet-tdt-0.6b-v3-coreml | nvidia/parakeet-tdt-0.6b-v3 | CC BY 4.0 | \n| Parakeet Ultra | mattt/parakeet-ultra-coreml | moondream/parakeet-ultra | CC BY 4.0 | \n| Parakeet Unified EN 0.6B | mattt/parakeet-unified-en-0.6b-coreml | nvidia/parakeet-unified-en-0.6b | NVIDIA Open Model License | \n| Qwen3-ASR 0.6B | mattt/qwen3-asr-0.6b-coreml | Qwen/Qwen3-ASR-0.6B-hf | Apache 2.0 | \n| Qwen3-ASR 1.7B | mattt/qwen3-asr-1.7b-coreml | Qwen/Qwen3-ASR-1.7B-hf | Apache 2.0 | \n| Streaming Sortformer 4spk v2 | mattt/diar-streaming-sortformer-4spk-v2-coreml | nvidia/diar_streaming_sortformer_4spk-v2 | CC BY 4.0 | \n| Streaming Sortformer 4spk v2.1 | mattt/diar-streaming-sortformer-4spk-v2.1-coreml | nvidia/diar_streaming_sortformer_4spk-v2.1 | NVIDIA Open Model License | \nEach repository records its source checkpoint and a checksum for every file, and the package pins it to a fixed revision. The Parakeet repositories add an 8-second encoder for live input, which cuts live analysis time by about a third at the cost of a somewhat higher word error rate. The repository also has the conversion workflows, most of which follow FluidInference's mobius scripts, and checks each conversion against the original model.\nDownloads happen only when your app asks for them: about 600 MB for each Parakeet, plus about 590 MB for the live encoder, 0.9 to 2.4 GB for Qwen3-ASR, and about 250 MB for Sortformer. Files go in the standard Hugging Face cache, so a Mac app outside the sandbox shares them with Python and other Hugging Face tools.\nWhen you transcribe a conversation,\nyou often want to know who said what.\nThat's speaker diarization,\nand Apple's Speech framework doesn't have a module for it,\nso AnySpeechRecognizer adds one.\nSpeakerDiarizer runs NVIDIA's\nStreaming Sortformer\non Core ML alongside an Apple or Parakeet transcriber,\non the same timeline:\nlet diarizer = SpeakerDiarizer(model: SortformerDiarizationModel())\nif let request = try await AssetInventory.assetInstallationRequest(\n    supporting: [transcriber, diarizer]\n) {\n    try await request.downloadAndInstall()\n}\nlet analyzer = SpeechAnalyzer(modules: [transcriber, diarizer])\nThe diarizer tracks up to four speakers,\neven when they talk over each other.\nA SpeakerTimeline collects its results\nand attributes each timed word to a speaker,\nso you can print a transcript by speaker turn.\nLike image support in AnyLanguageModel,\nthis goes beyond what Apple's API offers today.\nThe diarizer uses Sortformer v2 by default. You can also choose v2.1, which NVIDIA trained with more meeting data and which was more accurate on meetings in our measurements, too.\nWe measured the package with its hear command-line tool\non an M4 Max Mac Studio with macOS 27.0.1.\nHere are the word error rates on LibriSpeech files of 3 to 8 minutes:\n| Transcriber | test-clean | test-other | \n|---|---|---|\n| Parakeet v3, file | 1.55% | 2.78% | \n| Parakeet v3, live | 4.73% | 4.29% | \n| Parakeet Ultra, file | 1.66% | 2.55% | \n| Parakeet Ultra, live | 2.65% | 3.28% | \n| Parakeet Unified, file | 1.43% | 2.19% | \n| Parakeet Unified, live | 1.45% | 2.42% | \n| Apple's transcriber, file | 2.12% | 3.97% | \nParakeet transcribes an hour of audio in about 20 to 40 seconds from a file, or about 1.5 to 2.5 minutes live, with about 100 MB of memory once Core ML has compiled the model. Qwen3-ASR is much slower and needs a few gigabytes of memory. Meetings are hard for everyone: on AMI recordings, where people talk over each other, every engine we tested had a word error rate above 23%.\nThese numbers come from one machine and a few datasets,\nso measure with your own hardware and audio.\nhear evaluate works on your own files,\nand the repository's natural-speech-eval.py tool\nreproduces these measurements.\nSo far, we've tested only on macOS 27, not on an iPhone.\nNext, we'd like to add more engines, including Core AI on macOS 27 and iOS 27.\nAnyDecisionModel is a different story. There's no Apple framework to map onto, and decision models aren't new, exactly.\nIt's only a decision model if it comes from the Décision region of France; otherwise, it's sparkling zero-shot classification.\nWhat's new is the name, a lot of hype, and a crop of models trained to make decisions. We think that's where things are going, so we wanted a Swift API that's ready for them.\nApps often ask language models to make decisions. Is this message urgent? Which team should handle this ticket? How frustrated is this customer? The usual approach is to prompt a language model and parse the text that it generates. That gives you one answer, but doesn't show the probabilities it assigned to the alternatives.\nHere's what a decision looks like in Swift:\nimport AnyDecisionModel\nenum Department: String, Choosable {\n    case billing, technical, sales\n}\nlet ticket = \"I was charged twice for my order, and now the app logs me out when I try to ask for a refund.\"\nlet model = MLXDecisionModel(modelID: \"mlx-community/Qwen3-4B-Instruct-2507-4bit\")\nlet session = DecisionSession(model: model, state: .text(ticket))\nlet urgent = try await session.probability(of: \"Does this convey urgency?\")\nlet team = try await session.choice(\"Which team?\", from: Department.self)\nlet anger = try await session.score(\n    \"How frustrated?\",\n    levels: [\"Calm\", \"Frustrated\", \"Very angry\"]\n)\nurgent is a Double.\nteam is a Choice<Department> containing the selected case,\na probability for each option, and a confidence value.\nanger is a Score containing the expected level,\na probability for each level, and a confidence value.\nBecause Department conforms to Choosable,\nteam.value is a Department that you can use in an exhaustive switch.\nIf you've used Foundation Models or AnyLanguageModel,\nthe model-and-session pattern will look familiar.\nA DecisionSession holds a single state, which can be text or JSON,\nand every question is about that state.\nQuestions are independent:\nan answer never becomes input to a later question.\nTo ask several questions at once,\npass them to decide(_:) as a batch.\nFor each question, the MLX backend builds a prompt with a one-token label for each allowed answer, then reads the probability of each label from one forward pass.\nEmoji Magnet is a macOS app with a text field above a pile of 343 emoji. Type a phrase, such as \"things you wear\", and the emoji that match rise out of the pile. Refine it to \"things you wear in winter\", and the emoji that no longer match fall back.\nThe app has no built-in keyword rules; the model decides everything at inference time. When you pause typing, it asks the model one yes-or-no question for each emoji, for example:\nStatement: a heavy winter coat fits the description \"things you wear\". Is this statement true?\nThe session's state holds the phrase.\nThe demo above uses the hosted Jev backend,\nwhich answers all 343 questions in one request,\nso the emoji settle in about half a second for each phrase.\nWithout a TYPESAFE_AI_API_KEY, the app runs Qwen3 4B on your Mac with the MLX backend.\nThat backend uses prefix caching to evaluate the state once,\nthen answers 16 questions per forward pass.\nOn an M4 Max, a group of 16 takes about 0.45 seconds after the model loads.\nA full pass over all 343 emoji takes about 10 seconds,\nand each group's results appear as soon as they arrive.\nEmoji Magnet is in the AnyDecisionModel-Examples repository.\nReading next-token probabilities works with general-purpose language models, but those models weren't trained to make decisions. Cloudflare's Clef models are an example of a newer approach: a model with a trained decision head that turns a state and a schema of typed questions into decisions, returning probabilities for all allowed options across the questions in one forward pass. Clef-Flash is the 9B variant.\nAnyDecisionModel runs Clef-Flash on a Mac with MLX:\nlet model = MLXHeadDecisionModel(\n    modelID: \"mlx-community/clef-flash-4bit\",\n    head: .jointSchema\n)\nYou use the same sessions and questions,\nbut MLXHeadDecisionModel reads each decision from Clef's trained decision head\ninstead of from next-token probabilities.\nThe 4-bit model is a 6.2 GB download,\nand its model card recommends a Mac with at least 16 GB of memory.\nClef can read images and video,\nbut this backend accepts only text and JSON states.\nRaw probabilities from language models are often overconfident.\nThe local backends accept a Calibration,\nwhich applies a temperature to every answer and a bias to yes-or-no answers.\nUse separate datasets to fit the calibration and evaluate the results.\nLanguage models can also favor an option because of its position in a list.\nOn the MLX, Core AI, and llama.cpp next-token backends,\nturn on rotationDebiasing to ask a choice question\nonce for each rotation of the options and average the probabilities.\nThat costs one prompt evaluation per rotation.\nEach local choice and score also includes a confidence value based on the entropy of its probabilities. It measures how concentrated the probabilities are, not whether the answer is right, so check the error rate on your own data before you pick a threshold. The next-token backends' diagnostics report how much probability the model assigned to the allowed answers. A low value means it assigned most of the probability elsewhere.\nAnyDecisionModel has six backends:\n- MLX runs a small language model on Apple silicon with mlx-swift-lm and downloads it from the Hub.\n- MLX decision heads run a model with its own trained decision head, such as Clef.\n- Core AI does the same as MLX with a Core AI model on macOS 27 and iOS 27.\n- llama.cpp reads decisions from a local GGUF model through llama.swift.\n- Jev calls TypeSafe's Jev through the System One API, or any server that implements it, such as Kev.\n- Ollama calls a System One decision model on a local Ollama server or in Ollama's cloud. It requires Ollama 0.35.0 or later, or 0.40.5 or later for cloud models.\nThe next-token backends label answers \"yes\" and \"no\", A to Z, or 0 to 9, so a choice can have at most 26 options, and a score at most 10 levels. Decision heads have no such limit.\nLike AnyLanguageModel, the package uses Swift package traits.\nWithout traits, it has no third-party dependencies.\nYou get the core types and the Jev and Ollama backends,\nwhich also build on Linux.\nEnable the MLX, CoreAI, or Llama trait for the local backends.\nBoth packages require Swift 6.2 or later and macOS 26 or iOS 26 or later. The Parakeet and Sortformer runtimes and the MLX backend require Apple silicon. AnyDecisionModel's MLX build tasks use Xcode's Swift 6.4 or later and the Metal toolchain; Core AI requires Xcode 27 and an OS 27 runtime.\nAdd the packages to your Package.swift:\ndependencies: [\n    .package(url: \"https://github.com/mattt/AnySpeechRecognizer\", from: \"0.1.0\"),\n    .package(\n        url: \"https://github.com/mattt/AnyDecisionModel\",\n        from: \"0.6.0\",\n        traits: [\"MLX\"]\n    ),\n]\nFor now, AnyDecisionModel's CoreAI trait can't be combined with AnySpeechRecognizer,\nbecause coreai-kit 0.7.3 requires swift-huggingface below 1.0\nand AnySpeechRecognizer requires 1.x.\nEach README has more examples and details about requirements and backends.\nAnySpeechRecognizer also includes a command-line tool, hear,\nthat transcribes local files, labels their speakers, and evaluates the results.\nEvery hear command requires --backend apple, --backend parakeet, or --backend qwen;\nrun hear prepare with the same backend and model options before analysis\nto install the needed assets.\nTry them in your apps and tell us what works and what doesn't. Issues and pull requests are welcome on both repositories.\n- AnySpeechRecognizer on GitHub\n- AnyDecisionModel on GitHub\n- AnyDecisionModel-Examples on GitHub\n- AnyLanguageModel on GitHub\n- swift-huggingface on GitHub\nThanks to NVIDIA for Parakeet, Sortformer, and NeMo, to Moondream for Parakeet Ultra, to FluidInference, whose FluidAudio and mobius projects documented the conventions that the Parakeet runtime and the Core ML conversions follow, to Cloudflare for Clef, and to everyone who contributed to AnyLanguageModel, whose patterns both packages borrow.","image_url":"https://huggingface.co/blog/assets/anydecisionmodel/banner.png","lang":"","published_at":"2026-10-29T00:00:00+00:00","fetched_at":"2026-12-01T15:57:16+00:00","status":"read","starred":0,"extract_state":"ok","summary_auto":"Introducing AnySpeechRecognizer and AnyDecisionModel: Open Models for Speech and Decisions on Apple Platforms\nLanguage models can do a lot. But they're only a small part of what machine learning can do.","cluster_id":null,"extract_retries":0,"extract_error":null,"item_type":"news","ref_id":null,"refs_json":null,"doi":null,"arxiv_id":null,"paper_version":null,"sources_json":null,"relevance_score":null,"relevance_method":null,"cited_by":null,"contract_version":"news_item.v1","format_contract_version":"news_item_formats.v1","dedup_url":"https://huggingface.co/blog/anydecisionmodel","quality_profile":{"profile_version":"extraction_quality.v2","bucket":"high","confidence":0.9,"failure_kind":"none","retryable":false,"retry_after_attempts":0,"reason":"High confidence: full text extraction produced 16464 characters.","operator_guidance":{"severity":"ok","recommended_action":"trust_full_text","next_step":"Use the extracted full text as the primary article source.","operator_label":"Ready","can_retry":false,"can_use_summary":false,"diagnostics_required":false},"content_depth":{"contract_version":"content_depth.v1","category":"full_text","label":"Full text","has_full_text":true,"has_summary":true,"content_length":16464,"summary_length":202,"usable_text_length":16464,"source_field":"content"},"legacy_collapsed":false,"signals":{"extract_state":"ok","extract_error":null,"extract_retries":0,"content_length":16464,"summary_length":202}},"news_item":{"id":177294,"canonical_url":"https://huggingface.co/blog/anydecisionmodel","source_url":"https://huggingface.co/blog/anydecisionmodel","title":"Introducing AnySpeechRecognizer and AnyDecisionModel: Open Models for Speech and Decisions on Apple Platforms","source_name":null,"author":null,"published_at":"2026-10-29T00:00:00+00:00","locale":null,"topic":"ai","tags":[],"rss_summary":null,"full_text":"Introducing AnySpeechRecognizer and AnyDecisionModel: Open Models for Speech and Decisions on Apple Platforms\nLanguage models can do a lot. They write, summarize, translate, and call tools. But they're only a small part of what machine learning can do.\nSay a customer calls your support line. First, you want to know what they said (speech recognition). Then, you want to decide where to send them (decision). You could hand both to a language model, but there are models built for each that are better, faster, and less expensive.\nIn our AnyLanguageModel 1.0 recap, we looked at a year of local and hosted models in Swift. With AnyLanguageModel and swift-huggingface now on their 1.x releases, we're extending the same approach to speech and decisions: familiar Swift APIs with a choice of model.\nToday we're announcing two packages:\n- AnySpeechRecognizer implements Apple's new speech-to-text API with a choice of recognition engine, including NVIDIA's Parakeet and Alibaba's Qwen3-ASR running locally on Core ML, and adds speaker diarization to track who speaks when.\n- AnyDecisionModel answers yes-or-no, multiple-choice, and rating-scale questions with typed results and probabilities. It derives each answer from the model's probabilities instead of generating text, using a model on your device with MLX, Core AI, or llama.cpp, or a decision model from Jev or Ollama.\nBoth packages can download open models from the Hugging Face Hub and run them on device.\nComputers have been transcribing speech for decades,\nand in the past few years, they've gotten very good at it.\nApple platforms already have an API for it.\nmacOS 26 and iOS 26 introduced SpeechAnalyzer,\nApple's new speech-to-text API.\nYou add modules such as SpeechTranscriber and SpeechDetector to an analyzer,\ngive it a file or a stream of audio buffers,\nand read results from async sequences as they arrive.\nAssetInventory installs the models,\nso your app decides when downloads happen.\nIt's a well-designed API, but the only engine behind it is Apple's. AnySpeechRecognizer keeps the API and lets you choose the engine:\n- import Speech\n+ import AnySpeechRecognizer\nThe package mirrors SpeechAnalyzer, SpeechTranscriber, DictationTranscriber,\nSpeechDetector, and AssetInventory,\nwith Apple's Speech framework as the default engine.\nIf your code uses that shared API, changing the import is enough.\nTo use Parakeet instead,\nchange only how you create the transcriber:\nlet transcriber = SpeechTranscriber(\n    model: ParakeetSpeechModel(variant: .v3),\n    transcriptionOptions: [],\n    reportingOptions: [.volatileResults],\n    attributeOptions: [.audioTimeRange]\n)\nThe steps for installing assets, running the analyzer, and reading results stay the same. The README has a complete example and lists the differences from Apple's framework.\nParakeet v3 is NVIDIA's Parakeet TDT 0.6B v3. It's a polyglot: it recognizes 25 European languages and works out which one it's hearing, so you don't pass a locale.\nParakeet Ultra is Moondream's post-trained take on v3. It was more accurate in most of our measurements.\nParakeet Unified is NVIDIA's English-only Parakeet.\nAll three Parakeets run on the package's own Core ML runtime, which supports file and live input, volatile results, word timing, and word confidence.\nQwen3-ASR is Alibaba's speech model, in 0.6B and 1.7B sizes. It recognizes 30 languages and 22 Chinese dialects, including Mandarin, Cantonese, Japanese, and Korean, which Parakeet doesn't cover. It detects the language automatically, or you can set one:\nlet transcriber = SpeechTranscriber(\n    model: QwenSpeechModel(variant: .large, language: Locale.Language(identifier: \"yue\")),\n    transcriptionOptions: [],\n    reportingOptions: [],\n    attributeOptions: []\n)\nQwen3-ASR gives one final result for each segment of up to 40 seconds, without volatile results, word timing, or confidence. It runs on the GPU and is slower than Parakeet, so it's better suited to transcribing files than live input.\nTo add another engine, implement SpeechRecognitionModel for its configuration\nand SpeechRecognitionExecutor for one module's session.\nThe README includes a small provider\nthat reports placeholder text to help you get started.\nTo run these models in apps, we converted them to Core ML and published them on the Hub:\n| Model | Core ML conversion | Original checkpoint | License | \n|---|---|---|---|\n| Parakeet TDT 0.6B v3 | mattt/parakeet-tdt-0.6b-v3-coreml | nvidia/parakeet-tdt-0.6b-v3 | CC BY 4.0 | \n| Parakeet Ultra | mattt/parakeet-ultra-coreml | moondream/parakeet-ultra | CC BY 4.0 | \n| Parakeet Unified EN 0.6B | mattt/parakeet-unified-en-0.6b-coreml | nvidia/parakeet-unified-en-0.6b | NVIDIA Open Model License | \n| Qwen3-ASR 0.6B | mattt/qwen3-asr-0.6b-coreml | Qwen/Qwen3-ASR-0.6B-hf | Apache 2.0 | \n| Qwen3-ASR 1.7B | mattt/qwen3-asr-1.7b-coreml | Qwen/Qwen3-ASR-1.7B-hf | Apache 2.0 | \n| Streaming Sortformer 4spk v2 | mattt/diar-streaming-sortformer-4spk-v2-coreml | nvidia/diar_streaming_sortformer_4spk-v2 | CC BY 4.0 | \n| Streaming Sortformer 4spk v2.1 | mattt/diar-streaming-sortformer-4spk-v2.1-coreml | nvidia/diar_streaming_sortformer_4spk-v2.1 | NVIDIA Open Model License | \nEach repository records its source checkpoint and a checksum for every file, and the package pins it to a fixed revision. The Parakeet repositories add an 8-second encoder for live input, which cuts live analysis time by about a third at the cost of a somewhat higher word error rate. The repository also has the conversion workflows, most of which follow FluidInference's mobius scripts, and checks each conversion against the original model.\nDownloads happen only when your app asks for them: about 600 MB for each Parakeet, plus about 590 MB for the live encoder, 0.9 to 2.4 GB for Qwen3-ASR, and about 250 MB for Sortformer. Files go in the standard Hugging Face cache, so a Mac app outside the sandbox shares them with Python and other Hugging Face tools.\nWhen you transcribe a conversation,\nyou often want to know who said what.\nThat's speaker diarization,\nand Apple's Speech framework doesn't have a module for it,\nso AnySpeechRecognizer adds one.\nSpeakerDiarizer runs NVIDIA's\nStreaming Sortformer\non Core ML alongside an Apple or Parakeet transcriber,\non the same timeline:\nlet diarizer = SpeakerDiarizer(model: SortformerDiarizationModel())\nif let request = try await AssetInventory.assetInstallationRequest(\n    supporting: [transcriber, diarizer]\n) {\n    try await request.downloadAndInstall()\n}\nlet analyzer = SpeechAnalyzer(modules: [transcriber, diarizer])\nThe diarizer tracks up to four speakers,\neven when they talk over each other.\nA SpeakerTimeline collects its results\nand attributes each timed word to a speaker,\nso you can print a transcript by speaker turn.\nLike image support in AnyLanguageModel,\nthis goes beyond what Apple's API offers today.\nThe diarizer uses Sortformer v2 by default. You can also choose v2.1, which NVIDIA trained with more meeting data and which was more accurate on meetings in our measurements, too.\nWe measured the package with its hear command-line tool\non an M4 Max Mac Studio with macOS 27.0.1.\nHere are the word error rates on LibriSpeech files of 3 to 8 minutes:\n| Transcriber | test-clean | test-other | \n|---|---|---|\n| Parakeet v3, file | 1.55% | 2.78% | \n| Parakeet v3, live | 4.73% | 4.29% | \n| Parakeet Ultra, file | 1.66% | 2.55% | \n| Parakeet Ultra, live | 2.65% | 3.28% | \n| Parakeet Unified, file | 1.43% | 2.19% | \n| Parakeet Unified, live | 1.45% | 2.42% | \n| Apple's transcriber, file | 2.12% | 3.97% | \nParakeet transcribes an hour of audio in about 20 to 40 seconds from a file, or about 1.5 to 2.5 minutes live, with about 100 MB of memory once Core ML has compiled the model. Qwen3-ASR is much slower and needs a few gigabytes of memory. Meetings are hard for everyone: on AMI recordings, where people talk over each other, every engine we tested had a word error rate above 23%.\nThese numbers come from one machine and a few datasets,\nso measure with your own hardware and audio.\nhear evaluate works on your own files,\nand the repository's natural-speech-eval.py tool\nreproduces these measurements.\nSo far, we've tested only on macOS 27, not on an iPhone.\nNext, we'd like to add more engines, including Core AI on macOS 27 and iOS 27.\nAnyDecisionModel is a different story. There's no Apple framework to map onto, and decision models aren't new, exactly.\nIt's only a decision model if it comes from the Décision region of France; otherwise, it's sparkling zero-shot classification.\nWhat's new is the name, a lot of hype, and a crop of models trained to make decisions. We think that's where things are going, so we wanted a Swift API that's ready for them.\nApps often ask language models to make decisions. Is this message urgent? Which team should handle this ticket? How frustrated is this customer? The usual approach is to prompt a language model and parse the text that it generates. That gives you one answer, but doesn't show the probabilities it assigned to the alternatives.\nHere's what a decision looks like in Swift:\nimport AnyDecisionModel\nenum Department: String, Choosable {\n    case billing, technical, sales\n}\nlet ticket = \"I was charged twice for my order, and now the app logs me out when I try to ask for a refund.\"\nlet model = MLXDecisionModel(modelID: \"mlx-community/Qwen3-4B-Instruct-2507-4bit\")\nlet session = DecisionSession(model: model, state: .text(ticket))\nlet urgent = try await session.probability(of: \"Does this convey urgency?\")\nlet team = try await session.choice(\"Which team?\", from: Department.self)\nlet anger = try await session.score(\n    \"How frustrated?\",\n    levels: [\"Calm\", \"Frustrated\", \"Very angry\"]\n)\nurgent is a Double.\nteam is a Choice<Department> containing the selected case,\na probability for each option, and a confidence value.\nanger is a Score containing the expected level,\na probability for each level, and a confidence value.\nBecause Department conforms to Choosable,\nteam.value is a Department that you can use in an exhaustive switch.\nIf you've used Foundation Models or AnyLanguageModel,\nthe model-and-session pattern will look familiar.\nA DecisionSession holds a single state, which can be text or JSON,\nand every question is about that state.\nQuestions are independent:\nan answer never becomes input to a later question.\nTo ask several questions at once,\npass them to decide(_:) as a batch.\nFor each question, the MLX backend builds a prompt with a one-token label for each allowed answer, then reads the probability of each label from one forward pass.\nEmoji Magnet is a macOS app with a text field above a pile of 343 emoji. Type a phrase, such as \"things you wear\", and the emoji that match rise out of the pile. Refine it to \"things you wear in winter\", and the emoji that no longer match fall back.\nThe app has no built-in keyword rules; the model decides everything at inference time. When you pause typing, it asks the model one yes-or-no question for each emoji, for example:\nStatement: a heavy winter coat fits the description \"things you wear\". Is this statement true?\nThe session's state holds the phrase.\nThe demo above uses the hosted Jev backend,\nwhich answers all 343 questions in one request,\nso the emoji settle in about half a second for each phrase.\nWithout a TYPESAFE_AI_API_KEY, the app runs Qwen3 4B on your Mac with the MLX backend.\nThat backend uses prefix caching to evaluate the state once,\nthen answers 16 questions per forward pass.\nOn an M4 Max, a group of 16 takes about 0.45 seconds after the model loads.\nA full pass over all 343 emoji takes about 10 seconds,\nand each group's results appear as soon as they arrive.\nEmoji Magnet is in the AnyDecisionModel-Examples repository.\nReading next-token probabilities works with general-purpose language models, but those models weren't trained to make decisions. Cloudflare's Clef models are an example of a newer approach: a model with a trained decision head that turns a state and a schema of typed questions into decisions, returning probabilities for all allowed options across the questions in one forward pass. Clef-Flash is the 9B variant.\nAnyDecisionModel runs Clef-Flash on a Mac with MLX:\nlet model = MLXHeadDecisionModel(\n    modelID: \"mlx-community/clef-flash-4bit\",\n    head: .jointSchema\n)\nYou use the same sessions and questions,\nbut MLXHeadDecisionModel reads each decision from Clef's trained decision head\ninstead of from next-token probabilities.\nThe 4-bit model is a 6.2 GB download,\nand its model card recommends a Mac with at least 16 GB of memory.\nClef can read images and video,\nbut this backend accepts only text and JSON states.\nRaw probabilities from language models are often overconfident.\nThe local backends accept a Calibration,\nwhich applies a temperature to every answer and a bias to yes-or-no answers.\nUse separate datasets to fit the calibration and evaluate the results.\nLanguage models can also favor an option because of its position in a list.\nOn the MLX, Core AI, and llama.cpp next-token backends,\nturn on rotationDebiasing to ask a choice question\nonce for each rotation of the options and average the probabilities.\nThat costs one prompt evaluation per rotation.\nEach local choice and score also includes a confidence value based on the entropy of its probabilities. It measures how concentrated the probabilities are, not whether the answer is right, so check the error rate on your own data before you pick a threshold. The next-token backends' diagnostics report how much probability the model assigned to the allowed answers. A low value means it assigned most of the probability elsewhere.\nAnyDecisionModel has six backends:\n- MLX runs a small language model on Apple silicon with mlx-swift-lm and downloads it from the Hub.\n- MLX decision heads run a model with its own trained decision head, such as Clef.\n- Core AI does the same as MLX with a Core AI model on macOS 27 and iOS 27.\n- llama.cpp reads decisions from a local GGUF model through llama.swift.\n- Jev calls TypeSafe's Jev through the System One API, or any server that implements it, such as Kev.\n- Ollama calls a System One decision model on a local Ollama server or in Ollama's cloud. It requires Ollama 0.35.0 or later, or 0.40.5 or later for cloud models.\nThe next-token backends label answers \"yes\" and \"no\", A to Z, or 0 to 9, so a choice can have at most 26 options, and a score at most 10 levels. Decision heads have no such limit.\nLike AnyLanguageModel, the package uses Swift package traits.\nWithout traits, it has no third-party dependencies.\nYou get the core types and the Jev and Ollama backends,\nwhich also build on Linux.\nEnable the MLX, CoreAI, or Llama trait for the local backends.\nBoth packages require Swift 6.2 or later and macOS 26 or iOS 26 or later. The Parakeet and Sortformer runtimes and the MLX backend require Apple silicon. AnyDecisionModel's MLX build tasks use Xcode's Swift 6.4 or later and the Metal toolchain; Core AI requires Xcode 27 and an OS 27 runtime.\nAdd the packages to your Package.swift:\ndependencies: [\n    .package(url: \"https://github.com/mattt/AnySpeechRecognizer\", from: \"0.1.0\"),\n    .package(\n        url: \"https://github.com/mattt/AnyDecisionModel\",\n        from: \"0.6.0\",\n        traits: [\"MLX\"]\n    ),\n]\nFor now, AnyDecisionModel's CoreAI trait can't be combined with AnySpeechRecognizer,\nbecause coreai-kit 0.7.3 requires swift-huggingface below 1.0\nand AnySpeechRecognizer requires 1.x.\nEach README has more examples and details about requirements and backends.\nAnySpeechRecognizer also includes a command-line tool, hear,\nthat transcribes local files, labels their speakers, and evaluates the results.\nEvery hear command requires --backend apple, --backend parakeet, or --backend qwen;\nrun hear prepare with the same backend and model options before analysis\nto install the needed assets.\nTry them in your apps and tell us what works and what doesn't. Issues and pull requests are welcome on both repositories.\n- AnySpeechRecognizer on GitHub\n- AnyDecisionModel on GitHub\n- AnyDecisionModel-Examples on GitHub\n- AnyLanguageModel on GitHub\n- swift-huggingface on GitHub\nThanks to NVIDIA for Parakeet, Sortformer, and NeMo, to Moondream for Parakeet Ultra, to FluidInference, whose FluidAudio and mobius projects documented the conventions that the Parakeet runtime and the Core ML conversions follow, to Cloudflare for Clef, and to everyone who contributed to AnyLanguageModel, whose patterns both packages borrow.","excerpt":"Introducing AnySpeechRecognizer and AnyDecisionModel: Open Models for Speech and Decisions on Apple Platforms\nLanguage models can do a lot. But they're only a small part of what machine learning can do.","extraction":{"state":"ok","confidence":0.9,"error":null,"explanation":"High confidence: full text extraction produced 16464 characters.","diagnostics_url":"/api/diagnose?url=https%3A//huggingface.co/blog/anydecisionmodel","quality_profile":{"profile_version":"extraction_quality.v2","bucket":"high","confidence":0.9,"failure_kind":"none","retryable":false,"retry_after_attempts":0,"reason":"High confidence: full text extraction produced 16464 characters.","operator_guidance":{"severity":"ok","recommended_action":"trust_full_text","next_step":"Use the extracted full text as the primary article source.","operator_label":"Ready","can_retry":false,"can_use_summary":false,"diagnostics_required":false},"content_depth":{"contract_version":"content_depth.v1","category":"full_text","label":"Full text","has_full_text":true,"has_summary":true,"content_length":16464,"summary_length":202,"usable_text_length":16464,"source_field":"content"},"legacy_collapsed":false,"signals":{"extract_state":"ok","extract_error":null,"extract_retries":0,"content_length":16464,"summary_length":202}}},"display_formats":["compact","card","full","digest_section","json"]},"daily_stack_record":{"title":"Introducing AnySpeechRecognizer and AnyDecisionModel: Open Models for Speech and Decisions on Apple Platforms","url":"https://huggingface.co/blog/anydecisionmodel","summary":"Introducing AnySpeechRecognizer and AnyDecisionModel: Open Models for Speech and Decisions on Apple Platforms\nLanguage models can do a lot. But they're only a small part of what machine learning can do.","source":"","date":"2026-10-29T00:00:00+00:00","content":"Introducing AnySpeechRecognizer and AnyDecisionModel: Open Models for Speech and Decisions on Apple Platforms\nLanguage models can do a lot. They write, summarize, translate, and call tools. But they're only a small part of what machine learning can do.\nSay a customer calls your support line. First, you want to know what they said (speech recognition). Then, you want to decide where to send them (decision). You could hand both to a language model, but there are models built for each that are better, faster, and less expensive.\nIn our AnyLanguageModel 1.0 recap, we looked at a year of local and hosted models in Swift. With AnyLanguageModel and swift-huggingface now on their 1.x releases, we're extending the same approach to speech and decisions: familiar Swift APIs with a choice of model.\nToday we're announcing two packages:\n- AnySpeechRecognizer implements Apple's new speech-to-text API with a choice of recognition engine, including NVIDIA's Parakeet and Alibaba's Qwen3-ASR running locally on Core ML, and adds speaker diarization to track who speaks when.\n- AnyDecisionModel answers yes-or-no, multiple-choice, and rating-scale questions with typed results and probabilities. It derives each answer from the model's probabilities instead of generating text, using a model on your device with MLX, Core AI, or llama.cpp, or a decision model from Jev or Ollama.\nBoth packages can download open models from the Hugging Face Hub and run them on device.\nComputers have been transcribing speech for decades,\nand in the past few years, they've gotten very good at it.\nApple platforms already have an API for it.\nmacOS 26 and iOS 26 introduced SpeechAnalyzer,\nApple's new speech-to-text API.\nYou add modules such as SpeechTranscriber and SpeechDetector to an analyzer,\ngive it a file or a stream of audio buffers,\nand read results from async sequences as they arrive.\nAssetInventory installs the models,\nso your app decides when downloads happen.\nIt's a well-designed API, but the only engine behind it is Apple's. AnySpeechRecognizer keeps the API and lets you choose the engine:\n- import Speech\n+ import AnySpeechRecognizer\nThe package mirrors SpeechAnalyzer, SpeechTranscriber, DictationTranscriber,\nSpeechDetector, and AssetInventory,\nwith Apple's Speech framework as the default engine.\nIf your code uses that shared API, changing the import is enough.\nTo use Parakeet instead,\nchange only how you create the transcriber:\nlet transcriber = SpeechTranscriber(\n    model: ParakeetSpeechModel(variant: .v3),\n    transcriptionOptions: [],\n    reportingOptions: [.volatileResults],\n    attributeOptions: [.audioTimeRange]\n)\nThe steps for installing assets, running the analyzer, and reading results stay the same. The README has a complete example and lists the differences from Apple's framework.\nParakeet v3 is NVIDIA's Parakeet TDT 0.6B v3. It's a polyglot: it recognizes 25 European languages and works out which one it's hearing, so you don't pass a locale.\nParakeet Ultra is Moondream's post-trained take on v3. It was more accurate in most of our measurements.\nParakeet Unified is NVIDIA's English-only Parakeet.\nAll three Parakeets run on the package's own Core ML runtime, which supports file and live input, volatile results, word timing, and word confidence.\nQwen3-ASR is Alibaba's speech model, in 0.6B and 1.7B sizes. It recognizes 30 languages and 22 Chinese dialects, including Mandarin, Cantonese, Japanese, and Korean, which Parakeet doesn't cover. It detects the language automatically, or you can set one:\nlet transcriber = SpeechTranscriber(\n    model: QwenSpeechModel(variant: .large, language: Locale.Language(identifier: \"yue\")),\n    transcriptionOptions: [],\n    reportingOptions: [],\n    attributeOptions: []\n)\nQwen3-ASR gives one final result for each segment of up to 40 seconds, without volatile results, word timing, or confidence. It runs on the GPU and is slower than Parakeet, so it's better suited to transcribing files than live input.\nTo add another engine, implement SpeechRecognitionModel for its configuration\nand SpeechRecognitionExecutor for one module's session.\nThe README includes a small provider\nthat reports placeholder text to help you get started.\nTo run these models in apps, we converted them to Core ML and published them on the Hub:\n| Model | Core ML conversion | Original checkpoint | License | \n|---|---|---|---|\n| Parakeet TDT 0.6B v3 | mattt/parakeet-tdt-0.6b-v3-coreml | nvidia/parakeet-tdt-0.6b-v3 | CC BY 4.0 | \n| Parakeet Ultra | mattt/parakeet-ultra-coreml | moondream/parakeet-ultra | CC BY 4.0 | \n| Parakeet Unified EN 0.6B | mattt/parakeet-unified-en-0.6b-coreml | nvidia/parakeet-unified-en-0.6b | NVIDIA Open Model License | \n| Qwen3-ASR 0.6B | mattt/qwen3-asr-0.6b-coreml | Qwen/Qwen3-ASR-0.6B-hf | Apache 2.0 | \n| Qwen3-ASR 1.7B | mattt/qwen3-asr-1.7b-coreml | Qwen/Qwen3-ASR-1.7B-hf | Apache 2.0 | \n| Streaming Sortformer 4spk v2 | mattt/diar-streaming-sortformer-4spk-v2-coreml | nvidia/diar_streaming_sortformer_4spk-v2 | CC BY 4.0 | \n| Streaming Sortformer 4spk v2.1 | mattt/diar-streaming-sortformer-4spk-v2.1-coreml | nvidia/diar_streaming_sortformer_4spk-v2.1 | NVIDIA Open Model License | \nEach repository records its source checkpoint and a checksum for every file, and the package pins it to a fixed revision. The Parakeet repositories add an 8-second encoder for live input, which cuts live analysis time by about a third at the cost of a somewhat higher word error rate. The repository also has the conversion workflows, most of which follow FluidInference's mobius scripts, and checks each conversion against the original model.\nDownloads happen only when your app asks for them: about 600 MB for each Parakeet, plus about 590 MB for the live encoder, 0.9 to 2.4 GB for Qwen3-ASR, and about 250 MB for Sortformer. Files go in the standard Hugging Face cache, so a Mac app outside the sandbox shares them with Python and other Hugging Face tools.\nWhen you transcribe a conversation,\nyou often want to know who said what.\nThat's speaker diarization,\nand Apple's Speech framework doesn't have a module for it,\nso AnySpeechRecognizer adds one.\nSpeakerDiarizer runs NVIDIA's\nStreaming Sortformer\non Core ML alongside an Apple or Parakeet transcriber,\non the same timeline:\nlet diarizer = SpeakerDiarizer(model: SortformerDiarizationModel())\nif let request = try await AssetInventory.assetInstallationRequest(\n    supporting: [transcriber, diarizer]\n) {\n    try await request.downloadAndInstall()\n}\nlet analyzer = SpeechAnalyzer(modules: [transcriber, diarizer])\nThe diarizer tracks up to four speakers,\neven when they talk over each other.\nA SpeakerTimeline collects its results\nand attributes each timed word to a speaker,\nso you can print a transcript by speaker turn.\nLike image support in AnyLanguageModel,\nthis goes beyond what Apple's API offers today.\nThe diarizer uses Sortformer v2 by default. You can also choose v2.1, which NVIDIA trained with more meeting data and which was more accurate on meetings in our measurements, too.\nWe measured the package with its hear command-line tool\non an M4 Max Mac Studio with macOS 27.0.1.\nHere are the word error rates on LibriSpeech files of 3 to 8 minutes:\n| Transcriber | test-clean | test-other | \n|---|---|---|\n| Parakeet v3, file | 1.55% | 2.78% | \n| Parakeet v3, live | 4.73% | 4.29% | \n| Parakeet Ultra, file | 1.66% | 2.55% | \n| Parakeet Ultra, live | 2.65% | 3.28% | \n| Parakeet Unified, file | 1.43% | 2.19% | \n| Parakeet Unified, live | 1.45% | 2.42% | \n| Apple's transcriber, file | 2.12% | 3.97% | \nParakeet transcribes an hour of audio in about 20 to 40 seconds from a file, or about 1.5 to 2.5 minutes live, with about 100 MB of memory once Core ML has compiled the model. Qwen3-ASR is much slower and needs a few gigabytes of memory. Meetings are hard for everyone: on AMI recordings, where people talk over each other, every engine we tested had a word error rate above 23%.\nThese numbers come from one machine and a few datasets,\nso measure with your own hardware and audio.\nhear evaluate works on your own files,\nand the repository's natural-speech-eval.py tool\nreproduces these measurements.\nSo far, we've tested only on macOS 27, not on an iPhone.\nNext, we'd like to add more engines, including Core AI on macOS 27 and iOS 27.\nAnyDecisionModel is a different story. There's no Apple framework to map onto, and decision models aren't new, exactly.\nIt's only a decision model if it comes from the Décision region of France; otherwise, it's sparkling zero-shot classification.\nWhat's new is the name, a lot of hype, and a crop of models trained to make decisions. We think that's where things are going, so we wanted a Swift API that's ready for them.\nApps often ask language models to make decisions. Is this message urgent? Which team should handle this ticket? How frustrated is this customer? The usual approach is to prompt a language model and parse the text that it generates. That gives you one answer, but doesn't show the probabilities it assigned to the alternatives.\nHere's what a decision looks like in Swift:\nimport AnyDecisionModel\nenum Department: String, Choosable {\n    case billing, technical, sales\n}\nlet ticket = \"I was charged twice for my order, and now the app logs me out when I try to ask for a refund.\"\nlet model = MLXDecisionModel(modelID: \"mlx-community/Qwen3-4B-Instruct-2507-4bit\")\nlet session = DecisionSession(model: model, state: .text(ticket))\nlet urgent = try await session.probability(of: \"Does this convey urgency?\")\nlet team = try await session.choice(\"Which team?\", from: Department.self)\nlet anger = try await session.score(\n    \"How frustrated?\",\n    levels: [\"Calm\", \"Frustrated\", \"Very angry\"]\n)\nurgent is a Double.\nteam is a Choice<Department> containing the selected case,\na probability for each option, and a confidence value.\nanger is a Score containing the expected level,\na probability for each level, and a confidence value.\nBecause Department conforms to Choosable,\nteam.value is a Department that you can use in an exhaustive switch.\nIf you've used Foundation Models or AnyLanguageModel,\nthe model-and-session pattern will look familiar.\nA DecisionSession holds a single state, which can be text or JSON,\nand every question is about that state.\nQuestions are independent:\nan answer never becomes input to a later question.\nTo ask several questions at once,\npass them to decide(_:) as a batch.\nFor each question, the MLX backend builds a prompt with a one-token label for each allowed answer, then reads the probability of each label from one forward pass.\nEmoji Magnet is a macOS app with a text field above a pile of 343 emoji. Type a phrase, such as \"things you wear\", and the emoji that match rise out of the pile. Refine it to \"things you wear in winter\", and the emoji that no longer match fall back.\nThe app has no built-in keyword rules; the model decides everything at inference time. When you pause typing, it asks the model one yes-or-no question for each emoji, for example:\nStatement: a heavy winter coat fits the description \"things you wear\". Is this statement true?\nThe session's state holds the phrase.\nThe demo above uses the hosted Jev backend,\nwhich answers all 343 questions in one request,\nso the emoji settle in about half a second for each phrase.\nWithout a TYPESAFE_AI_API_KEY, the app runs Qwen3 4B on your Mac with the MLX backend.\nThat backend uses prefix caching to evaluate the state once,\nthen answers 16 questions per forward pass.\nOn an M4 Max, a group of 16 takes about 0.45 seconds after the model loads.\nA full pass over all 343 emoji takes about 10 seconds,\nand each group's results appear as soon as they arrive.\nEmoji Magnet is in the AnyDecisionModel-Examples repository.\nReading next-token probabilities works with general-purpose language models, but those models weren't trained to make decisions. Cloudflare's Clef models are an example of a newer approach: a model with a trained decision head that turns a state and a schema of typed questions into decisions, returning probabilities for all allowed options across the questions in one forward pass. Clef-Flash is the 9B variant.\nAnyDecisionModel runs Clef-Flash on a Mac with MLX:\nlet model = MLXHeadDecisionModel(\n    modelID: \"mlx-community/clef-flash-4bit\",\n    head: .jointSchema\n)\nYou use the same sessions and questions,\nbut MLXHeadDecisionModel reads each decision from Clef's trained decision head\ninstead of from next-token probabilities.\nThe 4-bit model is a 6.2 GB download,\nand its model card recommends a Mac with at least 16 GB of memory.\nClef can read images and video,\nbut this backend accepts only text and JSON states.\nRaw probabilities from language models are often overconfident.\nThe local backends accept a Calibration,\nwhich applies a temperature to every answer and a bias to yes-or-no answers.\nUse separate datasets to fit the calibration and evaluate the results.\nLanguage models can also favor an option because of its position in a list.\nOn the MLX, Core AI, and llama.cpp next-token backends,\nturn on rotationDebiasing to ask a choice question\nonce for each rotation of the options and average the probabilities.\nThat costs one prompt evaluation per rotation.\nEach local choice and score also includes a confidence value based on the entropy of its probabilities. It measures how concentrated the probabilities are, not whether the answer is right, so check the error rate on your own data before you pick a threshold. The next-token backends' diagnostics report how much probability the model assigned to the allowed answers. A low value means it assigned most of the probability elsewhere.\nAnyDecisionModel has six backends:\n- MLX runs a small language model on Apple silicon with mlx-swift-lm and downloads it from the Hub.\n- MLX decision heads run a model with its own trained decision head, such as Clef.\n- Core AI does the same as MLX with a Core AI model on macOS 27 and iOS 27.\n- llama.cpp reads decisions from a local GGUF model through llama.swift.\n- Jev calls TypeSafe's Jev through the System One API, or any server that implements it, such as Kev.\n- Ollama calls a System One decision model on a local Ollama server or in Ollama's cloud. It requires Ollama 0.35.0 or later, or 0.40.5 or later for cloud models.\nThe next-token backends label answers \"yes\" and \"no\", A to Z, or 0 to 9, so a choice can have at most 26 options, and a score at most 10 levels. Decision heads have no such limit.\nLike AnyLanguageModel, the package uses Swift package traits.\nWithout traits, it has no third-party dependencies.\nYou get the core types and the Jev and Ollama backends,\nwhich also build on Linux.\nEnable the MLX, CoreAI, or Llama trait for the local backends.\nBoth packages require Swift 6.2 or later and macOS 26 or iOS 26 or later. The Parakeet and Sortformer runtimes and the MLX backend require Apple silicon. AnyDecisionModel's MLX build tasks use Xcode's Swift 6.4 or later and the Metal toolchain; Core AI requires Xcode 27 and an OS 27 runtime.\nAdd the packages to your Package.swift:\ndependencies: [\n    .package(url: \"https://github.com/mattt/AnySpeechRecognizer\", from: \"0.1.0\"),\n    .package(\n        url: \"https://github.com/mattt/AnyDecisionModel\",\n        from: \"0.6.0\",\n        traits: [\"MLX\"]\n    ),\n]\nFor now, AnyDecisionModel's CoreAI trait can't be combined with AnySpeechRecognizer,\nbecause coreai-kit 0.7.3 requires swift-huggingface below 1.0\nand AnySpeechRecognizer requires 1.x.\nEach README has more examples and details about requirements and backends.\nAnySpeechRecognizer also includes a command-line tool, hear,\nthat transcribes local files, labels their speakers, and evaluates the results.\nEvery hear command requires --backend apple, --backend parakeet, or --backend qwen;\nrun hear prepare with the same backend and model options before analysis\nto install the needed assets.\nTry them in your apps and tell us what works and what doesn't. Issues and pull requests are welcome on both repositories.\n- AnySpeechRecognizer on GitHub\n- AnyDecisionModel on GitHub\n- AnyDecisionModel-Examples on GitHub\n- AnyLanguageModel on GitHub\n- swift-huggingface on GitHub\nThanks to NVIDIA for Parakeet, Sortformer, and NeMo, to Moondream for Parakeet Ultra, to FluidInference, whose FluidAudio and mobius projects documented the conventions that the Parakeet runtime and the Core ML conversions follow, to Cloudflare for Clef, and to everyone who contributed to AnyLanguageModel, whose patterns both packages borrow.","confidence":0.9,"diagnostics_url":"/api/diagnose?url=https%3A//huggingface.co/blog/anydecisionmodel","quality_bucket":"high","failure_kind":"none","retryable":false,"quality_reason":"High confidence: full text extraction produced 16464 characters.","quality_profile":{"profile_version":"extraction_quality.v2","bucket":"high","confidence":0.9,"failure_kind":"none","retryable":false,"retry_after_attempts":0,"reason":"High confidence: full text extraction produced 16464 characters.","operator_guidance":{"severity":"ok","recommended_action":"trust_full_text","next_step":"Use the extracted full text as the primary article source.","operator_label":"Ready","can_retry":false,"can_use_summary":false,"diagnostics_required":false},"content_depth":{"contract_version":"content_depth.v1","category":"full_text","label":"Full text","has_full_text":true,"has_summary":true,"content_length":16464,"summary_length":202,"usable_text_length":16464,"source_field":"content"},"legacy_collapsed":false,"signals":{"extract_state":"ok","extract_error":null,"extract_retries":0,"content_length":16464,"summary_length":202}},"tags":[]},"fallback_formats":["markdown","json","html"],"actions":{"read":"/item/177294","export_markdown":"/api/items/177294/export?format=markdown","export_json":"/api/items/177294/export?format=json","diagnose":"/api/diagnose?url=https%3A//huggingface.co/blog/anydecisionmodel"},"formats":{"full":{"id":177294,"title":"Introducing AnySpeechRecognizer and AnyDecisionModel: Open Models for Speech and Decisions on Apple Platforms","url":"https://huggingface.co/blog/anydecisionmodel","source":"","author":null,"published_at":"2026-10-29T00:00:00+00:00","locale":null,"topic":"ai","tags":[],"excerpt":"Introducing AnySpeechRecognizer and AnyDecisionModel: Open Models for Speech and Decisions on Apple Platforms\nLanguage models can do a lot. But they're only a small part of what machine learning can do.","full_text":"Introducing AnySpeechRecognizer and AnyDecisionModel: Open Models for Speech and Decisions on Apple Platforms\nLanguage models can do a lot. They write, summarize, translate, and call tools. But they're only a small part of what machine learning can do.\nSay a customer calls your support line. First, you want to know what they said (speech recognition). Then, you want to decide where to send them (decision). You could hand both to a language model, but there are models built for each that are better, faster, and less expensive.\nIn our AnyLanguageModel 1.0 recap, we looked at a year of local and hosted models in Swift. With AnyLanguageModel and swift-huggingface now on their 1.x releases, we're extending the same approach to speech and decisions: familiar Swift APIs with a choice of model.\nToday we're announcing two packages:\n- AnySpeechRecognizer implements Apple's new speech-to-text API with a choice of recognition engine, including NVIDIA's Parakeet and Alibaba's Qwen3-ASR running locally on Core ML, and adds speaker diarization to track who speaks when.\n- AnyDecisionModel answers yes-or-no, multiple-choice, and rating-scale questions with typed results and probabilities. It derives each answer from the model's probabilities instead of generating text, using a model on your device with MLX, Core AI, or llama.cpp, or a decision model from Jev or Ollama.\nBoth packages can download open models from the Hugging Face Hub and run them on device.\nComputers have been transcribing speech for decades,\nand in the past few years, they've gotten very good at it.\nApple platforms already have an API for it.\nmacOS 26 and iOS 26 introduced SpeechAnalyzer,\nApple's new speech-to-text API.\nYou add modules such as SpeechTranscriber and SpeechDetector to an analyzer,\ngive it a file or a stream of audio buffers,\nand read results from async sequences as they arrive.\nAssetInventory installs the models,\nso your app decides when downloads happen.\nIt's a well-designed API, but the only engine behind it is Apple's. AnySpeechRecognizer keeps the API and lets you choose the engine:\n- import Speech\n+ import AnySpeechRecognizer\nThe package mirrors SpeechAnalyzer, SpeechTranscriber, DictationTranscriber,\nSpeechDetector, and AssetInventory,\nwith Apple's Speech framework as the default engine.\nIf your code uses that shared API, changing the import is enough.\nTo use Parakeet instead,\nchange only how you create the transcriber:\nlet transcriber = SpeechTranscriber(\n    model: ParakeetSpeechModel(variant: .v3),\n    transcriptionOptions: [],\n    reportingOptions: [.volatileResults],\n    attributeOptions: [.audioTimeRange]\n)\nThe steps for installing assets, running the analyzer, and reading results stay the same. The README has a complete example and lists the differences from Apple's framework.\nParakeet v3 is NVIDIA's Parakeet TDT 0.6B v3. It's a polyglot: it recognizes 25 European languages and works out which one it's hearing, so you don't pass a locale.\nParakeet Ultra is Moondream's post-trained take on v3. It was more accurate in most of our measurements.\nParakeet Unified is NVIDIA's English-only Parakeet.\nAll three Parakeets run on the package's own Core ML runtime, which supports file and live input, volatile results, word timing, and word confidence.\nQwen3-ASR is Alibaba's speech model, in 0.6B and 1.7B sizes. It recognizes 30 languages and 22 Chinese dialects, including Mandarin, Cantonese, Japanese, and Korean, which Parakeet doesn't cover. It detects the language automatically, or you can set one:\nlet transcriber = SpeechTranscriber(\n    model: QwenSpeechModel(variant: .large, language: Locale.Language(identifier: \"yue\")),\n    transcriptionOptions: [],\n    reportingOptions: [],\n    attributeOptions: []\n)\nQwen3-ASR gives one final result for each segment of up to 40 seconds, without volatile results, word timing, or confidence. It runs on the GPU and is slower than Parakeet, so it's better suited to transcribing files than live input.\nTo add another engine, implement SpeechRecognitionModel for its configuration\nand SpeechRecognitionExecutor for one module's session.\nThe README includes a small provider\nthat reports placeholder text to help you get started.\nTo run these models in apps, we converted them to Core ML and published them on the Hub:\n| Model | Core ML conversion | Original checkpoint | License | \n|---|---|---|---|\n| Parakeet TDT 0.6B v3 | mattt/parakeet-tdt-0.6b-v3-coreml | nvidia/parakeet-tdt-0.6b-v3 | CC BY 4.0 | \n| Parakeet Ultra | mattt/parakeet-ultra-coreml | moondream/parakeet-ultra | CC BY 4.0 | \n| Parakeet Unified EN 0.6B | mattt/parakeet-unified-en-0.6b-coreml | nvidia/parakeet-unified-en-0.6b | NVIDIA Open Model License | \n| Qwen3-ASR 0.6B | mattt/qwen3-asr-0.6b-coreml | Qwen/Qwen3-ASR-0.6B-hf | Apache 2.0 | \n| Qwen3-ASR 1.7B | mattt/qwen3-asr-1.7b-coreml | Qwen/Qwen3-ASR-1.7B-hf | Apache 2.0 | \n| Streaming Sortformer 4spk v2 | mattt/diar-streaming-sortformer-4spk-v2-coreml | nvidia/diar_streaming_sortformer_4spk-v2 | CC BY 4.0 | \n| Streaming Sortformer 4spk v2.1 | mattt/diar-streaming-sortformer-4spk-v2.1-coreml | nvidia/diar_streaming_sortformer_4spk-v2.1 | NVIDIA Open Model License | \nEach repository records its source checkpoint and a checksum for every file, and the package pins it to a fixed revision. The Parakeet repositories add an 8-second encoder for live input, which cuts live analysis time by about a third at the cost of a somewhat higher word error rate. The repository also has the conversion workflows, most of which follow FluidInference's mobius scripts, and checks each conversion against the original model.\nDownloads happen only when your app asks for them: about 600 MB for each Parakeet, plus about 590 MB for the live encoder, 0.9 to 2.4 GB for Qwen3-ASR, and about 250 MB for Sortformer. Files go in the standard Hugging Face cache, so a Mac app outside the sandbox shares them with Python and other Hugging Face tools.\nWhen you transcribe a conversation,\nyou often want to know who said what.\nThat's speaker diarization,\nand Apple's Speech framework doesn't have a module for it,\nso AnySpeechRecognizer adds one.\nSpeakerDiarizer runs NVIDIA's\nStreaming Sortformer\non Core ML alongside an Apple or Parakeet transcriber,\non the same timeline:\nlet diarizer = SpeakerDiarizer(model: SortformerDiarizationModel())\nif let request = try await AssetInventory.assetInstallationRequest(\n    supporting: [transcriber, diarizer]\n) {\n    try await request.downloadAndInstall()\n}\nlet analyzer = SpeechAnalyzer(modules: [transcriber, diarizer])\nThe diarizer tracks up to four speakers,\neven when they talk over each other.\nA SpeakerTimeline collects its results\nand attributes each timed word to a speaker,\nso you can print a transcript by speaker turn.\nLike image support in AnyLanguageModel,\nthis goes beyond what Apple's API offers today.\nThe diarizer uses Sortformer v2 by default. You can also choose v2.1, which NVIDIA trained with more meeting data and which was more accurate on meetings in our measurements, too.\nWe measured the package with its hear command-line tool\non an M4 Max Mac Studio with macOS 27.0.1.\nHere are the word error rates on LibriSpeech files of 3 to 8 minutes:\n| Transcriber | test-clean | test-other | \n|---|---|---|\n| Parakeet v3, file | 1.55% | 2.78% | \n| Parakeet v3, live | 4.73% | 4.29% | \n| Parakeet Ultra, file | 1.66% | 2.55% | \n| Parakeet Ultra, live | 2.65% | 3.28% | \n| Parakeet Unified, file | 1.43% | 2.19% | \n| Parakeet Unified, live | 1.45% | 2.42% | \n| Apple's transcriber, file | 2.12% | 3.97% | \nParakeet transcribes an hour of audio in about 20 to 40 seconds from a file, or about 1.5 to 2.5 minutes live, with about 100 MB of memory once Core ML has compiled the model. Qwen3-ASR is much slower and needs a few gigabytes of memory. Meetings are hard for everyone: on AMI recordings, where people talk over each other, every engine we tested had a word error rate above 23%.\nThese numbers come from one machine and a few datasets,\nso measure with your own hardware and audio.\nhear evaluate works on your own files,\nand the repository's natural-speech-eval.py tool\nreproduces these measurements.\nSo far, we've tested only on macOS 27, not on an iPhone.\nNext, we'd like to add more engines, including Core AI on macOS 27 and iOS 27.\nAnyDecisionModel is a different story. There's no Apple framework to map onto, and decision models aren't new, exactly.\nIt's only a decision model if it comes from the Décision region of France; otherwise, it's sparkling zero-shot classification.\nWhat's new is the name, a lot of hype, and a crop of models trained to make decisions. We think that's where things are going, so we wanted a Swift API that's ready for them.\nApps often ask language models to make decisions. Is this message urgent? Which team should handle this ticket? How frustrated is this customer? The usual approach is to prompt a language model and parse the text that it generates. That gives you one answer, but doesn't show the probabilities it assigned to the alternatives.\nHere's what a decision looks like in Swift:\nimport AnyDecisionModel\nenum Department: String, Choosable {\n    case billing, technical, sales\n}\nlet ticket = \"I was charged twice for my order, and now the app logs me out when I try to ask for a refund.\"\nlet model = MLXDecisionModel(modelID: \"mlx-community/Qwen3-4B-Instruct-2507-4bit\")\nlet session = DecisionSession(model: model, state: .text(ticket))\nlet urgent = try await session.probability(of: \"Does this convey urgency?\")\nlet team = try await session.choice(\"Which team?\", from: Department.self)\nlet anger = try await session.score(\n    \"How frustrated?\",\n    levels: [\"Calm\", \"Frustrated\", \"Very angry\"]\n)\nurgent is a Double.\nteam is a Choice<Department> containing the selected case,\na probability for each option, and a confidence value.\nanger is a Score containing the expected level,\na probability for each level, and a confidence value.\nBecause Department conforms to Choosable,\nteam.value is a Department that you can use in an exhaustive switch.\nIf you've used Foundation Models or AnyLanguageModel,\nthe model-and-session pattern will look familiar.\nA DecisionSession holds a single state, which can be text or JSON,\nand every question is about that state.\nQuestions are independent:\nan answer never becomes input to a later question.\nTo ask several questions at once,\npass them to decide(_:) as a batch.\nFor each question, the MLX backend builds a prompt with a one-token label for each allowed answer, then reads the probability of each label from one forward pass.\nEmoji Magnet is a macOS app with a text field above a pile of 343 emoji. Type a phrase, such as \"things you wear\", and the emoji that match rise out of the pile. Refine it to \"things you wear in winter\", and the emoji that no longer match fall back.\nThe app has no built-in keyword rules; the model decides everything at inference time. When you pause typing, it asks the model one yes-or-no question for each emoji, for example:\nStatement: a heavy winter coat fits the description \"things you wear\". Is this statement true?\nThe session's state holds the phrase.\nThe demo above uses the hosted Jev backend,\nwhich answers all 343 questions in one request,\nso the emoji settle in about half a second for each phrase.\nWithout a TYPESAFE_AI_API_KEY, the app runs Qwen3 4B on your Mac with the MLX backend.\nThat backend uses prefix caching to evaluate the state once,\nthen answers 16 questions per forward pass.\nOn an M4 Max, a group of 16 takes about 0.45 seconds after the model loads.\nA full pass over all 343 emoji takes about 10 seconds,\nand each group's results appear as soon as they arrive.\nEmoji Magnet is in the AnyDecisionModel-Examples repository.\nReading next-token probabilities works with general-purpose language models, but those models weren't trained to make decisions. Cloudflare's Clef models are an example of a newer approach: a model with a trained decision head that turns a state and a schema of typed questions into decisions, returning probabilities for all allowed options across the questions in one forward pass. Clef-Flash is the 9B variant.\nAnyDecisionModel runs Clef-Flash on a Mac with MLX:\nlet model = MLXHeadDecisionModel(\n    modelID: \"mlx-community/clef-flash-4bit\",\n    head: .jointSchema\n)\nYou use the same sessions and questions,\nbut MLXHeadDecisionModel reads each decision from Clef's trained decision head\ninstead of from next-token probabilities.\nThe 4-bit model is a 6.2 GB download,\nand its model card recommends a Mac with at least 16 GB of memory.\nClef can read images and video,\nbut this backend accepts only text and JSON states.\nRaw probabilities from language models are often overconfident.\nThe local backends accept a Calibration,\nwhich applies a temperature to every answer and a bias to yes-or-no answers.\nUse separate datasets to fit the calibration and evaluate the results.\nLanguage models can also favor an option because of its position in a list.\nOn the MLX, Core AI, and llama.cpp next-token backends,\nturn on rotationDebiasing to ask a choice question\nonce for each rotation of the options and average the probabilities.\nThat costs one prompt evaluation per rotation.\nEach local choice and score also includes a confidence value based on the entropy of its probabilities. It measures how concentrated the probabilities are, not whether the answer is right, so check the error rate on your own data before you pick a threshold. The next-token backends' diagnostics report how much probability the model assigned to the allowed answers. A low value means it assigned most of the probability elsewhere.\nAnyDecisionModel has six backends:\n- MLX runs a small language model on Apple silicon with mlx-swift-lm and downloads it from the Hub.\n- MLX decision heads run a model with its own trained decision head, such as Clef.\n- Core AI does the same as MLX with a Core AI model on macOS 27 and iOS 27.\n- llama.cpp reads decisions from a local GGUF model through llama.swift.\n- Jev calls TypeSafe's Jev through the System One API, or any server that implements it, such as Kev.\n- Ollama calls a System One decision model on a local Ollama server or in Ollama's cloud. It requires Ollama 0.35.0 or later, or 0.40.5 or later for cloud models.\nThe next-token backends label answers \"yes\" and \"no\", A to Z, or 0 to 9, so a choice can have at most 26 options, and a score at most 10 levels. Decision heads have no such limit.\nLike AnyLanguageModel, the package uses Swift package traits.\nWithout traits, it has no third-party dependencies.\nYou get the core types and the Jev and Ollama backends,\nwhich also build on Linux.\nEnable the MLX, CoreAI, or Llama trait for the local backends.\nBoth packages require Swift 6.2 or later and macOS 26 or iOS 26 or later. The Parakeet and Sortformer runtimes and the MLX backend require Apple silicon. AnyDecisionModel's MLX build tasks use Xcode's Swift 6.4 or later and the Metal toolchain; Core AI requires Xcode 27 and an OS 27 runtime.\nAdd the packages to your Package.swift:\ndependencies: [\n    .package(url: \"https://github.com/mattt/AnySpeechRecognizer\", from: \"0.1.0\"),\n    .package(\n        url: \"https://github.com/mattt/AnyDecisionModel\",\n        from: \"0.6.0\",\n        traits: [\"MLX\"]\n    ),\n]\nFor now, AnyDecisionModel's CoreAI trait can't be combined with AnySpeechRecognizer,\nbecause coreai-kit 0.7.3 requires swift-huggingface below 1.0\nand AnySpeechRecognizer requires 1.x.\nEach README has more examples and details about requirements and backends.\nAnySpeechRecognizer also includes a command-line tool, hear,\nthat transcribes local files, labels their speakers, and evaluates the results.\nEvery hear command requires --backend apple, --backend parakeet, or --backend qwen;\nrun hear prepare with the same backend and model options before analysis\nto install the needed assets.\nTry them in your apps and tell us what works and what doesn't. Issues and pull requests are welcome on both repositories.\n- AnySpeechRecognizer on GitHub\n- AnyDecisionModel on GitHub\n- AnyDecisionModel-Examples on GitHub\n- AnyLanguageModel on GitHub\n- swift-huggingface on GitHub\nThanks to NVIDIA for Parakeet, Sortformer, and NeMo, to Moondream for Parakeet Ultra, to FluidInference, whose FluidAudio and mobius projects documented the conventions that the Parakeet runtime and the Core ML conversions follow, to Cloudflare for Clef, and to everyone who contributed to AnyLanguageModel, whose patterns both packages borrow.","reading_time_min":13,"extraction":{"state":"ok","confidence":0.9,"error":null,"explanation":"High confidence: full text extraction produced 16464 characters.","diagnostics_url":"/api/diagnose?url=https%3A//huggingface.co/blog/anydecisionmodel","quality_profile":{"profile_version":"extraction_quality.v2","bucket":"high","confidence":0.9,"failure_kind":"none","retryable":false,"retry_after_attempts":0,"reason":"High confidence: full text extraction produced 16464 characters.","operator_guidance":{"severity":"ok","recommended_action":"trust_full_text","next_step":"Use the extracted full text as the primary article source.","operator_label":"Ready","can_retry":false,"can_use_summary":false,"diagnostics_required":false},"content_depth":{"contract_version":"content_depth.v1","category":"full_text","label":"Full text","has_full_text":true,"has_summary":true,"content_length":16464,"summary_length":202,"usable_text_length":16464,"source_field":"content"},"legacy_collapsed":false,"signals":{"extract_state":"ok","extract_error":null,"extract_retries":0,"content_length":16464,"summary_length":202}}},"quality_profile":{"profile_version":"extraction_quality.v2","bucket":"high","confidence":0.9,"failure_kind":"none","retryable":false,"retry_after_attempts":0,"reason":"High confidence: full text extraction produced 16464 characters.","operator_guidance":{"severity":"ok","recommended_action":"trust_full_text","next_step":"Use the extracted full text as the primary article source.","operator_label":"Ready","can_retry":false,"can_use_summary":false,"diagnostics_required":false},"content_depth":{"contract_version":"content_depth.v1","category":"full_text","label":"Full text","has_full_text":true,"has_summary":true,"content_length":16464,"summary_length":202,"usable_text_length":16464,"source_field":"content"},"legacy_collapsed":false,"signals":{"extract_state":"ok","extract_error":null,"extract_retries":0,"content_length":16464,"summary_length":202}},"actions":{"read":"/item/177294","export_markdown":"/api/items/177294/export?format=markdown","export_json":"/api/items/177294/export?format=json","diagnose":"/api/diagnose?url=https%3A//huggingface.co/blog/anydecisionmodel"}},"digest":{"id":177294,"title":"Introducing AnySpeechRecognizer and AnyDecisionModel: Open Models for Speech and Decisions on Apple Platforms","url":"https://huggingface.co/blog/anydecisionmodel","source":"","topic":"ai","published_at":"2026-10-29T00:00:00+00:00","excerpt":"Introducing AnySpeechRecognizer and AnyDecisionModel: Open Models for Speech and Decisions on Apple Platforms Language models can do a lot. But they're only a small part of what machine learning can do.","quality_bucket":"high","quality_reason":"High confidence: full text extraction produced 16464 characters.","reading_time_min":13,"cluster_id":null},"card":{"display_title":"Introducing AnySpeechRecognizer and AnyDecisionModel: Open Models for Speech and Decisions on Apple Platforms","subtitle":"2026-10-29","summary":"Introducing AnySpeechRecognizer and AnyDecisionModel: Open Models for Speech and Decisions on Apple Platforms Language models can do a lot. But they're only a small part of what machine learning can do.","badges":["quality:high"],"links":{"read":"/item/177294","original":"https://huggingface.co/blog/anydecisionmodel","diagnose":"/api/diagnose?url=https%3A//huggingface.co/blog/anydecisionmodel"},"quality_warning":null},"export":{"title":"Introducing AnySpeechRecognizer and AnyDecisionModel: Open Models for Speech and Decisions on Apple Platforms","url":"https://huggingface.co/blog/anydecisionmodel","summary":"Introducing AnySpeechRecognizer and AnyDecisionModel: Open Models for Speech and Decisions on Apple Platforms\nLanguage models can do a lot. But they're only a small part of what machine learning can do.","source":"","date":"2026-10-29T00:00:00+00:00","content":"Introducing AnySpeechRecognizer and AnyDecisionModel: Open Models for Speech and Decisions on Apple Platforms\nLanguage models can do a lot. They write, summarize, translate, and call tools. But they're only a small part of what machine learning can do.\nSay a customer calls your support line. First, you want to know what they said (speech recognition). Then, you want to decide where to send them (decision). You could hand both to a language model, but there are models built for each that are better, faster, and less expensive.\nIn our AnyLanguageModel 1.0 recap, we looked at a year of local and hosted models in Swift. With AnyLanguageModel and swift-huggingface now on their 1.x releases, we're extending the same approach to speech and decisions: familiar Swift APIs with a choice of model.\nToday we're announcing two packages:\n- AnySpeechRecognizer implements Apple's new speech-to-text API with a choice of recognition engine, including NVIDIA's Parakeet and Alibaba's Qwen3-ASR running locally on Core ML, and adds speaker diarization to track who speaks when.\n- AnyDecisionModel answers yes-or-no, multiple-choice, and rating-scale questions with typed results and probabilities. It derives each answer from the model's probabilities instead of generating text, using a model on your device with MLX, Core AI, or llama.cpp, or a decision model from Jev or Ollama.\nBoth packages can download open models from the Hugging Face Hub and run them on device.\nComputers have been transcribing speech for decades,\nand in the past few years, they've gotten very good at it.\nApple platforms already have an API for it.\nmacOS 26 and iOS 26 introduced SpeechAnalyzer,\nApple's new speech-to-text API.\nYou add modules such as SpeechTranscriber and SpeechDetector to an analyzer,\ngive it a file or a stream of audio buffers,\nand read results from async sequences as they arrive.\nAssetInventory installs the models,\nso your app decides when downloads happen.\nIt's a well-designed API, but the only engine behind it is Apple's. AnySpeechRecognizer keeps the API and lets you choose the engine:\n- import Speech\n+ import AnySpeechRecognizer\nThe package mirrors SpeechAnalyzer, SpeechTranscriber, DictationTranscriber,\nSpeechDetector, and AssetInventory,\nwith Apple's Speech framework as the default engine.\nIf your code uses that shared API, changing the import is enough.\nTo use Parakeet instead,\nchange only how you create the transcriber:\nlet transcriber = SpeechTranscriber(\n    model: ParakeetSpeechModel(variant: .v3),\n    transcriptionOptions: [],\n    reportingOptions: [.volatileResults],\n    attributeOptions: [.audioTimeRange]\n)\nThe steps for installing assets, running the analyzer, and reading results stay the same. The README has a complete example and lists the differences from Apple's framework.\nParakeet v3 is NVIDIA's Parakeet TDT 0.6B v3. It's a polyglot: it recognizes 25 European languages and works out which one it's hearing, so you don't pass a locale.\nParakeet Ultra is Moondream's post-trained take on v3. It was more accurate in most of our measurements.\nParakeet Unified is NVIDIA's English-only Parakeet.\nAll three Parakeets run on the package's own Core ML runtime, which supports file and live input, volatile results, word timing, and word confidence.\nQwen3-ASR is Alibaba's speech model, in 0.6B and 1.7B sizes. It recognizes 30 languages and 22 Chinese dialects, including Mandarin, Cantonese, Japanese, and Korean, which Parakeet doesn't cover. It detects the language automatically, or you can set one:\nlet transcriber = SpeechTranscriber(\n    model: QwenSpeechModel(variant: .large, language: Locale.Language(identifier: \"yue\")),\n    transcriptionOptions: [],\n    reportingOptions: [],\n    attributeOptions: []\n)\nQwen3-ASR gives one final result for each segment of up to 40 seconds, without volatile results, word timing, or confidence. It runs on the GPU and is slower than Parakeet, so it's better suited to transcribing files than live input.\nTo add another engine, implement SpeechRecognitionModel for its configuration\nand SpeechRecognitionExecutor for one module's session.\nThe README includes a small provider\nthat reports placeholder text to help you get started.\nTo run these models in apps, we converted them to Core ML and published them on the Hub:\n| Model | Core ML conversion | Original checkpoint | License | \n|---|---|---|---|\n| Parakeet TDT 0.6B v3 | mattt/parakeet-tdt-0.6b-v3-coreml | nvidia/parakeet-tdt-0.6b-v3 | CC BY 4.0 | \n| Parakeet Ultra | mattt/parakeet-ultra-coreml | moondream/parakeet-ultra | CC BY 4.0 | \n| Parakeet Unified EN 0.6B | mattt/parakeet-unified-en-0.6b-coreml | nvidia/parakeet-unified-en-0.6b | NVIDIA Open Model License | \n| Qwen3-ASR 0.6B | mattt/qwen3-asr-0.6b-coreml | Qwen/Qwen3-ASR-0.6B-hf | Apache 2.0 | \n| Qwen3-ASR 1.7B | mattt/qwen3-asr-1.7b-coreml | Qwen/Qwen3-ASR-1.7B-hf | Apache 2.0 | \n| Streaming Sortformer 4spk v2 | mattt/diar-streaming-sortformer-4spk-v2-coreml | nvidia/diar_streaming_sortformer_4spk-v2 | CC BY 4.0 | \n| Streaming Sortformer 4spk v2.1 | mattt/diar-streaming-sortformer-4spk-v2.1-coreml | nvidia/diar_streaming_sortformer_4spk-v2.1 | NVIDIA Open Model License | \nEach repository records its source checkpoint and a checksum for every file, and the package pins it to a fixed revision. The Parakeet repositories add an 8-second encoder for live input, which cuts live analysis time by about a third at the cost of a somewhat higher word error rate. The repository also has the conversion workflows, most of which follow FluidInference's mobius scripts, and checks each conversion against the original model.\nDownloads happen only when your app asks for them: about 600 MB for each Parakeet, plus about 590 MB for the live encoder, 0.9 to 2.4 GB for Qwen3-ASR, and about 250 MB for Sortformer. Files go in the standard Hugging Face cache, so a Mac app outside the sandbox shares them with Python and other Hugging Face tools.\nWhen you transcribe a conversation,\nyou often want to know who said what.\nThat's speaker diarization,\nand Apple's Speech framework doesn't have a module for it,\nso AnySpeechRecognizer adds one.\nSpeakerDiarizer runs NVIDIA's\nStreaming Sortformer\non Core ML alongside an Apple or Parakeet transcriber,\non the same timeline:\nlet diarizer = SpeakerDiarizer(model: SortformerDiarizationModel())\nif let request = try await AssetInventory.assetInstallationRequest(\n    supporting: [transcriber, diarizer]\n) {\n    try await request.downloadAndInstall()\n}\nlet analyzer = SpeechAnalyzer(modules: [transcriber, diarizer])\nThe diarizer tracks up to four speakers,\neven when they talk over each other.\nA SpeakerTimeline collects its results\nand attributes each timed word to a speaker,\nso you can print a transcript by speaker turn.\nLike image support in AnyLanguageModel,\nthis goes beyond what Apple's API offers today.\nThe diarizer uses Sortformer v2 by default. You can also choose v2.1, which NVIDIA trained with more meeting data and which was more accurate on meetings in our measurements, too.\nWe measured the package with its hear command-line tool\non an M4 Max Mac Studio with macOS 27.0.1.\nHere are the word error rates on LibriSpeech files of 3 to 8 minutes:\n| Transcriber | test-clean | test-other | \n|---|---|---|\n| Parakeet v3, file | 1.55% | 2.78% | \n| Parakeet v3, live | 4.73% | 4.29% | \n| Parakeet Ultra, file | 1.66% | 2.55% | \n| Parakeet Ultra, live | 2.65% | 3.28% | \n| Parakeet Unified, file | 1.43% | 2.19% | \n| Parakeet Unified, live | 1.45% | 2.42% | \n| Apple's transcriber, file | 2.12% | 3.97% | \nParakeet transcribes an hour of audio in about 20 to 40 seconds from a file, or about 1.5 to 2.5 minutes live, with about 100 MB of memory once Core ML has compiled the model. Qwen3-ASR is much slower and needs a few gigabytes of memory. Meetings are hard for everyone: on AMI recordings, where people talk over each other, every engine we tested had a word error rate above 23%.\nThese numbers come from one machine and a few datasets,\nso measure with your own hardware and audio.\nhear evaluate works on your own files,\nand the repository's natural-speech-eval.py tool\nreproduces these measurements.\nSo far, we've tested only on macOS 27, not on an iPhone.\nNext, we'd like to add more engines, including Core AI on macOS 27 and iOS 27.\nAnyDecisionModel is a different story. There's no Apple framework to map onto, and decision models aren't new, exactly.\nIt's only a decision model if it comes from the Décision region of France; otherwise, it's sparkling zero-shot classification.\nWhat's new is the name, a lot of hype, and a crop of models trained to make decisions. We think that's where things are going, so we wanted a Swift API that's ready for them.\nApps often ask language models to make decisions. Is this message urgent? Which team should handle this ticket? How frustrated is this customer? The usual approach is to prompt a language model and parse the text that it generates. That gives you one answer, but doesn't show the probabilities it assigned to the alternatives.\nHere's what a decision looks like in Swift:\nimport AnyDecisionModel\nenum Department: String, Choosable {\n    case billing, technical, sales\n}\nlet ticket = \"I was charged twice for my order, and now the app logs me out when I try to ask for a refund.\"\nlet model = MLXDecisionModel(modelID: \"mlx-community/Qwen3-4B-Instruct-2507-4bit\")\nlet session = DecisionSession(model: model, state: .text(ticket))\nlet urgent = try await session.probability(of: \"Does this convey urgency?\")\nlet team = try await session.choice(\"Which team?\", from: Department.self)\nlet anger = try await session.score(\n    \"How frustrated?\",\n    levels: [\"Calm\", \"Frustrated\", \"Very angry\"]\n)\nurgent is a Double.\nteam is a Choice<Department> containing the selected case,\na probability for each option, and a confidence value.\nanger is a Score containing the expected level,\na probability for each level, and a confidence value.\nBecause Department conforms to Choosable,\nteam.value is a Department that you can use in an exhaustive switch.\nIf you've used Foundation Models or AnyLanguageModel,\nthe model-and-session pattern will look familiar.\nA DecisionSession holds a single state, which can be text or JSON,\nand every question is about that state.\nQuestions are independent:\nan answer never becomes input to a later question.\nTo ask several questions at once,\npass them to decide(_:) as a batch.\nFor each question, the MLX backend builds a prompt with a one-token label for each allowed answer, then reads the probability of each label from one forward pass.\nEmoji Magnet is a macOS app with a text field above a pile of 343 emoji. Type a phrase, such as \"things you wear\", and the emoji that match rise out of the pile. Refine it to \"things you wear in winter\", and the emoji that no longer match fall back.\nThe app has no built-in keyword rules; the model decides everything at inference time. When you pause typing, it asks the model one yes-or-no question for each emoji, for example:\nStatement: a heavy winter coat fits the description \"things you wear\". Is this statement true?\nThe session's state holds the phrase.\nThe demo above uses the hosted Jev backend,\nwhich answers all 343 questions in one request,\nso the emoji settle in about half a second for each phrase.\nWithout a TYPESAFE_AI_API_KEY, the app runs Qwen3 4B on your Mac with the MLX backend.\nThat backend uses prefix caching to evaluate the state once,\nthen answers 16 questions per forward pass.\nOn an M4 Max, a group of 16 takes about 0.45 seconds after the model loads.\nA full pass over all 343 emoji takes about 10 seconds,\nand each group's results appear as soon as they arrive.\nEmoji Magnet is in the AnyDecisionModel-Examples repository.\nReading next-token probabilities works with general-purpose language models, but those models weren't trained to make decisions. Cloudflare's Clef models are an example of a newer approach: a model with a trained decision head that turns a state and a schema of typed questions into decisions, returning probabilities for all allowed options across the questions in one forward pass. Clef-Flash is the 9B variant.\nAnyDecisionModel runs Clef-Flash on a Mac with MLX:\nlet model = MLXHeadDecisionModel(\n    modelID: \"mlx-community/clef-flash-4bit\",\n    head: .jointSchema\n)\nYou use the same sessions and questions,\nbut MLXHeadDecisionModel reads each decision from Clef's trained decision head\ninstead of from next-token probabilities.\nThe 4-bit model is a 6.2 GB download,\nand its model card recommends a Mac with at least 16 GB of memory.\nClef can read images and video,\nbut this backend accepts only text and JSON states.\nRaw probabilities from language models are often overconfident.\nThe local backends accept a Calibration,\nwhich applies a temperature to every answer and a bias to yes-or-no answers.\nUse separate datasets to fit the calibration and evaluate the results.\nLanguage models can also favor an option because of its position in a list.\nOn the MLX, Core AI, and llama.cpp next-token backends,\nturn on rotationDebiasing to ask a choice question\nonce for each rotation of the options and average the probabilities.\nThat costs one prompt evaluation per rotation.\nEach local choice and score also includes a confidence value based on the entropy of its probabilities. It measures how concentrated the probabilities are, not whether the answer is right, so check the error rate on your own data before you pick a threshold. The next-token backends' diagnostics report how much probability the model assigned to the allowed answers. A low value means it assigned most of the probability elsewhere.\nAnyDecisionModel has six backends:\n- MLX runs a small language model on Apple silicon with mlx-swift-lm and downloads it from the Hub.\n- MLX decision heads run a model with its own trained decision head, such as Clef.\n- Core AI does the same as MLX with a Core AI model on macOS 27 and iOS 27.\n- llama.cpp reads decisions from a local GGUF model through llama.swift.\n- Jev calls TypeSafe's Jev through the System One API, or any server that implements it, such as Kev.\n- Ollama calls a System One decision model on a local Ollama server or in Ollama's cloud. It requires Ollama 0.35.0 or later, or 0.40.5 or later for cloud models.\nThe next-token backends label answers \"yes\" and \"no\", A to Z, or 0 to 9, so a choice can have at most 26 options, and a score at most 10 levels. Decision heads have no such limit.\nLike AnyLanguageModel, the package uses Swift package traits.\nWithout traits, it has no third-party dependencies.\nYou get the core types and the Jev and Ollama backends,\nwhich also build on Linux.\nEnable the MLX, CoreAI, or Llama trait for the local backends.\nBoth packages require Swift 6.2 or later and macOS 26 or iOS 26 or later. The Parakeet and Sortformer runtimes and the MLX backend require Apple silicon. AnyDecisionModel's MLX build tasks use Xcode's Swift 6.4 or later and the Metal toolchain; Core AI requires Xcode 27 and an OS 27 runtime.\nAdd the packages to your Package.swift:\ndependencies: [\n    .package(url: \"https://github.com/mattt/AnySpeechRecognizer\", from: \"0.1.0\"),\n    .package(\n        url: \"https://github.com/mattt/AnyDecisionModel\",\n        from: \"0.6.0\",\n        traits: [\"MLX\"]\n    ),\n]\nFor now, AnyDecisionModel's CoreAI trait can't be combined with AnySpeechRecognizer,\nbecause coreai-kit 0.7.3 requires swift-huggingface below 1.0\nand AnySpeechRecognizer requires 1.x.\nEach README has more examples and details about requirements and backends.\nAnySpeechRecognizer also includes a command-line tool, hear,\nthat transcribes local files, labels their speakers, and evaluates the results.\nEvery hear command requires --backend apple, --backend parakeet, or --backend qwen;\nrun hear prepare with the same backend and model options before analysis\nto install the needed assets.\nTry them in your apps and tell us what works and what doesn't. Issues and pull requests are welcome on both repositories.\n- AnySpeechRecognizer on GitHub\n- AnyDecisionModel on GitHub\n- AnyDecisionModel-Examples on GitHub\n- AnyLanguageModel on GitHub\n- swift-huggingface on GitHub\nThanks to NVIDIA for Parakeet, Sortformer, and NeMo, to Moondream for Parakeet Ultra, to FluidInference, whose FluidAudio and mobius projects documented the conventions that the Parakeet runtime and the Core ML conversions follow, to Cloudflare for Clef, and to everyone who contributed to AnyLanguageModel, whose patterns both packages borrow.","confidence":0.9,"diagnostics_url":"/api/diagnose?url=https%3A//huggingface.co/blog/anydecisionmodel","quality_bucket":"high","failure_kind":"none","retryable":false,"quality_reason":"High confidence: full text extraction produced 16464 characters.","quality_profile":{"profile_version":"extraction_quality.v2","bucket":"high","confidence":0.9,"failure_kind":"none","retryable":false,"retry_after_attempts":0,"reason":"High confidence: full text extraction produced 16464 characters.","operator_guidance":{"severity":"ok","recommended_action":"trust_full_text","next_step":"Use the extracted full text as the primary article source.","operator_label":"Ready","can_retry":false,"can_use_summary":false,"diagnostics_required":false},"content_depth":{"contract_version":"content_depth.v1","category":"full_text","label":"Full text","has_full_text":true,"has_summary":true,"content_length":16464,"summary_length":202,"usable_text_length":16464,"source_field":"content"},"legacy_collapsed":false,"signals":{"extract_state":"ok","extract_error":null,"extract_retries":0,"content_length":16464,"summary_length":202}},"tags":[],"format_contract_version":"news_item_formats.v1"}}}