AnySpeechRecognizer and AnyDecisionModel : Two Open Source Models for Voice and Decision-Making on Apple Platforms

AnySpeechRecognizer and AnyDecisionModel : Two Open Source Models for Voice and Decision-Making on Apple Platforms
3 min read

AnySpeechRecognizer

Hugging Face announces two Swift packages, AnyDecisionModel and AnySpeechRecognizer, which extend the approach already proposed for language models with AnyLanguageModel to speech recognition and decision tasks. They maintain familiar Swift APIs and let the developer choose the model that executes each task, including open models downloaded from the Hugging Face Hub and run on-device.

  • Hugging Face publie deux packages Swift open source pour la reconnaissance vocale et la prise de décision.
  • AnySpeechRecognizer permet de remplacer le moteur d’Apple par Parakeet ou Qwen3-ASR.
  • AnyDecisionModel calcule des réponses typées à partir des probabilités du modèle, sans générer de texte.
  • Les deux packages exigent Swift 6.2 et macOS 26 ou iOS 26.

Apple has offered SpeechAnalyzer, its speech transcription API, since macOS 26 and iOS 26. The developer adds modules like SpeechTranscriber or SpeechDetector, provides an audio file or stream, and then reads the results as they come. However, the engine powering this API is Apple’s only. AnySpeechRecognizer keeps the interface and allows switching the engine: according to the source, you only need to change the import if the code uses only the shared API, and only change the creation of the transcriber to use Parakeet.

Several engines are offered. Parakeet v3, from NVIDIA, recognizes 25 European languages and detects the spoken language automatically. Parakeet Ultra, a variant of Moondream, was “more accurate in most of our measurements,” according to the post. Parakeet Unified, also from NVIDIA, handles only English. Qwen3-ASR, from Alibaba, comes in 0.6B and 1.7B sizes and covers 30 languages and 22 Chinese dialects, including Cantonese, Japanese, and Korean. It produces a final result per segment of up to 40 seconds, without interim results, and runs on the GPU. It is slower than Parakeet and better suited for file transcription than live.

The package also adds speaker diarization, i.e., identifying who is speaking at each moment. The SpeakerDiarizer module relies on NVIDIA’s Streaming Sortformer and can track up to four speakers, even when they interrupt each other. Apple’s Speech framework does not offer an equivalent module.

Measurements were performed on a Mac Studio M4 Max with macOS 27.0.1, on LibriSpeech files from 3 to 8 minutes. The word error rate reached 1.55% on test-clean and 2.78% on test-other for Parakeet v3 on file, versus 2.12% and 3.97% for Apple’s transcriber on file. According to the post, Parakeet transcribes one hour of audio in 20 to 40 seconds from a file and consumes about 100 MB of memory. On AMI recordings, where people talk over each other, every engine tested exceeded 23% word error. These figures come from a single machine and a few datasets, and the package has only been tested on macOS 27, not on iPhone.

AnyDecisionModel

AnyDecisionModel answers closed questions: yes or no, multiple choice, rating scale. The answers are typed and come with probabilities. Instead of having a language model generate text, the package calculates each answer from the model’s probabilities, avoiding the need to parse free text. In the post’s example, a Qwen3-4B model runs on Mac via the MLX backend, and three questions about a support ticket return a probability, a typed choice, and a score respectively.

With local backends, the model reads the probability of each possible answer, represented by a single token, i.e., a unit of text. The post notes that the raw probabilities from language models are often too confident and that calibration is possible. To reduce bias related to an option’s position in a list, the option rotationDebiasing asks the question once per rotation of choices and averages the probabilities, at the cost of an extra evaluation per rotation.

The Emoji Magnet demo, available in the AnyDecisionModel-Examples repository, filters 343 emoji from an input sentence. For each emoji, the model answers a question with yes or no. With the Jev backend, hosted by TypeSafe, the 343 questions go in a single request and the emoji stabilize in about half a second. Locally, with Qwen3 4B and the MLX backend, a batch of 16 questions takes about 0.45 seconds on an M4 Max, and a full pass lasts about 10 seconds.

The package includes six backends, including llama.cpp, Ollama, and Core AI. Both packages require Swift 6.2 or newer and macOS 26 or iOS 26. Issues and pull requests are welcome on both repositories.

S’abonner
Notification pour
guest

0 Commentaires
Le plus ancien
Le plus récent Le plus populaire
0
Nous aimerions avoir votre avis, veuillez laisser un commentaire.x