Skip to main content

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

  1. In Xcode, go to File > Add Package Dependencies
  2. Enter the repository URL: https://github.com/musicmuni/voxatrace
  3. 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)

  1. Download VoxaTrace.xcframework from the releases page
  2. Drag it into your Xcode project
  3. In your target's General tab, ensure it's listed under "Frameworks, Libraries, and Embedded Content"
  4. 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

VoxaTraceAndroid Min SDKiOS MinKotlin
0.9.xAPI 24 (7.0)iOS 141.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