Speech emotion recognition is an important research area in artificial intelligence aimed at identifying the emotional states of speakers. This paper provides an overview of the current state and key algorithms of speech emotion recognition, focusing particularly on the emotional well-being of elderly residents in nursing homes. Firstly, the paper introduces the background and application areas of speech emotion recognition, emphasizing its significance in human-computer interaction, psychological health monitoring, and emotional intelligent systems. The paper extensively discusses methods of extracting emotional features, it adopts the K-Nearest Neighbors (KNN) classification algorithm, which serves as a simple yet effective classification method with potential in emotional speech recognition. This study aims to explore the design, implementation, and future directions of an emotion recognition system based on KNN. This algorithm exhibits a high fitting performance for emotional speech data, presenting advantages such as ease of implementation and alignment with the distribution characteristics of emotional speech data. Through multiple comparative experiments, the optimal K value for recognition has been determined, achieving a straightforward and convenient emotional recognition simulation. Finally, the paper summarizes the current state of speech emotion recognition, emphasizing its potential and significance in practical applications.