Mosquito flight sound extraction

Dear Audacity forum,
We are studying African malaria mosquitoes’ flight behavior. We tether them inside a flight tube and record their flight for 10 hours using voice recorders (44100 or 8000 Hz, mono).
This results with large files which we need to extract the amount of flight from (the mosquitoes only fly for short periods of time, if any). Mosquito flight sound is generally between 500-2000 Hz.
I was wondering if there was any way to extract only the flight sound from these files, by either telling audacity what to look for, or better yet have Audacity export a data file and use R to extract the flight data somehow…
Any ideas on how I could do this?
We use Windows 7, Audacity 2.1.0 installed from zip file.
Love Audacity,

tethered flight Audacity output.jpg

You could remove frequencies outside of the range of interest using the Equalization effect. You would need settings similar to this:
After filtering, there ‘may’ be enough amplitude difference between flying/not flying to be able to use “Sound Finder” (, or simply to be able to see the flying sounds by looking at the waveform (zoom as appropriate:

If you do use Sound Finder, I would suggest that you don’t run it on more than about an hour at a time. Nyquist plug-ins (Sound Finder is a Nyquist Plug-in) often have trouble with very long selections.

Thanks Steve for your prompt reply!
Can Audacity export the sound result after Equalization as a csv file for analysis elsewhere?
I have no difficulty in ‘seeing’ flight, I want to have it automatically extracted from the 10 hr file.
It’s actually more complicated since the flight sound varies in frequency as well, so I kind of answered my self here…

“Sound Finder” creates “labels” ( which may be exported as a text file.

The fundamental-frequency of some mosquitoes goes as low as 350Hz …

Again if there is enough amplitude difference between flight/non-flight you “may” be able to use Truncate Silence to remove the non-flight sections and so make a track that only contains flight sounds.

Again if the flight sounds are loud enough, you could try Sound Activated Recording.


Thanks Trebor.
I actually know the work and the people - both wonderful!
Hoy et al were working with a different species than ours so I guess I should have specified we are working on Anopheles (not Aedes), which have a different fundamental frequency.
Right now I am interested in extracting active flight which generates the higher frequencies usually. Once I know how to isolate the ‘amount’ of flight from the track I can start playing with the range I guess :wink:

Thanks Gale!
The Sound finder does a pretty good job at detecting the flight and can be suitably adjusted for it.
Now how did you say I could extract the (label) data again?

A band pass filter might do it for you. ReaQ plugin will let you adjust the cut-off freqs as you listen.

Have you tried converting the file to mp3?

So is the end objective a separate audio file for each instance of flight?

If so, you can use the region labels created by Sound Finder to export multiple, giving you one audio file for each labelled region.

The labels do not contain text data about the sample amplitude values. Is that what you want in the CSV file? If so, see Analyze > Sample Data Export….


Hi Gale, group!
First - thanks for all the replies and ideas. This is very helpful!
My goal is to learn how much flight took place in the 10 h trial/track, and when.
So I would like to be able to extract the flight periods from the background so I (A) can sum up the total duration, and (B) find out when the flight took place within the track.
Right now I am able to extract most of the flight but when I truncate the ‘silence’ (=background) I am left with a chunk of flight which only gives me the total flight, but not the times it occurred on.

Hi Themickster-
Thanks. No i have not tried these two options.
Can you please elaborate a little to the layman what these two options will do and how to use them?
Thanks :wink:

A “Bandpass” filter would leave behind only the frequencies specified.

MP3 is lossy, so only use it if you need very small files and only for a final, finished file.


Sound Finder made region labels where the flight occurred. You can use File > Export Labels… which gives you a single text file listing the start and end point of each label (in seconds from the start of the track).



Thanks so much. This looks very promising and actually might do just what we need it to do, after learning it and fine tuning :wink: