If beep stand out clearly (like on screenshot), you can use aplitudes array to find the time when it starts/ends, just find a piece of array where
ABS(amplitude[i]) > min
and test if it's a beep. Otherwise you need to split amplitudes in smaller chunks and test each. The beep test looks like FFT conversion of that peice/chunk and comparing its maximum dominant frequency with that of beep signal.