Night & AirSDKContact team

API reference

Results and event reference

Use the session summary for totals and the event list for a playback timeline. All returned times are in seconds from the session origin.

Session summary

recorded_seconds
Sum of the audio submitted across all parts. Missing capture time is excluded.
detected_sound_seconds
Duration of sound that passed the detector’s score and periodicity rules.
episode_seconds
Total duration of grouped sounds, including observed quiet gaps of up to eight seconds between accepted sounds.
clip_eligible_seconds
Accepted sound that also passes the playback-selection rule. The host uses its original audio for playback.
event_count
Number of contiguous accepted sound intervals.
episode_count
Number of grouped episodes on the recorded timeline.

These spellings match the C structure and CLI output. Swift and Android expose camelCase fields such as detectedSoundSeconds and eventCount.

Event intervals

start_seconds is inclusive and end_seconds is exclusive. Their difference gives that interval’s duration. peak_score is the highest raw model output in the interval. The first event in the synthetic sample is shown below.

{
  "start_seconds": 0.2,
  "end_seconds": 2.1,
  "peak_score": 0.535706520
}

The event marks 1.9 seconds of accepted sound. Map the offsets back to the host’s retained recording to play that interval.

Recording boundaries

Each completed recording part is normalized as a unit. Submit parts in capture order with their original boundaries, a single sample rate and non-overlapping start frames. A continuous seam can join evidence across parts. An explicit missing frame starts a new run. Finalization requires at least one successfully submitted part and can be repeated.

Supply finite mono samples in [-1, 1]. Common supported rates include 8, 11.025, 16, 22.05, 44.1 and 48 kHz. The C header specifies the exact ratio and length limits.

Compare a result

Compare the SDK version, model version, configuration ID, source rate and recording boundaries across runs. With the 16 kHz reference result, eleven intervals account for 20.7 seconds of accepted sound and one episode spans 31.9 seconds.

Next guideRelease notes