Skip to main content

Installation

The NexaSdk for iOS/macOS can be downloaded directly from the official distribution link below. Download NexaSdk.xcframework

Add Dependency

In Xcode, download and drag NexaSdk.xcframework into your Project/Workspace. Make sure the framework is added to the target’s Frameworks, Libraries, and Embedded Content and set to Embed & Sign if you need the framework bundled in the app.

Run Your First Model

1

Load Model

Create an ASR instance and load a model:
import Foundation
import NexaSdk

let asr = try Asr(plugin: .ane)
try await asr.load(from: "<path/to/model/dir>")
2

Transcribe Audio File

Use the loaded model to transcribe an audio file:
let asrResponse = try await asr.transcribe(options: .init(audioPath: "<path/to/audio>"))
print(asrResponse.asrResult.transcript)
Load Model from HuggingFaceYou can download models from the HuggingFace using the official Hub library and load them via the load(from:) API. For example:
import Hub
import NexaSdk

let modelDir = try await Hub.snapshot(from: "NexaAI/parakeet-tdt-0.6b-v3-ane") { progress in
  print(progress.fractionCompleted)
}
let asr = try Asr(plugin: .ane)
try await asr.load(from: modelDir)

Supported Models

Explore our curated collections of compatible models:

ANE Models

Optimized models for Apple Neural Engine

GGUF Models

Any GGUF format LLM and VLM models

Device Compatibility

  • Apple Neural Engine
  • arm64

Next Steps

API Reference

Explore detailed documentation for all model types and learn their usage.