Design and Implementation of Voice Time, Time Indicator Application for Diabetic Retinopathy Patients

Diabetic retinopathy is a major cause of blindness in diabetic patients around the world. Patient with diabetic retinopathy strongly rely on the sense of hearing in communication and the sense of touch in recognizing objects. However, there are some objects that they cannot recognize, such as time. Therefore, it is undeniable that patient with diabetic retinopathy need help from others in carrying out some activities. One of the crucial activities that patients with diabetic retinopathy need to do is taking medication regularly according to the doctor's instructions. This research studies the design and implementation of Voice Time application which is developed to help diabetic retinopathy patient to know the time. Using speech recognition, diabetic retinopathy patient can give commands to mobile devices by means of voice. This application is equipped with emergency call and location-sending features which allow the patient to call the emergency contact while simultaneously sending text containing latitude and longitude information so that the emergency contact can locate the patient with Google map. From the results of the speech recognition performance test for voice time and emergency call features using dB meter application in 20 tests at varying distances (between 1 – 100 cm), sound intensity (amplitude) between 15 – 83 dB and 1 second 84 ms average delay to execute voice in emergency call feature were obtained. Keywords—Voice time, take medication, latitude and longitude information, emergency call, speech recognition, diabetic retinopathy.


Introduction
Physical perfection is someone's dream in living life. However not everyone has physical perfection, and there are those who do not have the ability to see. Loss of vision function will cause limitations for someone to recognize objects and people in the surrounding environment. A person who experiences blindness always waits for cues from objects or people before making a reaction. This condition can cause a blind person to lose the ability to interact and obtain information from the surrounding environment. Diabetic retinopathy is a visual impairment that is caused by damage in the retina of the eye and so has a direct impact on the patient's vision. This disease is commonly experienced by people with chronic diabetes which complications cause blockages in small blood vessels, such as in the kidneys and eyes. The blockages can cause sufferers to experience kidney failure and visual impairments, even blindness respectively [1] [2] [3].
Patients with diabetic retinopathy rely heavily on the sense of hearing in communicating and the sense of touch in recognizing objects. However, they cannot recognize all objects and so the patients with diabetic retinopathy desperately need help from others in carrying out some activities. The most common example they experience is when they want to know the time for worship or for taking medication because diabetic retinopathy patients should take medication regularly according to the doctor's instructions. Given the importance of time in everyday life, in this study a Voice Time application is developed to help diabetic retinopathy patient to know the time (24 hours). Using the speech recognition, diabetic retinopathy patient can give commands to mobile devices using voice [4] [5]. In addition, this application is equipped with an emergency call feature because at certain times the patient needs help from the people closest to him. The patient's location is very important and so this application is also equipped with the feature that lets the patient to send location in the form of latitude and longitude. With the help of Google map, the application can display the patient's location based on latitude and longitude information received on the map [6].
This study aims to propose the design of timing indicator application which can assist diabetic retinopathy patient to know time and access reminder for taking medication and emergency call by using speech recognition. This research is done with the purpose of helping and facilitating diabetic retinopathy patients in knowing some information that is difficult to know without the help of others.

2
Literature Review

Diabetic retinopathy
Diabetic retinopathy is a form of complication in diabetes mellitus, where sugar level is high and ultimately results in damage to the retinal blood vessels of the eye, especially the light sensitive tissues. This condition can be suffered by anyone with type 1 or 2 diabetes, especially those with uncontrolled blood sugar and chronic diabetes [7] [8]. Diabetic retinopathy associated with diabetes mellitus as well as hypertension can develop to a certain degree and is a serious complication [3]. Diabetes is disease caused by metabolic disorder with chronic hyperglycemia. Diabetes is caused by insulin resistance or secretion disorders which cause multi organ complications, including complications in the eyes, kidneys, nerves, blood vessels, and heart [7]. Diabetes mellitus is a major health problem in the world which increases every year and diabetic retinopathy is the biggest complication problem. This is supported by the fact that 40-50% of patient with diabetics suffers from diabetic retinopathy and have poor prognosis especially for vision [8]. Diabetic retinopathy is recently becoming the main cause of blindness in the age group of 20-65 years in the world. About 2.5-5 millions of people in the world suffer from blindness because of diabetic retinopathy.
The loss of productivity and quality of life of diabetic retinopathy patients can be the contributing factor to social and economic problems [1].
People with vision problem have the same needs with other people. With the impairment of the sense of sight, patient with diabetic retinopathy use the other body parts and senses, namely hearing and touching, to carry out daily activities, such as learning braille and conducting mobility orientation skills, like walking with sticks and learning other skills. Currently, several technologies have been developed to support the activities of blind people in their daily life, such as braille translator, voice navigation, wearable danger signaling device, and so on [9].

Similar applications
Several time-indicator applications have been successfully developed and can be downloaded from the Play Store. These applications have both advantages and disadvantages. For instance, The Speaking Clock Application: Tell Me the Time is a timekeeping application using a selection of languages, such as Indonesian, English, Japanese, Dutch and French to convey information on the time requested. Even though it uses the text-to-speech method, this application still requires keystrokes to obtain information about time [9]. Other types of applications use Indian, English and Vietnamese languages to tell time using alarm mode without the need of keystrokes [10] and using speech as input and alarm mode with English language as the output. This application requires setting the time to match the current time [11] [12]. These applications require internet connection and time setting. The applications above are design for normal people so people with vision problem will require assistance form others. Table 1 shows a comparison of several applications for time indicator that can be downloaded from Play Store [13].

Related works
Various applications using the Android platform have been developed, such as applications for reading telephone contacts and sending SMS through voice command [14], assisting learning [4], and showing location through digital map [6]. On average, applications on Android utilize features provided by Google and instruments equipped by smartphone manufacturers in order to obtain better performance [5] [15] [16].
Google Speech API and GPS are two features that are frequently utilize by application developers. By utilizing Google Speech API, the application converts the given voice into text and uses the text to select telephone contacts on the phone and delivers messages using SMS service [14]. Voice recognition can also recognize Arabic words which can be helpful for those who have difficulty in understanding Arabic [4]. Meanwhile, by using GPS that has been installed on an Android device, someone's location can be identified and mapped by map application. An application for mapping natural disaster volunteers has also been developed [6].
Applications developed using Android platform have helped many users and added value to the use of Android devices in addition to being a communication medium. In the near future, there will be more benefits that can be enjoyed by Android users as more features are created and developed by Android developers. Reflecting on this, this study aims to develop an application to show time to diabetic retinopathy patients by the help of Google Speech API and volume buttons on Android devices.

Sounds
Sound is a wave that contains a number of important components (amplitude, wavelength, and frequency) which can cause one sound and another sound different. Sound waves are produced from a vibrating object, such as strings of a guitar being picked. The vibrations move and propagate in air, water, or other mediums. Human hearing is very limited because human can only hear sounds at a frequency of [16][17][18][19][20]. Human cannot hear sounds with frequency above 20 KHz, while those with frequency 16 Hz will sound slow and beating. The sounds that are safe to hear are between 0 -130 dB. The sounds at 130 dB can hurt ears and can also cause ear membrane to rupture. The pitch is related to the frequency of the sound that is caught by the ears. The higher the sound frequency, the louder the sound is heard. The frequency of human voice ranges between 320 -4000 Hz and belongs to the low frequency range.

Speech recognition
Google server performs speech recognition for Voice SMS application by using the HMM algorithm. Acoustic speech is converted into a set of words by software components [15]. Vocabulary size and confusability, speaker dependence vs. independence, modality of speech (isolated, discontinuous, or continuous speech, read or spontaneous speech) and task, and language constraints influence the accuracy of speech recognition system. There are blocks that support speech recognition system: feature extraction, acoustic model database built based on training data, dictionary, language model, and the speech recognition algorithm. Feature extraction in speech recognition requires the formation of equally spaced discrete vectors of speech characteristics. The parameters of acoustic models are estimated using feature vectors from training database. Recognizable properties of the basic elements are illustrated by acoustic model. One of the basic elements for isolated word recognition is a phoneme for continuous speech or word [4] [16].

Google speech API
There are different speech features on Android mobile operating system offered by Google, such as search by voice, voice input to any text field, and an API for application developers. Consequently, a variety of usage scenarios and speaking styles have to be supported by speech recognition feature, which include relatively short search queries, business names, addresses, dictated SMS and e-mail message, and a long tail of spoken input to any application users may install.
Compared to typing on a full-sized keyboard, inputting text on mobile devices is often slow and error-prone. Several Android features are offered by Google, which make speech a successful substitute input method. There are several speech-based Android features, such as search by voice, voice input into any text field, and a speech API for application developers. Tapping a microphone icon on the desktop search box or holding down the physical search button can activate search by voice feature. When query is spoken, Google directly shows the search results. To send text using Voice Input feature, tapping the microphone key on the on-screen keyboard can help inputting the text by using voice [   Mobile phones with active GPS and the internet services.  The Application is used in mobile phones with Android Operating System equipped with time (voice time) and emergency call features  In the database, there are voice data operating for 24 hours, which are reminders for taking medicine, telephone numbers used for emergency calls, and automatic messages containing the location of the patient in the form of latitude and longitude  User 1 (the patient with diabetic retinopathy) opens the application, and then clicks the clock button or uses voice input to make emergency call or to know the time.
Pressing clock button or volume up button twice or saying "what time is it?" activates time indicator in the application. Meanwhile, pressing emergency call button or volume down button twice or saying "phone now" will automatically call user 2 (emergency contact) and send an automatic message in the form of latitude and longitude.  User 2 as the emergency contact will receive information in the form of latitude and longitude sent by the patient diabetic retinopathy. User 2 can also locate the diabetic retinopathy patient by entering the latitude and longitude into Google maps. User 2 can input cellphone numbers for emergency calls and set automatic messages and medication schedules in the settings menu.

Data flow diagram system level 0
Based on the analysis and needs mentioned before, a system is designed and implemented into the application. The design of Voice Time application for diabetic retinopathy patient in the form of data flow diagrams level 0 and level 1 is shown in Figure 2.   Emergency Contact Locate the position of user 1 (diabetic retinopathy patient), receive calls and automatic messages in the form of latitude and longitude, and set telephone numbers and alarms Data flow diagram Level 1 in Figure 3 has 5 processes involving 2 users, diabetic retinopathy patient and the emergency contact. To use voice time feature, the patient sends voice time command which is then processed by speech recognition. Next, the information will be stored in the database and forwarded to Google API as a text-tospeech conversion. To make emergency call, the patient needs to enter emergency call number and then sends emergency call command. Subsequently, the application sends message containing latitude and longitude information to the emergency contact.

Data flow diagram system level 1
Google API  Fig. 3. Data Flow Diagram System Level 1

Application pages
The page view drafts include the main page, the settings page, and the time picker page, as shown in

Voice time and emergency call features
To operate Voice Time application, the patient can pressed volume down button twice or click on the application icon. Then to know the time, the user can press volume up button twice or by saying the words, "What time is it now?" To run the emergency call feature, the user can press volume down button twice or say the words "phone now" and the application will automatically call the emergency number and send an automatic message in the form of latitude and longitude of the patient's location. After command is given, the page displayed in the mobile phone's screen is the voice time, the emergency call, the speech recognition, or settings button, depending on the command.
The settings page contains the function to set alarm for taking medication and to set a telephone number for emergency calls and automatic SMS containing latitude and longitude information to locate the patient's position using Google maps. The following are the displays of the Voice Time Application on Android phone. a. main page b. emergency call page  Figure 5a is the display of the application's main page, which contains the main buttons for the voice time, the emergency call, the speech recognition, and settings. There are two simple ways to know the time, by pressing the volume up button twice or by saying the words, "What time is it now?" The application will announce the time, for example "It is 30 minutes pass 10 PM". If the patient to make an emergency call, the application will automatically call the emergency number and send an automatic message in the form of latitude and longitude.
Emergency call or emergency telephone is a feature that facilitates diabetic retinopathy patient in contacting emergency contact without typing the keypad. To use emergency call feature using speech recognition, the patient can press the volume down button twice or give voice input "call now". A phone pop up as shown in Figure  5b will appear. The telephone number that appears on the emergency call is the telephone number set previously in the settings menu. The Voice Time application will simultaneously send an automatic message containing latitude and longitude information to the emergency contact (user 2).  Figure 6a shows the settings menu where a telephone number for emergency calls and automatic SMS can be set. The alarm for taking medication according to the schedule given by the doctor can also be set in this page.

Time picker page
Figure 6b displays a process in the alarm setting. When the setting button on the alarm is clicked, a pop up time picker which sets the time as an alarm will appear.

4.4
Pop up alarm for medication Figure 6c displays the pop up alarm when the time to take medication comes.

Results and Discussion
This section describes the application testing methods and discusses the results of functional tests including voice time, speech recognition, and emergency calls, and performance tests including distance, delay, and amplitude of the speech recognition.

Testing methods
The test methods serve to prepare the data test so that the data is in accordance with the plan, including:  Voice Time application testing, which checks the function of volume up and down, speech recognition, voice time, and emergency call buttons, setting menus, which include phone numbers and alarm listing, as well as pop up alarm notification.  Speech recognition testing, which involves testing the application's accuracy in reading and recognizing voice by using the volume up button for voice time and the volume down button emergency call.  Voice time feature testing, which aims to measure the time accuracy of voice time feature activated by speech recognition or volume up button.  Emergency call testing, which aims to test emergency call dialing using speech recognition, acquisition of the patient's location, and delivery automatic message containing latitude and longitude of the patient.

Results and discussion on the success of the application
The application is made using Java and XML programming languages on Android Studio. Java is used to manage program logic and XML is used to create application layouts.
a. Main page b. Process of voice-to-text conversion  Figure 7a displays the main page of the application, which contains the voice time button which serves as one of the ways to know the current time by using the speech recognition. Google API is used in speech recognition process in recognizing voice from patient. The Google Speech API is called using the ACTION_RECOGNIZE _SPEECH framework, which is implemented by using the onActivityResult () method. Subsequently, this library will capture the speech the smartphone's microphone receives. Voice captured will be sent to Google servers to be translated into text.
Google translates speech into text using the Hidden Markov Model (HMM) algorithm. Text translation results are sent back to the smartphone by using the internet. Figure 7b shows the displays when the system can recognize the voice from the patient and can execute the commands so that the application can provide time information or make an emergency call, and then send an automatic message in the form of latitude and longitude. In order to send a message containing latitude and longitude information, the GPS feature on the smartphone must be active. Figure 8 shows the displays of the patient and emergency contact mobile phone after emergency call feature is used.
a. The display on the patient's phone b. The display on emergency contact's phone The results of voice time button test show that the application can inform current time by using voice in selected language which is clear and easy to understand. The result of the emergency call button test show that the application can immediately dial the emergency contact without having to type in the keypad and send an automatic message in the form of latitude and longitude. When the user accesses the alarm settings page, the user will find 3 check list boxes which can be set to the desired schedule for taking medication.  Figure 9 shows the information about latitude and longitude sent to the emergency contact and the display on Google map. From 6 different emergency call tests, the accuracy of latitude and longitude information shown by the text and the map was 100%. In order to give command using speech recognition, the input voice must be clear and syntactically correct. To measure the sound intensity produced in different user-application distances, dB meter was used.
This tool functions as detector of sound intensity between 30 -130 dB and frequencies between 20 -20,000 Hz. The results of sound intensity testing showed that different distances between user and application resulted in different amplitudes and speech recognition delays. The further the distance between the user and the application, the bigger the amplitude and the speech recognition delay. Figure 10 displays speech recognition testing using dB meter and Table 3 shows sound intensity testing results.
a. Speech recognition measuring process b. dB meter displaying 70 dB sound intensity

Conclusion
Based on the tests results and discussions on sound intensity, sound intensity between 15 -83 dB was acquired from 20 test distances (between 1 and 100 cm). Meanwhile, the average delay to execute speech recognition requests was 1 second 84 milliseconds.
It can be concluded that Voice Time application which is designed specifically for patients with diabetic retinopathy can operate with two different methods, namely activating speech recognition and manually pressing the volume buttons. In order to use speech recognition feature and to connect with Google API, mobile phone must be connected to internet network. Alternatively, if there is no internet connection, the user can still know the time by using the button click method.
The patient location can be detected by using GPS. Therefore, whenever the patient needs to make emergency call or send automatic massage containing latitude and longitude information, the emergency contact will immediately acquire the exact location of the patient.