A species classification example with acoustic characters using machine learning methods was presented.
Six common species of crickets (Gryllodes sigillatus, Homoeoxipha lycoides, Loxoblemmus appendicularis, Tarbinskiellus portentosus, Teleogryllus mitratus, and T. occipitalis) in Taiwan were selected because they are easy to collect and rear. The sound of the crickets was recorded using a smartphone (Samsung Galaxy A52) in an indoor environment to minimize noise interference. Audacity (https://audacityteam.org/), a free sound analysis software, was used to extract the chirps in the sound files. Partial chirps WAV files were provided in "exampledata".
The chirps were inspected by the spectrograms and oscillograms (see figure below). The spectrogram porvides a view of amplitude and frequency over time, and the oscillogram depicts the relationship between amplitude and time. Among these figures, the shape of sound waves and pattern of frequency distribution are distinct.
To quantify the sound data, MFCC (Mel-scale Frequency Cepstral Coefficients) was used to extrat useful imformation for building classifiers. The function melfcc() in package tuneR was implemented to calculate MFCC.
The MFCC data were visualized to gain a comrehensive insight of the difference among the six species. Due to the high dimension of the data, Principal Component Analysis (PCA) and t-stochastic neighboring embedding (t-SNE) were used to reduce the complexity of data, helping to visualize the difference.
Machine learning , as a popular technique in AI, has been introduced to various fields. Here, multinomial logistic regression (MLR), decesion tree (DT), random forest (RF), naive bayes classifier (NB) and support vector machine (SVM) were selected to build classifiers.
Results showed that SVM outperformed other classifiers with accuracy 100% in training, testing and mixed dataset. Based on this experiment, SVM and RF are suggested as recommended models.
https://www.wildlifeacoustics.com/resources/blog/oscillogram-vs-spectrogram-understanding-basic-sound-visualization-in-bioacoustics-research
https://rug.mnhn.fr/seewave/



