Lung diseases are serious threats to human health and life, therefore, an accurate diagnosis of lung diseases is significant. The use of artificial intelligence to analyze lung sounds can aid in diagnosing lung diseases. Most of the existing lung sound recognition methods ignore the correlation between the time-domain and frequency-domain information of the lung sounds. Additionally, the spectrograms used in these models do not adequately capture the detailed features of the lung sounds. This paper proposes a model based on wavelet feature enhancement and time-frequency synchronous modeling, comprising a dual wavelet analysis module (DWAM), a cubic network, and an attention module. DWAM in the model performed a dual wavelet transformation on the spectrograms to extract the detailed features of the lung sounds. The cubic network comprised multiple cubic gated recursive units to capture the correlation of the time-frequency of the lung sounds using the time-frequency synchronous modeling. The attention module, which includes temporal and channel attention, was used to enhance the time-domain and channel dimension features. In the combined dataset and the International Conference on Biomedical and Health Informatics 2017 dataset, the suggested framework outperforms existing models by more than 1.36% and 4.28%, respectively.