跳到正文
DEV Community· Mikhail Savchenko·· 2 小時前AI 評分65

Hugging Face 發佈兩款 Swift 套件,涵蓋語音辨識與模型決策

Two Swift packages bring open speech and decision models

AI 導讀

Hugging Face 宣佈推出 AnySpeechRecognizer 和 AnyDecisionModel 兩款 Swift 套件,分別讓語音辨識切換不同引擎,並以模型概率輸出決策結果。

正文

On October 29, 2026, Hugging Face announced two Swift packages that apply its AnyLanguageModel approach to speech and decisions: one familiar API, a choice of model underneath.

AnySpeechRecognizer

The package mirrors Apple's SpeechAnalyzer API, introduced with macOS 26 and iOS 26, and keeps Apple's own engine as the default. Teams that use that shared API can switch by changing the import. Choosing another engine means changing only how the transcriber is created.

The engines on offer:

  • Parakeet v3 (NVIDIA) recognizes 25 European languages and detects which one is spoken.
  • Parakeet Ultra is Moondream's post-trained version of v3.
  • Parakeet Unified is English-only.
  • Qwen3-ASR (Alibaba) covers 30 languages and 22 Chinese dialects. It is slower, returns only final results, and suits files better than live audio.

The authors converted the models to Core ML and published them on the Hugging Face Hub under licenses that include CC BY 4.0, Apache 2.0 and the NVIDIA Open Model License. Check which one applies to your use. Each Parakeet download is about 600 MB, and Qwen3-ASR runs from 0.9 to 2.4 GB.

A new SpeakerDiarizer module, built on NVIDIA's Streaming Sortformer, tracks up to four speakers, including when they overlap, and attributes each word to one of them. Apple's framework has no equivalent.

On LibriSpeech files, measured on an M4 Max Mac Studio, Parakeet v3 had a word error rate of 1.55% on the clean set against 2.12% for Apple's transcriber. An hour of audio took roughly 20 to 40 seconds from a file. Overlapping talk is still hard: on AMI meeting recordings every engine tested exceeded 23%. The authors tested only on macOS 27, not on an iPhone, and advise measuring on your own audio.

AnyDecisionModel

Instead of generating text and parsing it, this package answers a question by reading the model's probabilities. It returns a probability for a yes/no question, a typed choice with a probability per option, or a score on a rating scale. Each answer carries a confidence value based on entropy.

There are six backends: MLX, MLX decision heads, Core AI, llama.cpp, Jev and Ollama. Local next-token backends cap a choice at 26 options and a score at 10 levels. Cloudflare's Clef-Flash, a 9B model with a trained decision head, runs through the MLX decision-head backend. Its 4-bit build is a 6.2 GB download, and the model card recommends at least 16 GB of memory.

The package supports calibration and an option-order debiasing setting, because raw probabilities from language models are often overconfident and can favor an option by its position.

Requirements and status

Both packages need Swift 6.2 and macOS 26 or iOS 26. The Parakeet and Sortformer runtimes and the MLX backend need Apple silicon. Current versions are early: 0.1.0 for AnySpeechRecognizer and 0.6.0 for AnyDecisionModel. The Core AI trait of AnyDecisionModel cannot yet be combined with AnySpeechRecognizer because of a dependency conflict.

來源:DEV Community · dev.to