## 3 Environmental Noise Database
### Automatic Contextual SNR Labelling of Anomalous Noise Events  
One important issue regarding the design of machine hearing systems able to automatically detect specific sound events in real-life environments is the consideration of the sound events salience in relation to background noise. This information, which complements the audio event label, is key to determining which ANEs should be entirely removed from the subsequent computation of road traffic noise levels for the problem at hand. In this section, we describe the automatic process developed to measure the ANE salience computed following a signal-to-noise ratio scheme. Specifically, the contextual SNR of each ANE is estimated by computing an A-weighted equivalent noise level (\(LA_{eq}\)) using the free Matlab \"Continuous Sound and Vibration Analysis\" toolbox developed by [PERSON] ([[https://es.mathworks.com/matlabcentral/fileexchange/21384-continuous-sound-and-vibration-analysis](https://es.mathworks.com/matlabcentral/fileexchange/21384-continuous-sound-and-vibration-analysis)]([https://es.mathworks.com/matlabcentral/fileexchange/21384-continuous-sound-and-vibration-analysis](https://es.mathworks.com/matlabcentral/fileexchange/21384-continuous-sound-and-vibration-analysis))), considering a 30 ms integration time to be in concordance with the feature extraction process [11]. The contextual SNR is computed from the difference between \(LA50\), 30 ms (the median \(LA_{eq}\) level) within the ANE region and the \(LA50\), 30 ms level of the surrounding background or road traffic noise region. For the latter, two \(LA_{eq}\) measurements are made: one before the start point of the anomalous event (referred to as left measurement), and another after the end point of the event (called right measurement). When possible, the sum of the lengths of the intervals where these two measurements are made should equal the duration of the anomalous noise event in order to have equivalent statistical data. For illustration purposes, let us define \(T_{L}\) as the duration of the closest BCK or RTN region before the beginning of the ANE. Analogously, \(T_{R}\) is defined as the duration of the closest BCK or RTN region after the end of the ANE. Let us also define \(T_{1}\) and \(T_{2}\) as the durations of the two BCK or RTN regions considered to compute the corresponding median \(LA_{eq}\) (\(T_{1}\) for the background or traffic noise before the ANE start and \(T_{2}\) for the background or traffic noise after its end). From the previous definitions, it can be derived that \(T_{L}\leq T_{1}\) and \(T_{R}\leq T_{2}\). The general aim of the proposed approach is to obtain two BCK or RTN \(LA_{eq}\) representative enough computation regions, e.g., assuring that \(T_{1}+T_{2}\) could be equal to the anomalous noise event total duration (\(T_{ANE}\)). When this condition cannot be accomplished, only the available samples of background and/or road traffic noise are used. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Label** & **\# Files in Rome** & **\# Seconds in Rome** & **\# Files in Milan** & **\# Seconds in Milan** \\ \hline RTN & 238 & 16,496 & 613 & 11,600 \\ BCK & 0 & 0 & 286 & 2307 \\ ANE & 261 & 543 & 711 & 1932 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Summary of the labels distribution and total durations of recorded audio databases for both urban and suburban scenarios (Rome and Milan). Two case studies have been taken into account to implement the ANE contextual SNR computation:  
* **An anomalous noise event is surrounded by road traffic or background noise:*
* This represents the majority of cases in both urban and suburban real-life environmental databases.