The present invention relates to sound recognition. More specifically, the present invention is concerned with a system and a method for sound recognition.
In environmental acoustics, it is often required to measure sound levels coming from an industrial site so as to conform to noise emissions regulations. Such sound monitoring campaigns are usually performed over several days or even continuously for a 24/7 conformity assessment.
During such monitoring campaigns, a range and number of sound events not coming from the target industrial site are recorded, such as for example bird sounds, cars passing by, etc. These extraneous sound events are manually removed from the recordings to selectively assess the targeted industrial site.
Manual masking operation is time consuming. Automatic sound event classification methods have been developed, based on using spectrogram image, that is the time-frequency representation of sound signals showing the time on the horizontal axis (X), the frequency of the sound on the vertical axis (Y) and the sound level on the color intensity (Z). Typically spectrogram processing comprises successive fast Fourier transform operations performed on short intervals short time intervals ranging between about 10 ms and about 50 ms (STFT for short-time Fourier transform). For instance, short time Fourier transform (STFT) using a time frame of 50 ms provides a spectral analysis with a 20 Hz frequency resolution, and the spectrum energy between 20 Hz and 20 kHz is divided in the frequency bins [20, 40, 60, 80, . . . 19920, 19940, 19960, 19980, 20000].
However, the human hear perceives sound frequencies in a logarithmic fashion, as opposed to in a linear fashion, thereby perceives a same tonal change between 200 Hz and 400 Hz and between 2000 Hz and 4000 Hz for example. The human hear perceives low frequency sounds, such as the sound of a truck pass-by for example, and high-frequency sounds, such as the sound of bird chirping for example, with the same tonal sensitivity even though the low-frequency range, in the range between about 20 and about 200 Hz, is much smaller on a linear scale than the high-frequency range, in the range between about 2000 and about 20000 Hz. On a logarithmic scale, these frequency ranges have a same bandwidth. Moreover the short time Fourier transform (STFT) is characterized by an unbalanced spectral energy density between low frequencies and high frequencies. For a broadband signal, the energy at low frequency is higher than the energy at high frequency energy because the energy content is spread over a smaller number of frequencies when expressed linearly. In addition, the short time Fourier transform (STFT) is characterized by an inherent time-frequency duality, which may be an issue when applied to wide band spectrogram processing. For instance a 20 Hz frequency resolution obtained using a 50 ms short time Fourier transform (STFT) is not fine enough to correctly identify low-frequency sounds, for which a finer resolution of about 1 Hz is needed. Such finer resolution may be obtained with an increase of the short time Fourier transform (STFT) interval to long time interval of about 1 s for example, which would average short transient sound events such as the bird chirps.
Thus, short-time Fourier transform (STFT) implies several fundamental limitations that have an effect on the quality of the resulting spectrogram images. In addition, the background noise, which may be high in the environment, has an important effect on the contrast of the sound events shown on the spectrogram images, may need to be removed from the spectrogram images to enhance the contrast of the sound events.
There is still a need in the art for a system and a method for sound recognition.
More specifically, in accordance with the present invention, there is provided a method for automatic for sound recognition, comprising a) raw spectrogram generation from a sound signal spectrum; b) wide-band spectrum determination; c) wide-band continuous spectrum determination; d) tonal and time-transient spectrum determination; wide-band continuous spectrogram and tonal and time-transient spectrogram determination; and) spectrogram image generation.
There is further provided a method for automatic for sound recognition, comprising a) raw spectrogram generation from a sound signal spectrum; b) wide-band spectrum determination; c) wide-band continuous spectrum determination; d) tonal and time-transient spectrum determination; e) wide-band continuous spectrogram and tonal and time-transient spectrogram determination; and f) spectrogram image generation; wherein step a) comprises using a fractional octave filter bank using a frequency-adapted band filter time response, yielding a filtered time-signal per frequency band; step b) comprises using a wide-band spectral envelope; step c) comprises applying an exponential percentile estimator on the wide-band spectrum; step d) comprises subtracting the wide-band continuous spectrum from the raw sound signal spectrum; step e) comprises accumulating the wide-band continuous spectrum into the wide-band continuous spectrogram and accumulating the tonal and time-transient spectrum into the tonal and time-transient spectrogram; and step f) comprises combining the wide-band continuous spectrogram and the tonal and time-transient spectrogram into spectrogram image frames.
Other objects, advantages and features of the present invention will become more apparent upon reading of the following non-restrictive description of specific embodiments thereof, given by way of example only with reference to the accompanying drawings.
In the appended drawings:
The present invention is illustrated in further details by the following non-limiting examples.
A method according to an embodiment of an aspect of the present disclosure as illustrated for example in
Audio signals recorded by field sound recorders may be transmitted to a web server for processing as described hereinabove, generating images to an artificial intelligence which returns the identification of the sound event. Alternatively, a self-contained system, such as a sound level meter equipped with an on-board processing unit performing the above steps, may be used.
The time signals of the audio records are spectrally processed using a fractional octave filter bank, using a band filter time response adapted to the frequency, namely faster at high frequency and slower at low frequency. The signal is thus decomposed into N octave fractional-octave subbands, an octave-band being a frequency band where the highest frequency is twice the lowest frequency (step 30).
The obtained logarithmic repartition of the spectrum frequencies results in a fine frequency resolution at low frequency and a broader resolution at high frequency, and a logarithmic bandwidth with respect to frequency, which balances the energy content between the low and high frequency ranges.
The original audio signal is thus split into N filtered time signals, N being the number of frequency bands. The energetic content of the band-filtered time signals is determined using an exponential average (step 40), as follows:
with y[n] an average result at sample n; x[n] the value of input sample n; and a an average weight determined as follows:
∝=e(−1/Fs·τ)
with Fs the sampling frequency in Hertz, and τ a time constant in seconds. A frequency-adapted time constant τ is selected to adjust for each frequency band signal, as follows:
with Fh an octave fraction filter upper cutoff frequency in Hertz, Fl an octave fraction filter lower cutoff frequency in Hertz, and Fc an octave fraction filter center frequency in Hertz.
The time constant τ is thus longer at low frequency and shorter at high frequency. For instance for a 1/24 octave band filter centered on 50 Hz the time constant is 0.4 s, whereas for a 1/24 octave band filter centered on 5000 Hz the time constant is 0.0018 s.
Then, the characteristics of the recorded sound event are determined, based on frequency tones, that is frequency peaks in the spectrum, and temporal transitions, that is peaks or sharp transitions in time. A whistle or a bird call are examples of sound events with strong tonal features, while a door slam or a gunshot are examples of sound events with strong temporal transients. The method comprises monitoring the tonal emergences and the temporal emergences of a sound with respect to the wide-band continuous background noise.
The wide-band continuous spectrum of the background noise is determined using a wide-band spectral envelope (step 50) and an exponential percentile estimator applied on the thus determined wide-band spectrum (step 60).
A spectral envelope fitting the lower boundary of the spectral properties of the row spectrum of the sound event in time is selected as representation of the general shape of the spectrum tones. The spectral envelope is determined using a cubic spline by weighting frequency dips more than frequency peaks in the spectrum curve, thereby allowing identifying the wide-band component of the spectrum.
The cubic spline is determined by minimizing the following relation:
where p is a spline balance or ratio between fit and smoothness, controlling the trade-off between fidelity to the data and roughness of the function estimate; w is a weight between 0 and 1 of every value of [y]; and f is a spline relation.
The wide-band envelope spline curve is determined using a first, very smooth, spline curve representing mostly the center of the spectrum, and a second spline curve focusing on the local minima of the spectrum for representing the wide-band background noise. The first curve is defined using a unitary weight w1=1 for all points and a low spline balance, for example p1=0.0001; the second curve is defined using a unitary weight w2=1 for all points lying below the first spline curve and a very low weight, such as w3=0.00001 for example for every point lying above the first spline curve, and a higher spline balance p1>p1, for example p2=0.001. The values of the spline weights and spline balances are selected depending on the nature of the sound spectrum used as input and target fitting.
In an embodiment of an aspect of the present disclosure, the percentiles are obtained using an asymmetrical weight exponential average as a percentile estimator, expressed as follows:
where y[n] is the average result at sample n; x[n] is the value of input sample n; and a is an average weight, determined as follows:
∝=e(−1/Fs·τ)
where Fs is the sampling frequency in Hertz and τ is the time constant in seconds. The value of the time constant τ is selected with respect to the current input value x[n]. A first time constant τH is selected if the current input value is greater than or equal to the previous average and a second time constant τL is selected if the current input value is lower than the previous average, as follows:
Values of τH and τL are determined according to the desired percentile p between 0 and 1 and the apparent window duration T in seconds as follows:
τH=p2×T
τL=(1−p)2×T.
For instance, for a desired percentile p of L95% with a 10 s apparent window duration τH=9.03 s and τL=0.025 s.
The thus obtained wide-band continuous spectrum is accumulated into a wide-band continuous spectrogram (step 70).
The temporal transients associated with the sound events are identified using the time continuous background noise determination using exponential percentile estimator. The identification of tonal and time transient features is performed by comparing the current spectrum to the wide-band continuous background noise spectrum (step 60). As part of the present disclosure, it was shown that a wide-band continuous signal such as a pink noise shows a small but significant tonal and time variance, especially when the observation interval is short, in the range between about 10 ms and about 50 ms. This residual tonal and time variance implies a tonal and time emergence from the wide-band continuous background noise of approximately 10 dB. In the present method, any spectrum feature that emerges more than 10 dB from the wide-band continuous background noise spectrum is considered a tonal peak or a time transient. Thus, the spectrum of tonal and time transient emergences is obtained by the subtraction of the wide-band continuous background noise spectrum from the raw spectrum shifted up by 10 dB (steps 65, 80 in
The thus obtained tonal and time-transient spectrum is accumulated into a tonal and time-transient spectrogram (step 90).
The tonal and time-transient spectrogram shows the features of sound events such as a bird call, human speech, a car pass-by, a door slam, etc. In an embodiment of an aspect of the present disclosure, the tonal and time-transient spectrogram image is generated using a 10 dB dynamic on the raw spectrum from 0 dB to +10 dB for example, thereby clipping strong emergences of more than 10 dB, which allows to imprint an almost binary spectrogram enhancing the contours of the tonal and time-transient features of the spectrogram. The result is an almost white fingerprint on a black background. The specific value of the desired dynamic range may be different than the 10 dB value used herein, the value of 10 dB was determined arbitrarily to produce images with contrasting image features.
The wide-band continuous spectrogram allows identification of sound events in absence of tonal or time transient features, such as in the case of wind blowing or a distant highway for example. Although not characterized by tonal nor temporal features, such types of sound events are identified by the shape of the wide-band continuous background noise. When generating the wide-band continuous background noise spectrogram image by normalizing the wide-band continuous background noise energy to the raw spectrogram using with a dynamic of 40 dB, the wide-band continuous spectrogram image is essentially black in cases of strong tonal and time-transient emergences, because it is below the 40 dB dynamic range. In cases of low or absent tonal and time-transient emergences, the wide-band continuous spectrogram image value is higher, and appears brighter. The specific value of the desired dynamic range can be different than the 40 dB value used herein. The value of 40 dB was determined arbitrarily to allow a good balance between the discrimination of wide-band continuous spectrogram when tonal and time-transient are present and a good representation of the wide-band continuous spectrogram when tonal and time-transient are absent.
The obtained tonal and time-transient spectrogram and wide-band continuous spectrogram, instead of the raw spectrogram, are used for the spectrogram image generation (step 100)), by generating spectrogram images composed of a short interval series of spectra, with intervals in the range between about 10 ms and about 50 ms (step 110).
In step 110, the wide-band continuous spectrogram and the tonal and time-transient spectrogram are then combined into spectrogram image frames. The images are analyzed using two channels. A first channel, for example green, is used to store the wide-band continuous spectrogram and a second channel, for example blue, to store the tonal and time-transient spectrogram. The use of these colors is arbitrary and does not have an impact on the end result. Red and green may be selected for example, with the same result, as illustrated in
As people in the art will now be in a position to appreciate, the present method overcomes shortcomings inherent to short time Fourier transform (STFT) in spectral analysis by using an octave fraction filter bank. The energetic content of each band filtered signals is determined from the root mean square (RMS) average by selecting a window duration shorter than the band frequency at high frequency and longer than the band frequency at low frequency (step 40), thereby preventing discontinuities in the time series while effective from a computational point of view, in contrast to using a window duration selected on the basis of the duration of the interval at which the signal is to be sampled. In the latter case, a 50 ms window root mean square (RMS) average for instance is processed every 50 ms to get a time series, which fails to take into account the period of the signal under analysis, and may thus result in a variance problem, since a window of 50 ms on a 100 Hz signal only contains 5 signal periods in the analysis window whereas the same window duration contains 500 periods when analyzing a 10 kHz signal frequency, and as a result, the lower frequency root mean square (RMS) time history does not present the same variance than the high frequency root mean square (RMS) time history. The spectral envelope describing the general shape of the spectrum tones is selected to describe the lower boundary of the spectral properties of the original spectrum, thereby allowing identifying the wide-band component of the spectrum or spectrum floor (steps 50, 60;
In the present method, spectrogram images composed of a short interval series of spectra, with intervals in the range between about 10 ms and about 50 ms using only the tonal and time-transient and the wide-band continuous spectrograms are used for the spectrogram image generation.
For combining the of wide-band continuous and the tonal and time-transient spectrograms images, in the present method, a first channel is used to store the wide-band continuous spectrogram and a second channel is used to store the tonal and time-transient spectrogram for analysis of the images, as opposed to methods comprising analyzing images separately on their three constituent channels, namely red, green and blue (RGB) or hue, saturation and value (HSV) and using these three channels to store different aspects of the spectrogram to analyze, for example in cases of sound events, such as wind blowing or a distant highway for example, which are not characterized by any tones or time-transients, and for which the tonal and time transient spectrogram image is almost black and the wide-band continuous spectrogram image is bright and becomes significant to determine the nature of the sound.
There is thus provided a method for automatic for sound recognition, comprising using a fractional octave band spectrum for spectrogram generation; using a wide-band spectral envelope to determine the wide-band background spectrum; using an exponential percentile estimator on the wide-band spectrum to determine the wide-band continuous background spectrum; subtracting the wide-band continuous spectrum from the raw spectrum to obtain the tonal and time-transient spectrum; and combining the wide-band continuous spectrogram image and tonal and time-transient spectrogram image to be used in an image recognition algorithm.
The use of a fractional octave-band filter bank to generate the sound spectrum results a logarithmic repartition of frequencies and overcomes inherent problems of short time Fourier transform (STFT). This logarithmic mapping allows a fine frequency resolution at low frequency and a broad resolution at high frequency. The obtained logarithmic bandwidth with respect to frequency allows balancing the spectrum energy between low and high frequencies and a time response adapted to the frequency band, namely slow at low frequency and fast at high frequency.
The use of a frequency-adapted exponential average allows overcoming variance issues associated with a fixed duration average while still offering a fast computation time.
The combined use of a wide-band spectral envelope and an exponential percentile estimator allows accurately characterizing the wide-band continuous background noise spectrum, which in turn allows accurately identifying the tonal and time-transient spectrum, which is determinant in the identification of sound events.
The combination of the wide-band continuous spectrogram image and the tonal and time-transient spectrogram image in a single image results in high value data to the image classification algorithm. The tonal and time-transient spectrogram image provides a fingerprint of the dominant features of a sound event; and the wide-band continuous spectrogram image supplies relevant information for sound events that do not contain any tonal or time-transient features. The dynamic properties of both spectrogram images allow discrimination between wide-band continuous events and tonal and time-transient events. The spectrogram image processing used to generate both spectrogram images minimizes non-relevant information contained in the raw spectrogram image that may otherwise slow down or interfere with efficiency and accuracy of the image classification algorithm.
The background noise is thus removed from the spectrogram image to enhance the contrast of the sound events and the spectrogram image value is improved by a selected combination and sequence of signal processing steps. The presently disclosed spectrogram image processing allows selective identification of complex sound events which are harder to identify.
The scope of the claims should not be limited by the embodiments set forth in the examples, but should be given the broadest interpretation consistent with the description as a whole.
This application claims benefit of U.S. provisional application Ser. No. 63/018,789, filed on May 1, 2020. All documents above are incorporated herein in their entirety by reference.
Number | Name | Date | Kind |
---|---|---|---|
243696 | Faloon | Jul 1881 | A |
5361305 | Easley et al. | Nov 1994 | A |
5631566 | Person et al. | May 1997 | A |
7117149 | Zakarauskas | Oct 2006 | B1 |
7911353 | Bedingfield | Mar 2011 | B2 |
9060218 | Itou | Jun 2015 | B2 |
9565504 | Miyata et al. | Feb 2017 | B2 |
11386916 | Markovic | Jul 2022 | B2 |
11404074 | Kirsch | Aug 2022 | B2 |
20210277564 | Mashal | Sep 2021 | A1 |
Entry |
---|
Karol J. Piczak, Environmental Sound Classification With Convolutional Neural Networks, 978-1-4673-7454-5/15, © 2015 IEEE. |
Venkatesh Boddapati et al., Classifying environmental sounds using image recognition networks, 1877-0509 © 2017 The Authors. Published by Elsevier B.V. |
Yuma Sakashita et al., Acoustic Scene Classification By Ensemble of Spectrograms Based on Adaptive Temporal Divisions, Detection and Classification of Acoustic Scenes and Events 2018, Challenge. |
G Jawaherlalnehru et al., Music Instrument Recognition from Spectrogram Images Using Convolution Neural Network, International Journal of Innovative Technology and Exploring Engineering (IJITEE) ISSN: 2278-3075, vol. 8 Issue-9, Jul. 2019. |
Lianhao Qiao et al., Sub-Spectrogram Segmentation for Environmental Sound Classification via Convolutional Recurrent Neural Network and Score Level Fusion, arXiv:1908.05863v1 [cs.SD] Aug. 16, 2019. |
Quang Trung Nguyen, et al., Speech classification using SIFT features on spectrogram images, Vietnam J Comput Sci (2016) 3:247-257, DOI 10.1007/s40595-01 6-0071-3, © The Author(s) 2016. This article is published with open access at Springerlink.com. |
W.B. Hussein et al., Spectrogram Enhancement by Edge Detection Approach Applied to Bioacoustics Calls Classification, Signal & Image Processing : An International Journal (SIPIJ) vol. 3, No. 2, Apr. 2012. |
Number | Date | Country | |
---|---|---|---|
20210343309 A1 | Nov 2021 | US |
Number | Date | Country | |
---|---|---|---|
63018789 | May 2020 | US |