Installation
VoxaTrace is distributed as a Kotlin Multiplatform library. Follow the platform-specific instructions below.
Android
Gradle (Kotlin DSL)
Add the repository and dependency to your app's build.gradle.kts:
repositories {
mavenCentral()
// Or your private Maven repository
}
dependencies {
implementation("com.musicmuni:voxatrace:0.9.2")
}
Gradle (Groovy)
repositories {
mavenCentral()
}
dependencies {
implementation 'com.musicmuni:voxatrace:0.9.2'
}
Permissions
Add to your AndroidManifest.xml:
<!-- For recording -->
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<!-- For file access (if loading from external storage) -->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
iOS
Swift Package Manager (Recommended)
- In Xcode, go to File > Add Package Dependencies
- Enter the repository URL:
https://github.com/musicmuni/voxatrace - Select version and add to your target
Or add to your Package.swift:
dependencies: [
.package(url: "https://github.com/musicmuni/voxatrace", from: "0.9.2")
]
CocoaPods
Add to your Podfile:
pod 'VoxaTrace', :podspec => 'https://raw.githubusercontent.com/musicmuni/voxatrace/main/VoxaTrace.podspec'
Then run pod install.
XCFramework (Manual)
- Download
VoxaTrace.xcframeworkfrom the releases page - Drag it into your Xcode project
- In your target's General tab, ensure it's listed under "Frameworks, Libraries, and Embedded Content"
- Set embedding to "Embed & Sign"
Info.plist
Add microphone usage description for recording:
<key>NSMicrophoneUsageDescription</key>
<string>We need microphone access to record your singing.</string>
Version Compatibility
| VoxaTrace | Android Min SDK | iOS Min | Kotlin |
|---|---|---|---|
| 0.9.x | API 24 (7.0) | iOS 14 | 1.9+ |
Authentication
VoxaTrace requires initialization with valid credentials before any SDK APIs can be used. Authentication works via an API key, a proxy, or platform attestation. The quickest way to get started is with your API key directly:
Kotlin
// In Application.onCreate() or before using any VoxaTrace API
VT.initializeForServer(apiKey = "sk_live_your_key_here")
Swift
// In AppDelegate or App init
VT.initializeForServer(apiKey: "sk_live_your_key_here")
tip
For production mobile apps, use Proxy or App Attestation instead of embedding API keys directly. See the Authentication guide for all three methods, proxy server setup, and security best practices.
Verifying Installation
Kotlin
import com.musicmuni.voxatrace.sonix.SonixPlayer
// If this compiles, you're set!
suspend fun test() {
val player = SonixPlayer.create("test.mp3")
println("VoxaTrace installed!")
}
Swift
import VoxaTrace
// If this compiles, you're set!
func test() async throws {
let player = try await SonixPlayer.create(source: "test.mp3")
print("VoxaTrace installed!")
}
Next Steps
- Authentication - Set up secure authentication for production
- Android Quickstart - Build your first Android app
- iOS Quickstart - Build your first iOS app