Night & AirSDKContact team

Quickstart

Run your first analysis

Use this 33-second synthetic recording to check that your integration returns the expected intervals.

Get the sample

Save the demo WAV and its reference result in the same directory. The file contains a repeating synthetic buzz at 16 kHz. The homepage player lets you hear the detector on two real recordings. To inspect the test files locally, run the following with Python 3.

import json
import wave

with wave.open("demo.wav") as wav:
    duration = wav.getnframes() / wav.getframerate()
with open("result.json") as file:
    result = json.load(file)

print(f"{duration:.2f} s, {len(result['events'])} events")
print(result["events"][0])

Run the detector

With the native evaluation kit, a C compiler and CMake 3.18 or later, put demo.wav in the extracted SDK directory. Run these commands there on macOS or Linux.

cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --target nightair-wav
./build/nightair-wav demo.wav > local-result.json

The first command configures the native build. The last command runs inference locally and writes the results. Request the native evaluation kit.

Read the result

20.7 seconds of sound passed the detector’s rules. The eleven intervals all sit within one 31.9-second episode. Episode duration includes the recorded quiet gaps between sounds. The first interval begins 0.2 seconds into the recording and ends at 2.1 seconds.

Use this reference to check your integration. Evaluating accuracy on a new microphone requires labelled recordings from that device.

Use your own recording

Pass a mono PCM16 WAV to the same command. For an app integration, send each completed recording part on a serial background worker at its original timeline offset. Finalize the session after the last part.

Continue with Swift for iOS, Kotlin for Android, or the native C API.

Next guideiOS · Swift