Skip to main content
Version: 1.0.7

Configuration

📈 SDK Configuration​

Configuring the Surpuissant SDK is essential to make the most of its features. Here are the detailed steps to set up and get started with the SDK.

Initialization​

To initialize the SDK, use the setup method with the required parameters such as the application context, your API key (that you can get here), and the keywords you want to detect. Here is an example code to configure your SDK:

Surpuissant.setup(
Configuration(
context = applicationContext,
apiKey = "your_api_key",
keywords = listOf("surpuissant")
// Only 'Surpuissant' is currently available,
// contact us to learn more
)
)

Permission Request​

Before starting the recording, it is necessary to request permission to access the user's microphone. The SDK provides a method to facilitate this request:

Surpuissant.askRecordPermission(this) { _ ->
Surpuissant.startRecord { status: Status ->
Log.d("MainActivity", "startRecord: $status")
}
}
Security Note

To protect your API key and other sensitive information, it is recommended to use tools like ProGuard or R8 for code obfuscation and minification.