In this study, we identified the different causes of odor problems and their associated discomfort. We also recognized the significance of public health and environmental concerns. To address odor issues, it is vital to conduct precise analysis and comprehend the root causes. We suggested a hybrid model of a Convolutional Neural Network (CNN) and Transformer called the CNN–Transformer to tackle this challenge and assessed its effectiveness. We utilized a dataset containing 120,000 samples of odor to compare the performance of CNN+LSTM, CNN, LSTM, and ELM models. The experimental results show that the CNN+LSTM hybrid model has an accuracy of 89.00%, precision of 89.41%, recall of 91.04%, F1-score of 90.22%, and RMSE of 0.28, with a large prediction error. The CNN+Transformer hybrid model had an accuracy of 96.21%, precision and recall of 94.53% and 94.16%, F1-score of 94.35%, and RMSE of 0.27, showing a low prediction error. The CNN model had an accuracy of 87.19%, precision and recall of 89.41% and 91.04%, F1-score of 90.22%, and RMSE of 0.23, showing a low prediction error. The LSTM model had an accuracy of 95.00%, precision and recall of 92.55% and 94.17%, F1-score of 92.33%, and RMSE of 0.03, indicating a very low prediction error. The ELM model performed poorly with an accuracy of 85.50%, precision and recall of 85.26% and 85.19%, respectively, and F1-score and RMSE of 85.19% and 0.31, respectively. This study confirms the suitability of the CNN–Transformer hybrid model for odor analysis and highlights its excellent predictive performance. The employment of this model is expected to be advantageous in addressing odor problems and mitigating associated public health and environmental concerns.