A Pig Cough Sound Recognition Method Based on CNN-BiLSTM
FU Xiaopeng
ZHOU Xin
WANG Xingbo
XU Xing
WU Yue
XIE Ronghui
SHAN Ying
YE Chunlin
ZHOU Weidong
Abstract:Respiratory diseases are one of the common and frequently-occurring diseases in large-scale pig farms.Timely and accurate detection of typical clinical symptoms of coughing in pigs is crucial for early warning and prevention.This study taked the sounds of coughing,squealing,and snoring of mid-pregnancy sows as the research object and proposed a pig cough sound recognition model based on the fusion of convolutional neural network and bidirectional long short-term memory network(CNN-BiLSTM).The pig sounds data was preprocessed through methods such as fourth-order Butterworth band-pass filtering for noise reduction,first-order high-pass filtering for pre-emphasis,and short-time energy endpoint detection.The Mel frequency cepstral coefficients(MFCC)feature parameters of the preprocessed sound data were extracted using methods such as framing,windowing,and fast Fourier transform,and the model recognition performance was evaluated.The results showed that the fourth-order Butterworth band-pass filter for noise reduction could significantly reduce the background noise of pig coughing,squealing,and snoring sounds,without distorting the waveform and retaining the main energy of the pig sound signal.The first-order high-pass filter for pre-emphasis could significantly enhance the energy in the high-frequency region,weaken the energy in the low-frequency region,and narrow the frequency range.Endpoint detection could quickly mark the effective speech segments of the pig sounds and reduce the interference of irrelevant information to the recognition model.The MFCC feature parameters extracted from the preprocessed sound data could well reflect the acoustic characteristics of the pig sounds,and the MFCC coefficients could be used as feature inputs for model recognition.The established deep neural network model of CNN-BiLSTM fusion had good convergence.The confusion matrix showed that the correct recognition rates of pig coughing,squealing,and snoring sounds were 83.67%,85.19%,and 81.58%respectively,and it had good generalization ability.The five-fold cross-validation showed that the average accuracy rate was 84.03%(82.79%—85.31%).The accuracy rate of the CNN-BiLSTM model on the test set was 83.93%,which was superior to the Transformer,CNN,LSTM,and BiLSTM models.Therefore,the CNN-BiLSTM model proposed in this study has good performance in recognizing pig coughing sounds and can provide a new method for the early detection of respiratory diseases in pigs.
Keywords:Pig cough soundsCNN-BiLSTM detection modelCharacteristic parametersConfusion matrixFive-fold cross-validation
Publication Date:2026-02-15
Online Publishing Date:2026-09-12(First online date of this platform, not the publication date of the document)
Pages:12( 144-155 )
Journal of Henan Agricultural Sciences

Journal of Henan Agricultural Sciences

ISTICPKU
ISSN:1004-3268
Year, Vol.(Issue):2026,55(2)