Skip to main content

GigaEdge Enhance Android Audio SDK

GigaEdge Enhance is an Android audio SDK for real-time speech processing. It wraps a native GigaEdge Enhance C++ core behind a small Kotlin API: you feed it mono FloatArray PCM, and it runs optional normalization (loudness control, noise gate, limiter) and neural noise-suppression stages on a background worker thread. Audio capture, playback, and file I/O stay in your app — the SDK does the DSP.

Key capabilities​

  • Real-time, non-blocking process(...) for mono FloatArray PCM.
  • Input sample rate fixed at construction; the native core resamples internally as needed.
  • Two runtime-toggleable feature stages: normalization and noise suppression.
  • Noise-suppression models imported as separate AARs and discovered at runtime.
  • Cumulative timing telemetry and a low-performance / adaptive-latency signal.
  • Explicit Closeable lifecycle; one native instance per processor.

Quickstart​

import com.gigaedge.enhance.Features
import com.gigaedge.enhance.Processor
import com.gigaedge.enhance.Models

// sampleRateHz is your input rate in Hz; audio must be mono.
Processor(context, sampleRateHz).use { processor ->
val model = Models.available(context).firstOrNull() // e.g. "hybrid48", or null
processor.setFeatures(Features(normalization = true, noiseSuppression = model))

val output = FloatArray(input.size)
processor.process(input, output, input.size) // non-blocking; warms up asynchronously

val telemetry = processor.telemetry // cumulative; subtract snapshots for deltas
processor.reset() // clears buffers; keeps features + telemetry
} // close() releases native resources

Add the SDK and the model modules to your app's dependencies:

dependencies {
implementation(project(":gigaedge-enhance-sdk"))
implementation(project(":gigaedge-enhance-model-quality48"))
implementation(project(":gigaedge-enhance-model-hybrid48"))
}

Only imported model AARs are packaged into your app. The SDK is consumed as a project module (not published to Maven Central).

Documentation​

Full guides live in docs/:

  • Getting started — prerequisites, dependencies, end-to-end example, first-run checklist.
  • API reference — every public type and member.
  • Architecture — Kotlin API → thin JNI → native worker and ring buffers.
  • Threading — the concurrency contract and callback delivery.
  • Telemetry and performance — histograms, deltas, means, low-performance events.
  • Models — packaging, asset layout, runtime discovery, missing-model behavior.
  • ProGuard / R8 — the consumer keep rules the SDK ships.
  • Demo app — live monitor, file processing, settings, emulator mic caveats.
  • Troubleshooting — common errors and fixes.

Building and testing​

Requires JDK 17, Android SDK API 35, and (to build the native library) NDK 29.0.14206865 with CMake 3.22.1. Use the Gradle wrapper:

./gradlew :gigaedge-enhance-sdk:assembleDebug
./scripts/build.sh # SDK + models + demo

Helper scripts:

  • scripts/build.sh — Release assemble of the SDK, model modules, and demo app.
  • scripts/test-sdk.sh — SDK JVM unit tests and SDK instrumented tests for an already-built Debug variant.
  • scripts/test-demo-ui.sh — demo app connected instrumentation/UI tests.
  • scripts/test-all.sh — Release JVM tests and optional connected Android tests for an already-built variant.

Known limitations​

  • Mono FloatArray processing only.
  • The demo file path supports only mono 16-bit PCM WAV input and writes WAV output.
  • The demo live path is intentionally simple (no foreground service, minimal error recovery) and is not a production monitoring path.
  • Android emulator microphone input can be unreliable or tonal; see Demo app and Troubleshooting.