## 4 Experimental Results  
### CNN Model Performance Results  
This study used MFCCs for feature extraction, with the coefficient value set to 60. This value was chosen based on preliminary testing to balance computational efficiency and the richness of extracted features, capturing essential sound characteristics without overwhelming the model. For the training and testing processes of the emotional speech recognition system, a 5-fold cross-validation approach was adopted. Initially, labels were converted to numerical values using the LabelEncoder method, followed by applying one-hot encoding for use in the training process. The data were divided into 80% training and 20% validation subsets within each fold, ensuring that class balance was maintained throughout the process. Random_state = 0 was used to guarantee reproducibility, and the balanced distribution of samples across different classes in both training and validation sets was ensured. The CNN model architecture consisted of an initial convolutional layer with 32 filters of size \(5\times 5\) to capture local spatial patterns in the mel-spectrograms, followed by a ReLU activation function to introduce non-linearity and a max pooling layer of size \(2\times 2\) to reduce dimensionality. These hyperparameters were selected based on common values in the literature and validated by experimentation. The feature maps were then flattened into a one-dimensional vector, followed by a Dense layer with 128 neurons to fully connect the network and enhance the model's ability to learn complex sound features. To prevent overfitting, dropout layers with a dropout rate of 0.3 were applied, ensuring that the model does not learn noise or irrelevant patterns. Hyperparameters were determined according to the following criteria: the number of filters (32) was considered sufficient to capture essential features,  
similar trend, ranging from 52.7% to 90.9%, which demonstrates that the model generalized well as training progressed. Training loss varied from 2.27 to 0.16, while validation loss ranged between 1.42 and 0.38, indicating that the model learned effectively while avoiding overfitting due to the regularization techniques employed. As a result, the model trained with the selected hyperparameters achieved an accuracy of 90% on the test data. These results demonstrate that the chosen hyperparameters were suitable for the problem space and that the model performed effectively overall. As shown in Table 1, in individual sound categories, the model exhibited superior performance in recognizing distinct sounds such as car horn, engine idling, siren, and gunshot, with accuracy and F1-scores exceeding 95% for car horn and siren. These results suggest that these sounds have unique acoustic features, making them more easily distinguishable by the model. However, the accuracy and F1-scores for categories like children playing and dog bark ranged between 81% and 84%, indicating slightly lower performance. This discrepancy likely stems from overlapping frequencies or similar acoustic patterns with other sound types, which could lead to occasional misclassification. This observation is consistent with findings in the literature, where complex or less distinct sounds can be challenging for machine learning models. Overall, the CNN model's results were competitive compared to similar studies in urban sound recognition, showing that the chosen architecture and preprocessing steps were effective. The consistent macro and weighted F1-scores highlight the model's ability to perform uniformly across diverse categories, contributing to the broader goal of balanced classification in urban sound environments. These results demonstrate the potential of the CNN model within a fog computing architecture for efficient sound recognition in smart cities, though further testing with real-time data could provide additional insights into the system's practical applicability. The confusion matrix shown in Figure 4 reveals the model's tendencies to confuse different sound categories.