Demo app
The :demo-app module is a small sample app that uses the SDK only through its public Android API.
It is a reference, not a production audio path.
What it shows
- Live mic monitor with a 0.5 s delay. Captures mono PCM16 from the microphone, converts to
float, runs it through
Processor.process(...), buffers the processed stream in a 0.5-second delay line, converts back to PCM16, and plays it throughAudioTrack. Low-performance events are surfaced in the UI (delivered via the main executor). - Real-time-paced WAV file processing. Lets you pick a WAV file and an output destination, then
processes it chunk-by-chunk through the same
process(...)API — wall-clock paced to the audio duration so it behaves like a live stream rather than an offline batch conversion. There is no speaker playback in this mode; it writes a WAV file. - Settings screen. Edits every
Settingsfield. Invalid input surfaces theIllegalArgumentExceptionmessage inline (settings validity is enforced bySettingsitself). Saved settings apply to the next live/file run.
The live and file paths share the same processing shape: create a processor, setFeatures(...),
process(...) in chunks, close().
Running it
- Open the project in Android Studio and let Gradle sync.
- Install
demo-appon a device or emulator. - Choose whether normalization is enabled and pick a noise-suppression model (or
Off). The picker is populated at runtime fromModels.available(context). - Optionally enable Record live input/output WAV dumps before starting live mode.
- Tap Start live demo to toggle mic capture, processing, and 0.5-second delayed playback.
- Tap Select file and process to pick a WAV file and output path and run the real-time-paced file flow.
Supported file input is mono 16-bit PCM WAV; output is WAV. The demo requires the
RECORD_AUDIO permission for live mode.
Downloading live dump files
When Record live input/output WAV dumps is enabled, the demo writes to app-internal storage:
files/gigaedge-enhance-live-input.wavfiles/gigaedge-enhance-live-output.wav
Copy them off the device with:
adb exec-out run-as com.gigaedge.enhance.demo cat files/gigaedge-enhance-live-input.wav > gigaedge-enhance-live-input.wav
adb exec-out run-as com.gigaedge.enhance.demo cat files/gigaedge-enhance-live-output.wav > gigaedge-enhance-live-output.wav
Emulator microphone caveats
The Android emulator does not connect to your host microphone by default and feeds AudioRecord a
synthesized sine tone. If live mode plays a steady tone instead of your voice:
- Open the emulator's Extended Controls (the
...button) → Microphone → enable Virtual microphone uses host audio input. This setting resets on every emulator restart. - Or run
adb emu avd hostmiconafter each boot. - On macOS, grant microphone access to Android Studio under System Settings → Privacy & Security → Microphone, then relaunch.
This is an emulator/host limitation, not an SDK or demo bug; physical devices capture real input directly. See troubleshooting.md.
Scope / limitations
- The live path is intentionally simple: no foreground service, no audio-focus/route-change handling, minimal error recovery. It is not a production monitoring path.
- The file path supports only mono 16-bit PCM WAV in and writes WAV out.