Advances in Social Science and Culture ISSN 2640-9682 (Print) ISSN 2640-9674 (Online) Vol. 7, No. 5, 2025 www.scholink.org/ojs/index.php/assc 129 Original Paper Design Of Voice Control System For Smart Home Yuyue Xiao1 1Kaili College,School of Big Data Engineering, China Project Source Kaili University Youth Research Project: Research on Rapid Charging Methods for Automotive Lithium-Ion Batteries (2025YB024). Received: August 29, 2025 Accepted: October 08, 2025 Online Published: October 25, 2025 doi:10.22158/assc.v7n5p129 URL: http://dx.doi.org/10.22158/assc.v7n5p129 Abstract This paper introduces a smart home system utilizing the STM32 microcontroller as the core control board.The system integrates voice recognition and text-to-speech modules with photoelectric and temperature-humidity sensors to monitor environmental parameters. When specific conditions are detected,the system converts the user’s voice commands into corresponding actions,enabling peripheral device operations. This achieves precise temperature/humidity monitoring and light detection through voice recognition, allowing users to activate daily appliances like lighting, air conditioning,and curtains.With high recognition accuracy,stable performance,and accurate data collection, the system significantly enhances daily living quality. Its broad applicability makes it the ideal choice for realizing smart home solutions. Keywords smart home, STM32 microcontroller, voice recognition, voice control system 1. Research Background Home appliances are essential facilities in every household. With the rapid advancement of science and technology, home appliances have undergone tremendous changes to keep up with the times,bringing smart homes into the public eye. As a concrete manifestation of intelligent development in developed cities, smart homes are centered around the family and are created by integrating advanced technologies such as the Internet,the Internet of Things, and big data. Smart homes originated in the United States in the 1980s, and soon after, developed countries such as those in Europe and Asia began to introduce and use them. Compared to these developed countries, China saw the emergence of smart homes later, but with the continuous development and expansion of China’s Internet technology, www.scholink.org/ojs/index.php/assc Advances in Social Science and Culture Vol. 7 No. 5, 2025 Published by SCHOLINK INC. 130 Internet of Things technology, and communication technology,smart homes have achieved a qualitative leap in China. The realization of smart homes is based on Internet and Internet of Things technologies, achieving home intelligence by effectively connecting homes with the network. This article focuses on the intelligent voice recognition control system in smart homes.The voice recognition control mechanism integrates a speech recognition module (Xie & Liu, 2021) and a text-to-speech module, which process commands and relay them to the processor for specific operations to achieve home automation. The system primarily uses an STM32 microcontroller as the core control board, with photoelectric sensors, temperature/humidity sensors, and relays as key components to collect environmental parameters like temperature, humidity, and light intensity. By effectively combining voice recognition modules, text-to-speech conversion, and voice-to-action functions, it enables precise command execution. The intelligent voice recognition control represents a groundbreaking advancement that breaks through traditional limitations, delivering innovative experiences for modern lifestyles. Speech recognition technology (Xue, 2020) has made remarkable progress in the past two decades.Speech recognition originated in the 1950s and 1960s, when research in this field was mainly focused on specific subjects and small vocabularies, with little substantial progress. In the 1980s,the main research areas gradually expanded, beginning to focus on large vocabularies, multiple subjects,and continuous speech. At that time, speech recognition algorithms included linear predictive coding,dynamic programming, and others. Although these algorithms achieved certain successes, they remained confined to laboratory settings and were not applied in practice. It was not until the 1990s that speech recognition entered the public eye and gained widespread recognition. China’s research in speech recognition began in 1958. Although it started later than other developed countries, through continuous innovation and development, China has nearly caught up with developed nations in recent years.Intelligent speech technology has seen significant innovations across various fields, from the use of signal algorithms to the continuous updating of application scopes and scenarios. In 2020, the scale of China’s intelligent industry reached a massive size, exceeding 20 billion yuan, a year-on-year increase of 21.91% compared to 2019. It is expected that in the next decade, intelligent voice recognition will cover multiple fields such as home appliances, industry, automobiles, healthcare, households, and education. Many intelligent products have already been well applied in households, and voice control is gradually reshaping people's understanding of smart homes. Applying voice control technology to smart homes will become the main channel for future enterprise and market development. The intelligent voice industry will also continuously improve product quality, aiming to optimize product quality and enhance user experience. In the future,the continuous enrichment and improvement of various digital industries in China, such as smart homes, smart offices, and autonomous driving, will rely on intelligent voice systems. In the wave of IoT intelligence,the smart voice industry has emerged as a rapidly growing sector,driving social progress and technological innovation. This research project aims to develop a www.scholink.org/ojs/index.php/assc Advances in Social Science and Culture Vol. 7 No. 5, 2025 Published by SCHOLINK INC. 131 voice-controlled smart home system where users can effortlessly command devices like curtains, TVs, and air conditioners through voice commands to turn them on/off, adjust volume levels, and perform other functions. Research in smart home voice technology has not only enriched people’s material lives but also subtly transformed their spiritual dimensions,including cognitive development and knowledge acquisition. Breakthroughs in internet, computing, communication, and biotechnology have revolutionized lifestyles and experiences. However, current intelligent voice technology still faces challenges, with both algorithms and hardware requiring significant refinement and enhancement. 2. System Architecture Composition 2.1 Basic Principles This smart home voice control system is built around the STM32F103C6T6 microcontroller as its core module,with subsystems including voice recognition,text-to-speech conversion, sensor modules,and infrared receivers. The environmental sensors monitor temperature, humidity, and light intensity, collecting real-time data that is transmitted to the STM32F103C6T6. When these parameters exceed or fall below preset thresholds, the system automatically announces instructions through voice prompts and controls devices like curtains,air conditioners,and temperature/humidity regulators via relays.The voice recognition module processes commands accurately, while the microcontroller decodes and executes instructions to control appliances such as lighting,air conditioning, and curtains.Voice announcements provide event reminders through the voice module. 2.2 Main Functions This study aims to implement voice recognition and control in smart homes. Users issue commands through voice input,which the AI-powered voice module processes and interprets. The system collects environmental parameter s (temperature, humidity) via sensors and triggers an audible alert if readings exceed preset thresholds. Simultaneously, it transmits signals to the main control module, which automatically adjusts appliances like air conditioners,curtains,and lighting through relays. When a human presence is detected by the infrared obstacle sensor, the system automatically announces a welcome message. Users interact via a question-and-answer format: commands are recognized by the voice system, which then provides instant feedback. Key functionalities include: (1) Speech Recognition and Annunciation Function: The system’s speech recognition and announcement functions are implemented through its dedicated speech recognition module,which serves as the core component for all voice processing operations including recognition, playback, and text-to-speech conversion. Users can issue commands at any time. The AI-powered speech recognition module processes voice signals via the SU-03T chip, extracting keywords, performing spectral analysis, and accurately interpreting commands before transmitting processed signals to the microcontroller. Voice announcements are generated through the SYN8266 text-to-speech module, converting sensor-collected data parameters (temperature/humidity, light intensity) into audible www.scholink.org/ojs/index.php/assc Advances in Social Science and Culture Vol. 7 No. 5, 2025 Published by SCHOLINK INC. 132 messages. (2) Data acquisition:Utilizing ZigBee and WIFI technologies,the system collects environmental data through temperature and humidity sensors, photoresistors for light intensity monitoring, and infrared sensors for door status detection. 2.3 System Architecture This smart home voice control system consists of a microcontroller main control module,voice recognition module, text-to-speech module,temperature-humidity sensor, stepper motor driver module,relay circuit module, and infrared detection module. The voice module handles audio reception and recognition. The SYN8266 text-to-speech module converts sensor-collected temperature, humidity, and light intensity data into voice announcements for users. The DHT11 temperature-humidity sensor monitors environmental conditions and transmits data to the main control module for processing. The stepper motor driver module simulates curtain opening/closing operations. The HK4100F-DC3V-6 relay in the relay module powers high-voltage household appliances, enabling air conditioner activation/deactivation and temperature adjustment. A photoresistor detects light intensity to determine optimal curtain operation timing. The system collects environmental data through light sensors,infrared obstacle sensors,and temperature-humidity sensors,then transmits this information to the main control unit.The voice announcement module automatically reports whether the environmental data is too high or too low. When a user returns home, the infrared obstacle sensor detects their presence, triggering the voice announcement module to broadcast “Welcome home!” The voice recognition module identifies user commands and matches them against the system’s command list.After verification by the main control module,the system automatically announces the corresponding data through the voice announcement module. 2.4 Main Modules 2.4.1 Microcontroller Main Control Module This article’s smart home voice control system employs the STM32F103C6T6 microcontroller as its core module. The STM32F103 series, developed by STMicroelectronics, is a widely used 32-bit microcontroller processor in mid-to-low-end applications, particularly in medical devices,air conditioning systems, LED control, and motor drive systems. Featuring 32-bit architecture, 72MHz clock speed, and 256KB memory capacity, the STM32F103C6T6 delivers exceptional stability, reliability, interference resistance, low power consumption, and high-speed performance. The control module is built around the minimal system (Jia, 2018). 2.4.2 Voice Recognition and Playback Module The system primarily utilizes the SU-03T voice recognition module. First, relevant commands are programmed into the chip,which then performs spectral analysis on corresponding signals to extract key features.These features are matched against internal keyword databases, with the most accurate command being sent to the microcontroller. The command list includes: “Turn AC on/off”, “Turn www.scholink.org/ojs/index.php/assc Advances in Social Science and Culture Vol. 7 No. 5, 2025 Published by SCHOLINK INC. 133 lighting on/off”, “Open/curtain”, “What’s the temperature today?”, and “What’s the humidity today?”. Voice prompts include: “Welcome home!”, “Temperature too high/low”, “AC turned on/off”, “Curtain opened/curtain”. The SYN8266 text-to-speech module converts parameters like temperature, humidity and light intensity into voice announcements. The SU-03T is a low-cost,low-power,compact voice recognition module (Cheng, 2011) that can be quickly deployed in smart home devices such as lighting systems and small speakers for voice-controlled operations. 2.4.3 Relay Module The relay module serves as the primary output in this design, utilizing a HK4100F-DC3V-6 relay to control and transmit data from the main control module. The relay (Zeng, Yang, Xu, Jiang & Peng, 2005) drives high-voltage appliances in smart homes by regulating high currents with low currents, functioning as an automatic switch. Its key role involves controlling high-voltage systems with low-voltage signals and enabling remote operation. This module plays a crucial role in automatic circuit adjustment, safety protection, and circuit conversion within the smart home voice conversion system, making it an indispensable component. 2.4.4 Infrared Detection Module This module primarily monitors door status (open/closed). The infrared obstacle sensor in the detection system operates on triangulation principles:When the transmitter emits infrared beams at specific angles, the reflected signals from obstacles are analyzed through geometric calculations to determine distances. However, this sensor has inherent limitations. Significant measurement errors occur when objects are either too close (outside the detection range) or too far away (beyond the range). Additionally,excessive object distance reduces measurement accuracy. 2.4.5 Temperature and Humidity Module The temperature and humidity module employs the DHT11 sensor as its core component. This integrated digital sensor combines temperature and humidity measurements, communicating with the microcontroller via a simple single-bus connection through a single T/O port. Featuring low power consumption, cost-effectiveness, high accuracy, and practicality, it stands as the preferred choice for humidity and temperature data collection in smart home systems. 2.4.6 Photoresistor In this system design, the photoresistor primarily detects ambient light intensity by utilizing the photoconductive effect of semiconductors. Its resistance value inversely correlates with light intensity: stronger light results in lower resistance, while weaker light leads to higher resistance. During high-intensity illumination, the photoelectric conversion exhibits weak linearity and significant temperature sensitivity, resulting in slower response speeds and lower frequencies. When exposed to light, the photoconductive capability of semiconductors increases proportionally with light intensity, reaching a peak before gradually diminishing. By encapsulating the photoconductive material in a transparent housing based on the internal photoelectric effect, it functions as a photoresistor that plays a crucial role in lighting modules. www.scholink.org/ojs/index.php/assc Advances in Social Science and Culture Vol. 7 No. 5, 2025 Published by SCHOLINK INC. 134 3. System Design and Experiment 3.1 Overall System Design This voice-controlled smart home system utilizes the STM32F103C6T6 microcontroller as its core control board,integrating voice recognition, text-to-speech conversion, temperature/humidity sensors,and infrared detection modules through coordinated operation. When the owner initiates commands, the system translates voice inputs into precise actions for peripheral devices. If environmental data exceeds preset thresholds, the system automatically sends alerts to the main control module. The voice recognition and notification module then provides real-time feedback to users,while simultaneously adjusting connected appliances according to environmental conditions. The system initiates with Xiao Liu as the default voice assistant.For example:When the homeowner returns home, the system automatically announces “Welcome home! Lights are now on/off for you.” Upon waking the smart voice system, asking Xiao Liu, what’s the temperature today? “triggers” Hello! Today’s temperature is 24°C. “When inquiring about humidity,it responds with” 50% humidity today.” The system automatically alerts when environmental conditions deviate from preset values. It activates the air conditioner when temperatures exceed 24°C and turns it off when below 24°C, announcing “Air conditioning is now on.” The light sensor activates the lights when brightness drops below 150Lux and opens curtains when light intensity surpasses 600Lux. 3.2 Instruction Design This module is designed to receive and process voice commands from users,then send the processed results to the main control module via serial communication to control home appliances such as air conditioners, lighting, and curtains. The specific command design is shown in Table 3-1. Table 3-1 Voice recognition Command Settings main body Instruction Design voice broadcast device status user What's the temperature today Hello,the temperature today is xx degrees. Air conditioner on/off user What is the humidity today Hello, the humidity today is xx%. Air conditioner on/off User I'm back/I'm leaving Light turned on/off for you Light on/off user The light is too low.We have turned on the lights for you. Light on user The light is too bright.We've turned on the curtains for you. Curtain opened user The temperature is too high or too Air conditioner www.scholink.org/ojs/index.php/assc Advances in Social Science and Culture Vol. 7 No. 5, 2025 Published by SCHOLINK INC. 135 low.The air conditioner has been turned on or off. on/off 3.3 Programming This smart home voice control system employs a modular design philosophy, with the STM32 microcontroller serving as the central control unit.By integrating multiple functional modules,it achieves environmental perception,voice interaction,and automated device control. The main control module coordinates all peripherals, handling data acquisition, command parsing,device status management, and control logic execution. Each functional module operates independently,interacting with the main control module through standardized interfaces to minimize coupling. The system adopts a “perception-decision-execution” closed-loop logic: sensors monitor environmental conditions, voice commands receive user requests, and the main control module ultimately makes decisions to manage home appliances. 3.3.1 Main Control Module Programming As the system core, it handles initialization management, scheduled data collection,voice command processing, and automatic device control. The hardware driver is implemented using STM32 peripherals, with global variables storing environmental data and device status. The main loop employs a polling mechanism combined with scheduled tasks and event-triggered processing logic. The detailed process is as follows: (1) Initialization phase: Initialize the delay function, GPIO pins, infrared module, and serial port. After system startup, send a welcome message (“Welcome home, lights on for you”) via the text-to-speech module and set the light status to on. (2) Main loop logic: The system employs a 50ms interval timer task via the count counter to periodically retrieve temperature and humidity data from the DHT11 sensor and light data from the ADC, converting them into string formats for storage. Upon detecting commands from the voice recognition module via USART1, it identifies the command type and transmits responses to the text-to-speech module through USART2. Finally, it controls lighting and curtains based on light intensity, while regulating air conditioning according to temperature readings. 3.3.2 Text-to-Speech Module Programming Enable serial communication between the master control module and the speech synthesis module to convert text commands into voice output. Implement asynchronous serial communication using USART2, configure pins, baud rate, and interrupts, and encapsulate a function for sending strings. The detailed process is as follows: (1) Serial port initialization: Enable GPIOA and USART2 clocks,configure PA2 as a push-pull multiplexed output and PA3 as a www.scholink.org/ojs/index.php/assc Advances in Social Science and Culture Vol. 7 No. 5, 2025 Published by SCHOLINK INC. 136 floating input. Set serial port parameters: baud rate 9600, 8-bit data,1-bit stop,no parity,and two-way mode. Enable serial port receive interrupts and configure NVIC interrupt priorities to ensure real-time data reception. (2) String send function: Loop through the string, calling the send function character by character until the end-of-string character'\0'is encountered, to send the continuous string. 3.3.3 Infrared Detection Module Programming When an infrared sensor detects a user’s approach, it triggers a welcome message. The GPIO is configured in pull-up input mode to monitor infrared signal level changes, determining user proximity through the signal status.The detailed process is as follows: (1) Module initialization: Enable the GPIOB clock and configure PB10 as a pull-up input mode to receive infrared sensor signals. (2) Detection logic: When PB10 detects a high level,it performs a 10ms delay to eliminate noise and confirms signal stability. Subsequently, it sends the message “Welcome home, sir” to the text-to-speech module via USART2. 3.3.4 Temperature and Humidity Module Programming The DHT11 sensor collects environmental temperature and humidity data,which is then provided to the main control module for display or control. Based on the DHT11 communication protocol, the system implements initialization, reset, response detection, and data reading functions, with data validity verified through checksums. The detailed process is as follows: (1) Sensor initialization: Enable the GPIOA clock, configure PA7 as a push-pull output, and verify the sensor’s functionality using DHT11_Rst and DHT11_Check after initialization. (2) Data interaction process: Reset: Pull down the bus for 19ms, then pull up for 25us to trigger the DHT11 response. Response detection: Check if DHT11 pulls the bus low for 40-80us and then pulls it high for 40-80us to confirm the sensor is online. Data read: The DHT11_Read_Bit function reads individual bits,while DHT11_Read_Byte concatenates 8-bit data into bytes. The DHT11_Read_Data function then reads 40-bit data,verifies its validity through checksums, and stores the valid data into the temperature (temp)and humidity (humi) registers. In summary, this system program employs modular decomposition to break down complex functionalities into independent modules. These modules collaborate through standardized interfaces, achieving core capabilities such as environmental perception, voice interaction, and automated device control. The main control module combines polling and interrupt mechanisms to balance real-time responsiveness with periodic tasks,ensuring stable system operation. www.scholink.org/ojs/index.php/assc Advances in Social Science and Culture Vol. 7 No. 5, 2025 Published by SCHOLINK INC. 137 4.4 Experiment Display After the hardware and software design is completed,the system runs as follows: Figure 4-1 Experimental Results (1) Power supply:Connect the power supply, the indicator light is on,indicating that the system is normal and can start normal operation, as shown in Figure 4-1(a); (2) Voice recognition and broadcast module: Recognize the user’s speech,the main control module processes the data,and broadcasts it through voice, as shown in Figure 4-1(b); (3) Relay:After the sensor collects data, it sends it to the main control module,and then the relay controls the lifting of lights and curtains and the opening and closing of air conditioning, as shown in Figure 4-1(c); (4) Infrared obstacle avoidance system: The infrared obstacle avoidance sensor detects the human body and lights up the green light when the human body is detected, as shown in Figure 4-1(d). 5. Summary and Outlook Voice recognition, as an effective approach to human-machine integration, represents a cutting-edge scientific advancement. Its applications span across diverse domains, with potential to permeate nearly every major field. In the near future,more services and devices will seamlessly integrate with this technology. The deep integration of intelligent voice systems and smart home solutions has www.scholink.org/ojs/index.php/assc Advances in Social Science and Culture Vol. 7 No. 5, 2025 Published by SCHOLINK INC. 138 significantly enhanced daily life, delivering interactive experiences where products can “listen” and “speak” for various practical household scenarios. Smart home voice control not only enables seamless product interaction but also bridges human-device communication. With the advancement of AI and 5G technologies, the smart home industry will continue innovating to create comprehensive intelligent systems. These smart technologies are poised to become the driving force behind China’s economic development and scientific progress. Reference Chen, Z. (2013). Design and Implementation of a Smart Home Voice Control System. University of Electronic Science and Technology of China. Cheng, L. (2011). Design of an STM32MP3 Player. Neijiang Science and Technology, 32(12), 100-101. Ge, Q. K., Shi, J., Li, Z. L., & Liu, W. (2015). Design and Implementation of an Intelligent Guide Dog. Heilongjiang Science and Technology Information, 2015(20), 59-60. Jia, X. L. (2018). Design of a Smart Home Control System Based on Voice Control Technology. China Equipment Engineering, 2018(19), 133-134. Li, D. L. (2019). Research and I:mplementation of a Voice-Controlled Gateway System for Smart Homes. Hangzhou Dianzi University. Li, W., Zhang, Z., & Fan, W. H. (2015). Design of an MP3 Player Based on STM32 Microcontroller. Modern Electronic Technology, 2015(03), 15. Liu, H., Tian, Z. S., & Feng, Y. F. (2018). A Raspberry Pi-based voice control system for smart home applications. Manufacturing Automation, 2018(10), 11. Wei, J. K., & Chen, B. H. (2019). Research on the Design of a Microcontroller-Based MP3 Player. Nongjia Zhufan, 2019(23), 158. Xie, Z. Y., & Liu, W. (2021). Design of a Smart Home Voice Control System Based on Microcontroller. Science and Technology Innovation, 2021(31), 83-85. Xue, H. (2020). Research and Design of a Voice-Activated Smart Home Control System. Microcomputer Applications, 36(02), 149. Yan, R., & Tan, Z. W. (2013). A Multi-functional MP3 Player Based on STM32. Journal of Hunan University of Humanities and Social Sciences, 2013(04), 107-110. Zeng, J. J., Yang, P., Xu, C. M., Jiang, S. Q., & Peng, D. G. (2005). Design and Implementation of a Machine-Guided Blind Dog. Mechatronics, 2005(04), 2. Zhang, W. (2015). Research on Embedded Voice Control Systems for Smart Homes. Zhengzhou University. Zhao, L. (2017). Design of a Smart Home Voice Control System. Xi’an University of Electronic Science and Technology. www.scholink.org/ojs/index.php/assc Advances in Social Science and Culture Vol. 7 No. 5, 2025 Published by SCHOLINK INC. 139 Author Profile: Xiao Yuyue, female, Master’s degree holder, faculty member at the School of Big Data Engineering, Kaili University. Research focus: Internet of Things Engineering. Keywords smart home, STM32 microcontroller, voice recogniti 1.Research Background 2. System Architecture Composition 2.1 Basic Principles 2.2 Main Functions 2.3 System Architecture 2.4 Main Modules 2.4.1 Microcontroller Main Control Module 2.4.3 Relay Module 2.4.4 Infrared Detection Module 2.4.5 Temperature and Humidity Module 2.4.6 Photoresistor 3. System Design and Experiment 3.1 Overall System Design 3.2 Instruction Design 3.3 Programming 3.3.1 Main Control Module Programming 3.3.2 Text-to-Speech Module Programming 3.3.4 Temperature and Humidity Module Programming 4.4 Experiment Display 5. Summary and Outlook Reference