## 4 A Cascade Approach  
Urban environments present a rich acoustic context, where many types of sounds can coexist. Traffic noise or the sounds generated by other human activities present a large variety, which might not be properly described in a standalone dataset. Datasets such as ESC-50 [17] present up to 50 different categories of urban noises. Trained classifiers recognizing such number of categories have been shown to achieve relatively low accuracy in recognizing sounds [1; 34]. The proposed cascade approach intends to solve such limitation. It consists of a multi-stage classifier such as the one depicted in Figure 2. The audio features are extracted and processed in a two-stages classifier. The first stage classifies the sound in one of the _supercategories_, which correspond to one particular dataset. The second stage uses the same features to determine the category of the sound in the dataset selected in the first stage. This cascade approach enables the use of different types of classifiers at each stage and for each _supercategory_ or dataset. Therefore, while the first stage is composed of one single classifier, the second stage is composed of multiple and potentially different types of classifiers trained for each _supercategory_ or dataset. The main advantages of this approach are:  
* Different classifiers can coexist in the same system. The optimal classifier is selected based on the recognized sound. * A multi-stage approach enables the parallel execution of the classifiers. This would lead to a faster sound recognition when exploiting multi-thread or pipeline capabilities of the system. * Moreover, factors such as their execution time or even power consumption, both critical parameters on embedded systems, can be also considered in the selection of the active classifiers. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Name** & **Language** & **Description** \\ \hline pyAudioAnalysis [19; 20] & Python & Audio Feature Extraction and Classification \\ Yaafe [21] & Python & Audio Feature Extraction \\ Essentia [18; 22] & C++ & Audio Feature Extraction and Classification \\ audio [23] & C & Audio Feature Extraction \\ CLAM [24] & C++ & Audio Feature Extraction \\
**LibROSA**[25; 26] & **Python** & **Audio Feature Extraction** \\ Matlab Audio Analysis Library [27] & Matlab & Audio Feature Extraction and Classification \\  & & Audio-Specialized library for automatic \\ PyCASP [28; 29] & Python & mapping of computations onto \\  & & GPUs or multicore CPUs. \\ seewave [30] & R & Audio Feature Extraction \\ bob [31; 32] & C++/Python & Audio Feature Extraction and Classification \\ \hline \hline \end{tabular}
\end{table} 
Table 2: List of some libraries for audio analysis. The selected library is highlighted in bold. The cascade approach demands the creation of hierarchical datasets, which can be composed of tens of categories. Figure 3 depicts one example of such hierarchical dataset. The training for the first-stage classifier is done by treating each _supercategory_ or dataset as a single dataset category. For instance, categories 1 to 4 of the Dataset 1 in Figure 3 would be considered as one category when training the first-stage classifier. The same approach is applied for the other _supercategories_ or datasets. In order to preserve the accuracy, each _supercategory_ or dataset must be specialized, containing categories belonging to specific types of sounds. More details about how to build such hierarchical dataset is provided in Section 5.4.1. A similar approach has been presented as a part of the challenge proposed for the Workshop on Detection and Classification of Acoustic Scenes and Events (DCASE) [35]. The competitors have to perform a course-grain and/or a fine-grain sound recognition of a two-stage hierarchical dataset composed of seven datasets and a total of 23 categories of urban sounds recorded by the SONYC project [9].