Skip to content
axxbetadocs
v0.2.26next
GitHub

models-windows

View .mdOpen in Claude

Answer the models Windows apps take from Windows, from the stubs in the app’s axx-models folder (in its ./ files, its home’s AppData\Roaming), in the desktops desktop-windows runs: the voice they speak with, SAPI’s, from a Piper voice stub, and the Windows AI APIs, from stubs of them. The voice. SAPI’s (System.Speech’s, and native SAPI’s), from a Piper voice stub (its .onnx and .onnx.json). As the app starts, Axx adds its voice engine (built with the .NET SDK, 8 or later, into Axx’s cache) to SAPI’s voices, as axx voice, makes it the user’s default voice, and gives the app the stub: the voice speaks each text with Piper (its Windows release, which Axx downloads, pinned) into SAPI’s output and into the folder the speaker step hears. SAPI lists the voices in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\Voices\Tokens only, so Axx runs as an administrator, as GitHub’s Windows runners do, or as a user who may create keys there; the scenario’s end takes the voice out again and puts the user’s default voice back. The engine is 64-bit .NET: it speaks in 64-bit apps. The Windows AI APIs. The Windows App SDK’s: TextRecognizer, ImageDescriptionGenerator, ImageObjectExtractor, and the language model, Phi Silica, with its skills, TextSummarizer, TextRewriter and TextToTableConverter (windows.ai.*: axx models contract writes their contracts), in a self-contained build (WindowsAppSDKSelfContained), whose own folder has their files, which its manifest maps their classes to. As the app starts, Axx puts its library in place of the app’s file of each API the folder has a stub of (Microsoft.Windows.AI.Imaging.dll, Microsoft.Windows.AI.Text.dll), and the app’s own back as the scenario ends: a class the folder has a stub of is the library’s, any other the app’s file’s; the language model’s are the library’s together, with a stub of the model or a skill. Axx builds the library once for each app, against the app’s .winmd files, with C++/WinRT (its release, which Axx downloads, pinned) and MSVC (Visual Studio’s, or its Build Tools’, C++ tools and a Windows 11 SDK). The library answers as Windows does: only an app with package identity whose package declares the systemAIModels capability. A stub of a PC without the model gives the reason (format.details.availability) in Windows’ words: NotSupportedOnCurrentSystem, or NotReady, which EnsureReadyAsync makes ready.

Add it to a project with axx pack add models-windows; it builds on models-core and desktop-windows and app-core, which comes with it.