The animal’s cry largely reflects its physical state, while the pig’s different sound signals reflect its current physiological health and emotional state. In this paper, the pig cough is taken as the recognition object. First, the time domain and frequency domain of the pig call signal are analyzed, and the hardware system of pig audio acquisition is built. Then, the collected pig audio information is denoised. The live pig voice endpoint detection adopts the double threshold endpoint detection method, and then uses Mel frequency cepstrum coefficient to extract the features of the live pig audio signal. In the recognition of the pig cough, the hidden Markov model is used to improve the recognition accuracy and efficiency through machine learning. The experimental results show that the recognition method described in this paper can accurately identify the pig cough sound.