{'fraction_non_alphanumeric': 0.020475020475020474, 'fraction_numerical': 0.00819000819000819, 'mean_word_length': 5.018235584031543, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Monitoring and analysis of lung sounds remotely

Visual and auditory analysis of respiratory sound signals promises improved detection of certain types of lung diseases. LabVIEW software was used to design a system that monitors the respiratory activity of the patient. The program developed calculates the respiratory rate, displays the time expanded waveform of the lung sound, and computes the fast Fourier transform and short-time Fourier transform to present the power spectrum and spectrogram respectively. These parameters are transmitted synchronously to the remote station using the Internet for online monitoring of the patient.


Introduction
Lung sounds provide vital information about respiratory health and disease. Lung sounds can be classified as normal sounds or adventitious sounds. The presence of adventitious sounds usually indicates a pulmonary disorder. The adventitious sounds are of two types: continuous and discontinuous. Continuous adventitious sounds are wheezes and rhonchi. Wheezes have dominant frequency, usually .100 Hz, and a duration .100 milliseconds. Wheezes are due to airways obstruction in the lungs. Rhonchi are .250 milliseconds in duration, low-pitched, with dominant frequency of #200 Hz. Crackles are short, explosive discontinuous sounds with duration ,100 milliseconds. Crackles are produced either by pressure equalization or by change in elastic stress resulting from sudden opening of closed airways in the lungs. 1 For diagnosis of respiratory diseases physicians largely rely on their auditory skills for interpretation of the sounds acquired using the stethoscope. The success of this practice depends on the experience and training of the doctor. With the advancement in computer applications various new techniques are available for lung sound analysis which can assist the doctor in faster and more accurate diagnosis of these diseases while minimizing human error. Applications developed using spectral analysis methods provide new insights in identification of different patterns of common lung sounds. 2 In certain cases of patients suffering from chronic diseases such as asthma, continuous monitoring is required even when the patient is discharged from the hospital for prevention of failure of out-patient therapy and timely recognition of symptoms. To address these issues treatment needs to be monitored remotely and quickly adapted to a change in health status. An easy-to-use and cost-effective solution is required for remote patient-doctor interaction. This project aims to develop a system with remote respiratory monitoring capability that integrates the various different techniques used by researchers for lung sound abnormality detection on a single platform. Figure 1 gives the system design employed in order to achieve the above mentioned aims.

Data acquisition
The lung sounds (© 2007 Stethographics, Inc) used for this study were downloaded from Stethographics' website. 3 These sounds were already digitized in Wave format. The sounds format was mono 16 bits, sampled at 8000(S/s).
For real-time application a microphone can be interfaced to record the lung sounds.

Processing
The .wav file is read and played using Sound File Read Simple. vi function module. The dynamic data obtained are converted into an array form to enable waveform construction. The raw lung sound signal is finally displayed on a waveform graph.
For the measurement and analysis of the signal using LabVIEW some of the functions in the function library of the software have been used. Figure 2 shows the steps involved in obtaining the spectral components of the acquired lung sound signal.
The modified waveform signal is passed to the FFT Power Spectrum.vi, output of which gives the frequency spectrum.
The use of fast Fourier transform (FFT) for spectral analysis was found to be universal.
Short-time Fourier transform (STFT) sub-vi uses the STFT Spectrograms.vi which computes the signal energy distribution in the joint time-frequency domain, using the STFT algorithm. The spectrogram of the signal is displayed in an intensity graph.

respiratory rate measurement
The peak of the respiratory signal is detected in order to calculate the respiratory rate. Peaks are identified using Peak Detector.vi by setting an appropriate threshold value. The time interval between peaks is extracted. Respiratory rate (breaths/minute) is calculated by using the formula 60/∆Time. This methodology is represented in Figure 3.
In case abnormal respiratory rate is observed, ie, bradypnea (rate ,10 breaths/minute, for adults) or tachypnea (rate .20 breaths/minute, for adults), while the patient is in resting state an alarm is triggered. Continuous monitoring of the respiratory rate can help in the predication of pneumonia, cardiac arrest, and several other life-threatening conditions.

Transmission of signal to remote unit
The signal acquired at the local station can be sent to the remote location by using TCP/IP protocol (Transmission Control Protocol/Internet Protocol). Connection is established by entering the appropriate port and address information. The data at the port specified are cast into numerical as well as graphical representation. Error checking is carried out to stop transmission if connection error occurs.
The system is also capable of sending data to multiple remote locations. A Chat feature has been included to facilitate enhanced interaction between the communicating sites.

System design layout
The graphical user interface built consists of three panels, namely the monitoring, analysis, and transmission panels. The monitoring panel displays the raw lung sound signal as seen in Figure 4. It consists of the option to play and save the acquired signal. The respiratory rate display and alarm are also a part of this section. The zoom feature of the graph can be used for the time expanded waveform. The power spectrum and spectrogram are viewed on the analysis panel ( Figure 5).
To establish connection with a remote host in order to transmit the captured lung sound signal the transmission panel is used. The necessary IP address and port information are entered here to connect with the remote host over the Internet. Messages are exchanged across the links using the Chat option. The transmission panel is shown is Figure 6.

Results and discussion
In this section some of the results obtained using the three signal analysis techniques (power spectrum, spectrogram, time expanded waveform analysis) that have been found to be most popular among researchers for visually detecting abnormal lung sound patterns are discussed.
Power spectrum is the frequency domain data representing the power distribution of a sound with respect to frequency. 4 Crackle sounds generally occur during inspiration and appear in the time domain at regular intervals with extremely low amplitude. Their frequency usually ranges from 100 to 2000 Hz or even higher. In the power spectrum of crackle sound shown in Figure 7, the main frequency ranged from 0 to 600 Hz.
Wheezes are continuous sounds characterized mainly by their pitch and duration. The frequency of this pathologic sound lies between 400 and 1000 Hz. They usually identify the presence of an obstructive pathology, for example, asthma. The frequency spectrum of wheeze is shown in Figure 8, where it contains a dominant frequency of 400 Hz.     Rhonchi is a low-pitched wheeze with a duration of .100 milliseconds and frequency of ,300 Hz. 4 Frequency spectrum of rhonchi sound is shown in Figure 9, where frequency lies in the range of about 0 to 200 Hz.
Spectrograms give a visual of the spectral information of lung sound. It displays the instance at which a particular frequency occurs. Colored spectrogram highlights significant amplitude features. Intensity of the sound at a particular instance is represented by the different colors of the spectrogram. The x-axis corresponds to time and the y-axis corresponds to frequency.
The breathing-associated sound heard on the chest of a healthy person is called the normal lung sound. The spectrogram of these sounds usually exhibits continuous magnitude decay from lower to higher frequencies and higher spectral components lie in the region lower than 100 Hz. 5 These characteristics are shown in Figure 10, which is a spectrogram of a normal vesicular sound.
Crackles are short discontinuous explosive sounds and when viewed in the short-time interval usually generate vertical lines in the spectrogram with a duration ,20 milliseconds. This characteristic is shown in Figure 11, which represents the spectrogram of a respiratory cycle containing fine crackles during the inspiration phase.
Wheezes have duration .100 milliseconds, with their fundamental frequency and harmonics .100 Hz. Since these characteristics are continuous, the resulting spectrogram consists of harmonics of higher pitch which indicate the existence of wheeze. 5 This property can be seen in Figure 12.
Time expanded waveform analysis (TEWA) is a technique that assists in distinguishing between the different patterns of common lung sounds by presenting the details of the acoustic signal with increased resolution. This is done by zooming in on the time or x-axis of the waveform. Figure 13, shows the TEWA of some the lung sound samples studied. In the figure, normal lung sounds have an irregular shape without any repetitive pattern. Wheeze and rhonchi have a periodic waveform, which is either sinusoidal or more complex. Crackles show a sudden short deflection followed by deflections with greater amplitude. 6 In the testing phase the tool developed using LabVIEW gave the desired results, thus providing a base for carrying out further study and including additional features to increase the feasibility of such a system being used by both medical practitioners and patients.
While working on the project, a great deal of stress was placed on making it as user-friendly as possible. The reason for this being that similar systems developed by researchers failed to make an impact due to the difficulty the users faced using them.

Publish your work in this journal
Submit your manuscript here: http://www.dovepress.com/international-journal-of-copd-journal The International Journal of COPD is an international, peer-reviewed journal of therapeutics and pharmacology focusing on concise rapid reporting of clinical studies and reviews in COPD. Special focus is given to the pathophysiological processes underlying the disease, intervention programs, patient focused education, and self management protocols.
This journal is indexed on PubMed Central, MedLine and CAS. The manuscript management system is completely online and includes a very quick and fair peer-review system, which is all easy to use. Visit http://www.dovepress.com/testimonials.php to read real quotes from published authors.

Conclusion
The analysis tools included in the system could support physicians in diagnosis of lung diseases. The simultaneous listening and visual representation of breath sounds using this system promises improved diagnosis of pulmonary diseases.
The computation time needed for the generation and processing of the various parameters is ,1 second, which makes the system extremely viable for real-time continuous monitoring.
This project has taken a step towards integrating telediagnosis and telemonitoring. The remote monitoring of any chronic disease has tremendous potential in reaching out to those patients who live in rural areas or far away from hospital premises. The number of visits of a patient to a hospital could thus be reduced, saving medical expenses. The system developed can also be used for remote teaching and learning, and education of medical students and trainees who use auscultation in the day-to-day evaluation of patients. 7 In this stage of the project, the system was tested using freely available recorded lung sounds. However, clinical trials of the system need to be carried to establish its accuracy in comparison with the existing systems.
Algorithms for automatic pattern recognition need to be implemented for automatic diagnosis.

Disclosure
The author declares no conflicts of interest in this work.