In recent years, applications of Internet of Things become more popular. This study aims to prevent from danger by detecting the sound of door knocking and alarm clocks. This study utilizes the microphone of an Android smartphone to collect the sound, and uses the MQTT (Message Queuing Telemetry Transport) protocol to transfer the data to a Web server for immediate sound recognition. The detection technique is based on MFCC (Mel Frequency Cepstral Coefficients) to extract feature data and GMM (Gaussian mixture model) to train the data. As a result, the real-time surrounding sound detection system can effectively recognize the knock on the door and the alarm going off. Most importantly, the user can use Restful APIs to start the detection function and monitor sound events.