detectFromAudio

fun detectFromAudio(audioMono: FloatArray, sampleRate: Int = 16000): Float

Detect natural speaking pitch from audio samples.

Analyzes spoken audio to find the median fundamental frequency. Works best with natural speech samples.

ADR-017: Automatically resamples to 16kHz internally if needed.

Return

Detected frequency in Hz, or -1 if detection failed

Parameters

audioMono

Mono audio samples (normalized -1 to 1)

sampleRate

Sample rate in Hz (default 16000)