The research in the field of environmental sounds is a growing area due to its enormous potential and its applications. One of the major factors that affect the model performance is the noisy, redundant, or irrelevant features. Deep learning models have shown promise in this area, but the extraction of optimal features from audio signals and classification efficiency of the model are still challenging issues in this field. To address the challenges faced by existing methods, this research proposes a unique deep learning framework-based model that employs an enhanced bio-inspired algorithm for feature extraction and environmental sound classification. The quality and relevance of the training features are essential for the model’s accuracy, and a novel algorithm is introduced to select optimal features for improved performance. The algorithm is further improved for weight optimization to address overfitting and accuracy issues. Additionally, a modified version of the Discrete Fourier Transform is introduced to reduce computational complexity, which makes the model more suitable for real-time applications or resource-limited devices. This research emphasizes the necessity for improved algorithms for feature selection and weight optimization. The proposed model exhibits excellent accuracy and efficiency, making it suitable for real-time applications.