This guide is for developers and system architects integrating the AudioIntelligence SDK into enterprise ecosystems or professional Mastering Dashboards.
AudioIntelligence is a modular SDK optimized for the Swift Package Manager.
Update your Package.swift to include the Infinity Engine:
let package = Package(
name: "MyProAudioApp",
dependencies: [
.package(url: "https://github.com/trgysvc/audiointelligence.git", from: "8.2.3")
],
targets: [
.target(
name: "MyTarget",
dependencies: [
.product(name: "AudioIntelligence", package: "AudioIntelligence"),
.product(name: "AudioIntelligenceUI", package: "AudioIntelligence") // Add for UI views
]
)
]
)The SDK utilizes the Actor Model to ensure that heavy DSP calculations never block the UI thread or interfere with low-latency audio tasks.
All analysis is performed within the AudioIntelligence actor. This provides compile-time protection against data races.
import AudioIntelligence
let sdk = AudioIntelligence()
Task {
do {
let report = try await sdk.analyze(url: songURL) { progress, stage, _ in
print("[\(stage)] \(Int(progress * 100))%")
}
// Measurement (validated) vs estimation (statistical):
print("Loudness: \(report.measurements.loudness.integrated.value) LUFS") // EBU R128
print("Structure: \(report.estimations.structure.count) sections detected")
print("Tempo: \(report.estimations.tempo.value) BPM @ \(report.estimations.tempo.confidence)")
} catch {
print("Analysis Error: \(error)")
}
}The AudioIntelligenceUI module provides high-performance, Metal-accelerated views for your dashboard.
The module ships MainDashboardView (a full engineering dashboard) and the
SpectralLandscapeView component. Both consume the typed AudioReport:
import SwiftUI
import AudioIntelligenceUI
struct AnalysisDashboard: View {
@State private var report: AudioReport?
var body: some View {
VStack {
if let report {
// Full engineering dashboard
MainDashboardView(report: report)
// Or drive an individual component from the heavy feature series
SpectralLandscapeView(magnitudes: report.features?.magnitudeSpectrogram ?? [])
.frame(height: 300)
}
}
}
}AudioIntelligence implements an industrial-grade persistent store:
- Identifier: Keyed to a SHA256 content hash. Moving or renaming files does NOT trigger re-analysis.
- Auto-Eviction: Maintains a strict 4GB disk limit with an LRU policy.
await sdk.invalidateCache() // Clears the hybrid storeAudioIntelligence optimizes for the modern M-series SoC:
- Accelerate / vDSP (incl. AMX): High-throughput FFT and matrix/vector math.
- Metal GPU: Parallelized DSP kernels and UI rendering, with a CPU fallback when Metal is unavailable.
The analysis pipeline (
analyze()) is pure Swift on Accelerate/AVFoundation/Metal — no Core ML, no ANE inference, no network. (There is a separateNeuralSeparationEngineinterface that can host a Core ML model for stem separation, but no model ships and it is not part ofanalyze(). The instrument layer IS built and data-derived —InstrumentEngine, fit and calibrated on real OpenMIC-2018 audio, no Core ML/ANE — but held-out accuracy is class-dependent; see README Validation Status.)
For technical specs on specific analysis engines, see Engines.md.