Voice recognition system for controlling electrical appliances in smart hospital room

Nowadays, most hospitals have new problem that is lack of medical nurse due to the number of patient increas rapidly. The patient especially with physical disabilities are difficult to control the switch on electrical appliances in patient’s room. This research aims to develope voice recognition based home automation and being applied to patient room. A miniature of patient’s room are made to simulate this system. The patient's voice is received by the microphone and placed close to the patient to reduce the noise.V3 Voice recognition module is used to voice recognition process. Electrical bed of patient is represented by mini bed with utilising motor servo. The lighting of patient room is represented by small lamp with relay. And the help button to call the medical nurse is represented by buzzer. Arduino Uno is used to handle the controlling process. Six basic words with one syllable are used to command for this system. This system can be used after the patient's voice is recorded. This system can recognize voice commands with an accuracy 75%. The accuracy can be improved up to 85% by changing the voice command into two syllables with variations of vowels and identical intonation. Higher accuracy up to 95% can be reached by record all the subject’s voice.


Introduction
Nowadays, Home Automation System is very popular and become an important part in daily life [1][2][3][4][5][6]. Some people need this system only to fulfill their needs and comfort, for example turning on lamp and TV also or controlling the garage door, etc. But for other people with physical disabilities, this system is considered very helpful [3,7,8] and improve the quality of life [2,9,10]. Automation systems are usually applied both inside and outside of the house. This research implements home automation in hospitals especially in patient rooms. Because the existing appliances are controlled by manual switch [11] such as bed, lighting, medical aid button, etc. The price of electrical bed is so expensive too. Furthermore most hospitals have new problem that is lack of medical nurse due to the number of patient increas rapidly. Therefore user with physical disabilities are difficult to control the switch. With an automatic switch, it is not only can reduce time and effort [2,11] but also can be used as an alternative solution to suppress the needs of nurses in hospitals.
The previous research about home automation system have been developed. The emerging technology for controlling electronic equipment is voice recognition [3], [7][8][9], [12][13][14][15][16][17][18]. A voice crying in the patient rooms in the hospital can also be detected by the Smart Hospital-Room [14]. The voice can also be analyzed to measure the driver's circumstances to avoid accidents [19]. There are also systems that help elderly people in their daily activities in the bedroom, such as turning on and turning off electronic equipment [20].
The prototype design of home automation system using an IrDA based remote infrared (IR) are designed to controll Televison and air conditioner (AC). But communication only point-to-point with the position of the transmitter and the receiver must be in a line-of-sight (LoS). Moreover the angle of transmission only 0°C and the distance of transmission is short [21]. Touchscreen and Remote Control are implemented in home automation system. For saving the energy, the presence of human are detected to controll the appliances automatically. The limitation of this sytem is sometimes there are more noise in input of remote controller and error of time calculation. It also makes difficult to operated for people with disabilities [2]. Utilization of other wireless networks also performed by utilizing the Wi-Fi equipment [4,7,12]. Such system is integrating Cloud Home Automation (HA) and Voice Recognition System (VRS). Complexity and high prices become the weakness of this system [7].
The flexibility and ease of this system become an advantage. This system has many components that are microcontroller, bluetooth module to transfer signal, and smartphone with android application to recognize the user voice. The use of smartphones still complicates the patient because they have to activate the smartphone first so it requires the hand gesture of the patient [11]. Home automation also developed by WiiMote movement detection. It facilitates to monitor biometrical parameters and to control home automation devices.
This research develop a system that can control appliances at patient room using voice command. This system are simple, low cost, and easy to use. With this system, patients will not always depend on nurses to serve them in controlling equipment in hospital rooms. The main equipment of a patient such as mattress can be adjusted it's height position (sleeping position, rest position, and sitting position). Room lighting can also be controlled by the patient himself. During this time if the patient needs medical assistance, they should press the help button. But with this system, the patient can be directly called from the room with voice commands alarm sounds.

Research Method
A miniature of patient room are made to simulate this system. The patient's voice is received by the microphone and placed close to the patient to reduce the noise.V3 Voice recognition module is used to voice recognition process. Electrical bed of patient is represented by mini bed with utilising motor servo. The lighting of patient room is represented by small lamp with relay. And the help button to call the medical nurse is represented by buzzer. Arduino Uno is used to handle the controlling process. Six basic words with one syllable are used to command for this system. They are "on", "off", "sit", "rest", "sleep", and "here". This system can be used after the patient's voice is recorded. Then this system is tested with the command from same recorded patient and unrecorded patient. Block Diagram of Smart Hospital Room using voice recognition shown in Figure 1. The voice recognition module used is the Elechouse v3 module. This module is controlled by serial communication via pin transmitter (TX) and the pin receiver (RX).The Arduino UNO microcontroller is used as the system controller. Servo motors have been widely used as a driving force in the application of robots, especially medical robots [22]. So in this system, the servo motor is used as an actuator to adjust the desired mattress position. The mattress provides three positions, such as sitting position, rest position, and sleeping position. The buzzer is used as the main indicator when the patient needs help. The hardware configuration between Arduino UNO microcontroller, voice recognition module, servo motor, relay driver circuit, and buzzer shown in Table 1. Servo's Motor Buzzer Relay Driver Circuit 5V GND GND Figure 2 shows the connection between the relay driver circuit and the lamp. The lamp is connected to the relay to the Normally Open (NO). If a short circuit occurs, the circuit is not directly damaged as it passes through two breaker switches. Then the AC source is connected to the COM pin on the relay. When the patient gives the command "on" the relay is active, so the switch from Normally Open will move to Normally Close (NC) and the lamp will be on. After all the hardware has been integrated, then the next step is to observe the voice signal. Voice signals are recorded first using adobe audition software with sample rate 44100, stereo Channel, and 16 bit resolution. Then the data is stored in the form of. wav. The saved signals are then analyzed with the GNU Octav program. There are six voice commands that will be observed in the shape and spectrum of the waves: "on", "off", "sit", "rest", "sleep", and "here" as shown in Figure 3. This result shows that the six signals are nothing similar.
There are two recording processes. The first recording only recorded a single subject. The second recording is done by two subjects. In Figure 3, the training process only records the sound of a single subject. Sigtrain 0 to sigtrain 5 is sent to record 6 voice commands. For recording by two subjects, there are 12 commands to be accommodated (sigtrain 0 to sigtrain 11). This module can hold up to 80 voice commands, but can only recognize a   Figure 4 shows the testing process. If a voice command is detected, it will be compared with previous training data which algorithm is appropriate. If the incoming sound corresponds to the "on" sound recording, then the lamp will be on. If the incoming sound is in accordance with the recording "off", then the lamp will be off. If the incoming sound corresponds to the recording "sit", then the servo forms an angle of 10°. This is matched with bed mechanics and servo placement. If the incoming sound is in accordance with the recording "rest", then the servo form an angle of 45°. And if the incoming sound corresponds to the recording "sleep", then the servo form an angle of 90°. And If the sound that comes in accordance with the recording "here", then the buzzer will sound.

Results and Analysis
In Figure 5 shows the mechanics of the system development that has been created. The overall dimension size is 40 cmx25 cmx30 cm (length x width x height). At the top there is a bed miniature that had been installed servo motor to adjust the position of its height, the AC lamp for lighting, and buzzer as a sign of medical help callers. At the bottom there are hardware implementations such as microphones, voice recognition module, Arduino UNO microcontroller, and driver relay circuit. The AC lamp used has 230V AC voltage and 5 watts power. While the   In this test, the first subject was a 27-year-old female and the second subject was a 34-year-old male. Tests carried out by each subject five times for each voice command. Table 2 is a sound recording test with one subject and one syllable. This result shows that the average system success rate is 75%. From the results of tests conducted, it can be seen that the success rate of speech recognition by the subject two is lower than the first subject. This is due to the difference in frequency and amplitude between subjects, especially when controlling the position of the mattress (sitting, rest, and sleep). Age and gender factors strongly influence the dominant frequency of voice signals. Therefore the authors re-record the new training data containing all subject sounds. While Table 3 is the test of sound recording with two subjects and one syllable. From this data shows that the average success rate of the system rise to 95%. This proves that voice recognition of the system can be improved by recording all subject sounds.   Table 4 that the test uses two syllables. The command is spoken in Indonesian. This differs from previous tests that use English to make it easier to observe. From these data shows that the average success of the system increased to 85%. On this system can be used for 13 subjects with each recording 6 voice commands first. So the total is 78 voice commands. When the user will control the electrical equipment, it should be done the loading process for the desired voice commands.

Conclusion
The voice command technology for controlling electrical equipment has been successfully built and implemented. This system can recognize voice commands with an accuracy of up to 75% for recording a single subject and one syllable. To improve accuracy, all subject sounds should be recorded first. This can increase accuracy by up to 95%. But if only one subject is recorded, the voice command can be changed into two syllables with variations of vowels and by equating pronunciation intonation. From the test results, the sound recognition accuracy rate reached 85%. For future work, a system will be developed that can call for medical assistance from many rooms in the hospital.