Back to discover
NewsBuild with AI

New Swift packages pair speech recognition with typed decisions

Mattt introduced AnySpeechRecognizer and AnyDecisionModel for developers choosing models for transcription and bounded questions.

Turquoise folded-paper sound waves become cream strips beside a separate amber tile and three geometric tokens in ceramic dishes.
CurioFuse · AI-generated illustration

The October 29 announcement separates two jobs: turning speech into text and answering questions with predefined alternatives. The packages let Swift developers choose models for these jobs. They are not interchangeable building blocks in every configuration: the current CoreAI option in AnyDecisionModel cannot be combined with AnySpeechRecognizer because their required dependency versions conflict.

The speech manual gives a file-transcription example that first resolves a supported language and creates a transcriber. It installs any requested assets before analysis, reads results while the file is processed, then finalizes input and awaits the collected text. Failure cancels the analyzer. The package requires Swift 6.2 and macOS or iOS 26 or newer; Parakeet needs Apple silicon. Its documented limits include untested Parakeet operation on physical iPhones, the OS 26 runtime and the minimum compiler.

The decision manual describes a session holding fixed text or JSON data. Each question concerns that same input; earlier answers do not feed later questions. A choice returns a typed value and probabilities for the options. Local confidence measures how concentrated those probabilities are, not whether an answer is correct: the author recommends measuring errors on your data before selecting a threshold. Typed output alone does not resist injected instructions, and Jev/Ollama compatibility tests use fixtures, not live services.

Sources(3)

Sources & standardsReport a correction