I have an audio recording wav file of a cricket chirping, every so often a chirp occurs for ~ 0.01 seconds at about 20kHz. I would like to use R to detect at what times during the recording the specific frequency (20kHz) occurs/starts.
Wave Object
Number of Samples: 4041625
Duration (seconds): 91.65
Samplingrate (Hertz): 44100
Channels (Mono/Stereo): Mono
PCM (integer format): TRUE
Bit (8/16/24/32/64): 16

I do believe
dfreqfrom theseewavepackage is what you're after. The method returns the dominant frequency (the one with the highest amplitude) over time (in seconds). Here's an exampleof how you could get that information: