## 4 Training and Performance Evaluation of the CCBA Model
### Datasets and Pre-Processing Techniques  
This study utilizes three datasets for training and testing: UrbanSound8K, UrbanSoundPlus, and DCASE2016. UrbanSound8K [36] is a widely used urban sound dataset comprising 8732 labeled sound segments across ten categories, totaling 8 h and 45 min. The categories include air conditioners, car horns, children playing, dog barking, drilling, engine idling, gunshots, jackchammers, sirens, and street music. In this study, we down-sampled the dataset from its original sampling rate of 44.1 kHz to 8 kHz to match the sensor node's sampling rate. The sound segments were then concatenated into ten files based on their labels, and silent or mislabeled segments were manually reviewed and removed. After verification, the refined dataset lasts 7 h, 12 min, and 41 s. UrbanSoundPlus, introduced in the previous study [24], extends UrbanSound8K to better capture urban soundscapes by removing, merging, and adding classes. The additional sound effects were sourced royalty-free from [[https://pixabay.com/sound-effects/](https://pixabay.com/sound-effects/)]([https://pixabay.com/sound-effects/](https://pixabay.com/sound-effects/)), accessed on 16 February 2025). UrbanSoundPlus contains 13 categories: airplanes, air conditioners, car horns, children playing, construction, dog barking, gunshots, helicopters, rain, sirens, street music, traffic, and trains. After manual verification, the dataset totals 7 h, 6 min, and 39 s of audio. DCASE2016 [37] is another dataset used in numerous studies, comprising 15 scenes, which are beach, bus, cafe/restaurant, car, city center, forest path, grocery store, home, library, metro station, office, park, residential area, train, and tram. Similar to UrbanSound8K, the audio files in DCASE2016 were down-sampled from 44.1 kHz to 8 kHz, followed by manual verification, resulting in a total audio duration of 12 h and 50 min. This study aims to accelerate the classification process while maintaining high accuracy and robustness in noisy environments. As such, the classification accuracy in the presence of white Gaussian noise (WGN) is a critical evaluation metric. We generated datasets with SNRs of 0, 4, 8, 12, 16, and 20 dB by mixing WGN into clean audio signals to assess the robustness of the classification task. The choice of WGN is justified by two key factors. First,it aligns with our previous research [24], allowing for consistent performance comparison across classification systems. Second, WGN exhibits a flat power spectral density, which uniformly spans all frequencies, making it suitable for comprehensive system validation across the frequency spectrum. WGN was added to audio segments of 1.024 s to ensure precise SNR for each input, matching the input length of the classification systems. The SNR is calculated from the following formula:  
\[SNR=10\text{log}_{10}\frac{P_{s}}{P_{n}}, \tag{5}\]  
thus,  
\[P_{n}=\frac{P_{s}}{10^{\frac{SNR}{20}}}, \tag{6}\]  
where \(P_{s}\) is the power of the clean audio segment and \(P_{n}\) is the expected power of the WGN segment. Hence, the mixed audio segment is as follows:  
\[x=s+N\times\sqrt{\frac{P_{n}}{P_{N}}}, \tag{7}\]  
where \(s\) is the clean audio segment, \(N\) is the generated WGN segment, \(P_{n}\) is the expected power of the added WGN segment, and \(P_{N}\) is the real power of the generated WGN segment. For data pre-processing, we initially rescaled each dataset to ensure that the maximum absolute value was normalized to 1, as real-world sampled signals typically range between \(-1\) and 1. Subsequently, each dataset was divided into training, validation, and testing sets in an 8:1:1 ratio. Notably, the WGN-mixed datasets were only applied to the testing sets, allowing the classification system to be trained exclusively on clean audio. In contrast, testing was conducted on both clean and WGN-mixed signals. Finally, Z-score normalization was applied to the training set, with the mean and standard deviation from the training data used to normalize the validation and testing sets.