# Tonal detectors repository
Tonal detectors for low frequency vocalization of whales
[![DOI](https://zenodo.org/badge/182302880.svg)](https://zenodo.org/badge/latestdoi/182302880)

Author: Léa Bouffaut, Ph.D. [Personal website](https://leabouffaut.home.blog) | [Researchgate](https://www.researchgate.net/profile/Lea_Bouffaut)

This work was conducted during my Ph.D. financed by the french Naval Academy (Institut de Recherche de l'Ecole Navale - Brest, France) and was also developed during my visit to the Center for Conservation Bioacoustics at the Cornell Lab of Ornithology - Cornell University, Ithaca (NY, USA). 


Methods are described and compared for the detection of low-frequency whale signals (Antarctic Blue Whale) in: 

L. Bouffaut, S. Madhusudhana, V. Labat, A. Boudraa and H. Klinck, “A performance comparison of tonal detectors for low frequency vocalizations of Antarctic blue whales,” accepted for publication for J. Acoust. Soc. Am. on Dec 31, 2019.

<b> Abstract:</b> Extraction of tonal signals embedded in background noise is a crucial step before classification and separation of low-frequency sounds of baleen whales. This work reports results of comparing five tonal detectors, namely the instantaneous frequency estimator, YIN estimator, harmonic product spectrum, cost-function, and ridge detector. The comparisons, based on a low-frequency adaptation of the <i>Silbido</i> scoring feature, employ five metrics which quantify the effectiveness of these detectors to retrieve tonal signals having a wide range of signal to noise ratios (SNRs) and the quality of the detection results. Ground-truth data were generated by embedding 10 synthetic Antarctic blue whale (<i>Balaenoptera musculus intermedia</i>) calls in randomly-extracted 30-minute noise segments from a 79~h-library recorded by an Ocean Bottom Seismometer (OBS) in the Indian Ocean during 2012-2013. Monte-Carlo simulations were performed using 20 trials per SNR, ranging from 0 dB to 15 dB. Overall, the obtained tonal detection results show the superiority of the cost-function and the ridge detectors, over the other detectors, for all SNR values. More particularly, for lower SNRs (≤ 3 dB), these two methods outperformed the other three with high recall, low fragmentation, and high coverage scores. For SNRs ≥ 7 dB, the five methods performed similarly.

# Methods implemented (Matlab functions)
1. <b> Instantaneous frequency estimator</b>, based on Boashash, "Estimating and interpreting the instantaneous frequency of a signal. II. algorithms and applications," Proc. of the IEEE 80(4), 540-568 (1992) doi: 10.1109/5.135378.

1. <b> YIN estimator</b>, based on A. De Cheveigné and H. Kawahara, "YIN, a fundamental frequency estimator for speech and music," J. Acoust. Soc. Am. 111(4), 1917-1930 (2002) doi: 10.1121/1.1458024.

1. <b> Harmonic product spectrum</b>, A. M. Noll, "Pitch determination of human speech by the harmonic product spectrum, the harmonic sum spectrum, and a maximum likelihood estimate," in Symposium on Computer Processing in Communication, ed., University of Brooklyn Press, New York, Vol. 19, pp. 779-797 (1969).

1. <b> Cost-function-based detector</b>, based on M. F. Baumgartner and S. E. Mussoline, "A generalized baleen whale call detection and classification system," J. Acoust. Soc. Am. 129(5), 2889-2902 (2011) doi: 10.1121/1.3562166.

1. <b> Ridge detector</b>, based on S. K. Madhusudhana, "Automatic detectors for underwater soundscape measurements," Ph.D. thesis, Curtin University, 2015.

* <i> An additional function is added to allow SNR-control on simulations.</i>

![Illustrations of the detectors on ABW calls](https://github.com/leabouffaut/tonal_detectors/blob/master/Figure3.png)