- Open Access
Unconstrained snoring detection using a smartphone during ordinary sleep
© Shin and Cho; licensee BioMed Central Ltd. 2014
- Received: 9 May 2014
- Accepted: 12 August 2014
- Published: 15 August 2014
Snoring can be a representative symptom of a sleep disorder, and thus snoring detection is quite important to improving the quality of an individual’s daily life. The purpose of this research is to develop an unconstrained snoring detection technique that can be integrated into a smartphone application. In contrast with previous studies, we developed a practical technique for snoring detection during ordinary sleep by using the built-in sound recording system of a smartphone, and the recording was carried out in a standard private bedroom.
The experimental protocol was designed to include a variety of actions that frequently produce noise (including coughing, playing music, talking, rining an alarm, opening/closing doors, running a fan, playing the radio, and walking) in order to accurately recreate the actual circumstances during sleep. The sound data were recorded for 10 individuals during actual sleep. In total, 44 snoring data sets and 75 noise datasets were acquired. The algorithm uses formant analysis to examine sound features according to the frequency and magnitude. Then, a quadratic classifier is used to distinguish snoring from non-snoring noises. Ten-fold cross validation was used to evaluate the developed snoring detection methods, and validation was repeated 100 times randomly to improve statistical effectiveness.
The overall results showed that the proposed method is competitive with those from previous research. The proposed method presented 95.07% accuracy, 98.58% sensitivity, 94.62% specificity, and 70.38% positive predictivity.
Though there was a relatively high false positive rate, the results show the possibility for ubiquitous personal snoring detection through a smartphone application that takes into account data from normally occurring noises without training using preexisting data.
- Sleep management
- Sleep disorder
- Snoring detection
- Formant analysis
Surveys conducted by the National Sleep Foundation (1999–2004) have revealed that at least 40 million Americans suffer from over 70 different sleep disorders, and 60 percent of all adults report having sleep problems at least a few nights a week. In addition, more than 40 percent of all adults experience daytime sleepiness at least a few days each month that is severe enough to interfere with their daily activities. Moreover, 20 percent of all adults report sleepiness a few days per week or more. Furthermore, 69 percent of all children experience one or more sleep problems at least a few nights a week .
Since sleep is a restorative activity for the brain, insufficient sleep reduces the desire and motivation for physical activity, contributing to weight gain, obesity, and other associated disorders . Therefore, many studies have been carried out to improve the quality of sleep, and these have developed sleep efficiency measurements and sleep stage classifications that can produce practical and comfortable techniques that can be used by anyone.
Nowadays, numerous wearable fitness devices (e.g., Nike+ FuelBand™, Fitbit® and Jawbone) include sleep tracking functions that are based on movement signal detection and pattern recognition. Furthermore, smartphone-based sleep measurement techniques have also been developed to provide personalized sleep-care .
Snoring disturbs good sleep, and The American Association of Sleep Medicine (AASM) defines snoring as "loud upper airway breathing, without apnea or hypoventilation, caused by vibrations of the pharyngeal tissues” . It is a widely encountered condition that has a number of negative personal and social effects and is associated with severe health problems. Worldwide, Snoring affects over 60% of adult men and over 44% of women over the age of 40 [5, 6]. Obstructive Sleep Apnea (OSA) is the most common disease related to snoring, and an estimated 24% of men and 9% of women aged 30–60 years are reported to satisfy the minimal diagnostic criteria for OSA, which indicates that the individual must have more than five occurrences of apnea or hypopnea per hour of sleep, accompanied with daytime hypersomnolence (excessive sleepiness) . However, results have shown that most subjects with at least moderate sleep apnea (82% of men and 93% of women) remain undiagnosed . The main reason for this is that the subjects cannot recognize the seriousness of their snoring because it occurs during sleep. In addition, simple and low-cost instruments have not yet been commercialized for mass screening of the population. Manual recording and examination of a person's respiratory sounds for the entire night can be a very time-consuming and operator-dependent task. Therefore, an automatic sound recording technique is desirable.
Polysomnography (PSG), performed over a full night's sleep, is presently the standard method used to diagnose sleep apnea [9–11]. It consists of recording a patient’s physiological signals, including an electrocardiogram (ECG), electromyogram (EMG), electroencephalogram (EEG), electrooculogram (EOG), oral/nasal airflow, intensity of snoring sounds, thoracic and abdominal movements, and blood oxygen saturation (SpO2). Though, these physiological signals provide plentiful information to the specialist or the technician for proper diagnosis of sleep apnea and other sleep disorders [12, 13], various sensors or probes (electrodes, oximeter, thermistor) have to be attached to the subject’s body to measure these physiological parameters. This is a time-consuming procedure which can produce discomfort in the patient. In fact, many patients cannot sleep well during PSG tests due to the discomfort of the enormous leadwire required for these. Therefore, there is a need for simplified recording and monitoring instruments that are capable of convenient and reliable diagnosis/screening of OSA at home .
Numerous studies have developed portable technology that can provide personal care or home care . However, these have required complex sensors and leads to measure airflow, oximetry, effort and position. Moreover, they have a major disadvantage in that they require an experienced medical technologist at the site to perform the tests so that an acceptable accuracy, sensitivity, and specificity can be obtained. In other words, the techniques based on sensors connected to the body make the devices difficult to use by untrained individuals .
Recent studies on snoring and asthma have arrived at similar conclusions [7, 16]. In these, sounds are often recorded throughout the entire night, including not only snoring, but also other noises. The most important goal of these studies is to distinguish between snoring and other nocturnal sounds or external noises. Unfortunately, simply monitoring the sound intensity on the sternal notch is not a sufficient solution for the problem, and more complex signal processing and analysis techniques need to be employed to properly define and measure snoring. Therefore, snoring has also been analyzed and measured over the frequency and time domain, and it should be further analyzed with a particular acoustic technique .
Snoring can be measured more easily relative to other physiological signals because it is a kind of acoustic signal that can be measured in a non-contact manner. Several algorithms have been presented to detect snoring in sound recordings. Most of the research so far, however, has been performed in a controlled space without noise, and the signal quality has been controlled using an expensive recording system. For example, in previous studies, a commercialized high-performance microphone, such as a Sennhiser ME 64 condenser microphone with a 40–20,000 Hz ± 2.5 dB frequency response was used to produce the recording. Moreover, the recording circumstances were strictly controlled to minimize outside noises, and the microphone was normally placed 15 cm over the patient’s head during sleep.
The purpose of this study is to develop a snoring detection algorithm that can be used on a smartphone in a standard bedroom, rather than using a professional sound recording equipment in a controlled sleep environment. In other words, we have focused on developing a practical sleep monitoring solution that can provide ubiquitous healthcare. To this end, the proposed technique only used the built-in microphone of a smartphone, for which specifications are unavailable, and snoring sounds were recorded at a random distance on the bedside, like in an actual sleep environment. Moreover, unlike in previous studies, we consider the frequent noises that can be heard in a real-world setting where an individual is sleeping.
To develop the snoring detection algorithm, a database was constructed that includes sounds recorded during actual sleep, including snoring, then pre-processing algorithms were developed for noise reduction and snoring feature extraction where snoring was classified via discriminant analysis. An Android smartphone, Samsung GT-I9300 (Galaxy S3™), was used to record the snoring, and Mathworks MATLAB™ 2011b was used to analyze the recorded sounds and to develop the snoring detection algorithm.
In an actual sleep environment, both snoring and a variety of other noises were recorded simultaneously. The sounds from ringing alarms and coughing were recorded naturally and were classified by the researchers, while the other sounds were generated manually under the same circumstances. All data were collected in an ordinary bedroom, and outside noises, such as car horns, were excluded in our experiment.
Information of the recorded sound
Type of sound
Number of recordings
The length of the recording after preprocessing (s) (Mean ± SD)
11.37 ± 1.82
6.24 ± 1.50
2.07 ± 0.32
5.24 ± 1.20
13.30 ± 2.59
17.54 ± 6.06
13.10 ± 1.40
7.18 ± 0.94
4.34 ± 1.01
Though snoring is a kind of bioacoustic signal that is represented by sound, it includes both mechanical vibrations of the upper airway and acoustic sounds. Previous studies have tried to identify the characteristics of snoring, but consistent results could not be obtained. The frequency of snoring recorded in most other studies differed due as a result of the individual’s characteristics or due to the experimental setup. In this research, we have focused on the acoustic and mechanical characteristics of snoring. Snoring by healthy people, without apnea episodes, has been established to have a fundamental frequency ranging from 110–190 Hz [17, 18], and frequency components higher than 800 Hz occur in patients with OSA [19, 20].
Feature list from the formant analysis
Frequency of the first formant
Kurtosis of the magnitude spectrum
Skweness of the magnitude spectrum
The total number of formants
The ratio of the magnitude between the first formant and the formant for which the value has a maximum value
The sum of the formant’s magnitude in the range of f > 500 Hz
Frequency of the formant which has the maximum value
The ratio between the sum of the formant’s magnitude in a range of f > 500 Hz and the total number of formants
KUR f , f max(F) - 10 Hz < f < f max(F) + 10 Hz
Kurtosis of the frequency which has a maximum magnitude with a 10 Hz margin on both sides
The ratio between the sum of the formant’s magnitude in the range of 180 Hz < f < 220 Hz and 1000 Hz < f < 1500 Hz, and the total number of formants
The ratio between the sum of the formant’s magnitude in the range of 180 Hz < f <220 Hz and the total number of formants
The ratio between the sum of the formant’s magnitude in the range of 1000 Hz < f <1500 Hz and the total number of formants
The ratio between the sum of the formant’s magnitude which has a maximum magnitude with a 10 Hz margin on both sides and the total number of formants
In this paper, the prior-probability is based on an uninformative prior, and for the classification procedure, we tested every feature in pairs and analyzed the results. Feature 7 shows the best snoring classification performance, and Features 5, 10, and 11 show higher classification performances, in that order.
Evaluation and validation
where TP, TN, FP and FN indicate the true positive, true negative, false positive, and false negative, respectively.
Quantitative result of the formant analysis
Type of sound
Value (mean ± SD)
Number of formants
1433 ± 920
772 ± 709
1.89 ± 6.10
2.59 ± 7.07
4.8 ± 3.3
710 ± 960
289 ± 140
1.81 ± 3.67
1.96 ± 3.63
5.2 ± 2.9
175 ± 5
175 ± 5
0.44 ± 0.05
0.44 ± 0.05
9.7 ± 2.9
255 ± 4
255 ± 4
0.82 ± 0.06
0.82 ± 0.06
4.2 ± 0.4
1219 ± 601
509 ± 292
0.37 ± 1.22
0.51 ± 1.21
7.1 ± 2.9
1193 ± 598
790 ± 359
0.79 ± 1.49
0.10 ± 0.15
4.8 ± 2.7
368 ± 96
274 ± 54
0.50 ± 1.00
0.06 ± 0.10
3.2 ± 1.8
189 ± 11
189 ± 11
0.07 ± 0.02
0.07 ± 0.02
3.0 ± 1.1
522 ± 600
231 ± 56
0.12 ± 0.28
0.22 ± 0.34
4.2 ± 2.3
Formant analysis resulted in several ambiguities for snoring detection. The primary unsolved problem is a lack of clarity of the formant frequencies and lack of meaning of the formant magnitude. Since the purpose of this research was to develop a snoring detection technique, a detailed analysis related to the characteristics of the formants of snoring sounds was not carried out. In the results of this experiment, only the ratio of the magnitude of the formants was used as a feature for classification since the absolute magnitude of the formants could vary across recordings. Another ambiguity was related to the energy of the recorded sound because the energy of the frequency has different characteristic depending on the subject. These ambiguities are natural and necessary in practical situations because the measurement conditions, including the distance to the recorder or the recorder direction, could never be the same for every case. Moreover, every human has a different respiratory structure, and the vibration patterns depend on the airway structure, creating different patterns of sound for each individual. However, we could postulate that the energy of snoring is concentrated within a specific frequency range because the variations in the mechanical characteristics have a limited range. Therefore, the shape of the waveform and the energy distribution of snoring could have common factors but will be slightly different for every subject.
In this paper, we empirically set the snoring-related frequencies to around 200 Hz and 1000 Hz. Several studies have referred the frequencies of snoring, but every researcher had a different definition. This may be due to the use of different approaches to define snoring. For example, snoring is regarded as a sound, but it is sometimes interpreted as a vibration or of a mixed type. In this paper, snoring was analyzed as a vibrational signal from the human respiratory structure. However, the above ambiguities still remain unsolved.
In this study, we proposed a snoring detection technique that can be implemented in a smartphone application and can therefore be used during real-world sleep conditions. Though it has a positive predictivity (70.38%), the probability that the detected snoring instance is a real snoring event is relatively lower than that of other studies, but the proposed method shows performance that is competitive in terms of accuracy (95.07%), sensitivity (98.58%), and specificity (94.62%). These results indicate that a sleep management technique implemented on mobile devices, especially on smartphones, could be a promising approach to record sleep patterns and to give proper feedback to the individual.
Snoring, a common sleep problem, is a very important issue for sleep management because it could cause serious sleep related diseases, such as OSA or other complications. Since the proposed method was designed for use in an uncontrolled environment of a private bedroom using a built-in recording system, some of the classification results, such as positive productivity, were low relative to the results of previous studies that had been conducted in a controlled sleep environment using a professional recording system. Moreover, the proposed method was evaluated with the inclusion of various noises, which would be another cause for false positive occurrences. Due to these circumstances, the results indicate that the proposed snoring detection algorithm showed acceptable performance since it used a dataset recorded under practical sleep conditions.
The proposed method would show better performance if it were used in a noise-free environment, as in the other research. To improve the performance of the proposed algorithm, we should consider improving the detection features or the advanced classifiers as part of future work. Also, we expect that a simultaneous use of multiple detection features will enhance the accuracy. Although there is still much to be improved, the proposed method presents a competitive performance and is meaningful as a first trial for snoring detection performed by a smartphone, for simple self-diagnosis of sleep.
This research will contribute to the development of mobile healthcare technology, and we expect that more techniques will be developed using a smartphone platform for bedside use for daily life.
This research was supported by the MSIP(Ministry of Science, ICT&Future Planning), Korea, under the C-ITRC(Convergence Information Technology Research Center) support program (NIPA-2014-H0401-14-1022) supervised by the NIPA(National IT Industry Promotion Agency).
- Colten HR, Altevogt BM: Sleep Disorders and Sleep Deprivation: An Unmet Public Health Problem. Edited by: Colten HR, Altevogt BM. US: National Academies Press; 2006. . ISBN-10: 0–309–10111–5 http://www.ncbi.nlm.nih.gov/books/NBK19960/ Google Scholar
- Van Dongen HP, Maislin G, Mullington JM, Dinges DF: The cumulative cost of additional wakefulness: dose–response effects on neurobehavioral functions and sleep physiology from chronic sleep restriction and total sleep deprivation. Sleep-New York Then Westchester 2003, 26: 117–129.Google Scholar
- Shin H, Choi B, Kim D, Cho J: Robust Sleep Quality Quantification Method for a Personal Handheld Device. Telemed J E Health 2014,20(6):522–530. doi: 10.1089/tmj.2013.0216 10.1089/tmj.2013.0216View ArticleGoogle Scholar
- Thorpy MJ: Classification of sleep disorders. J Clin Neurophysiol 1990, 7: 67–81. 10.1097/00004691-199001000-00006View ArticleGoogle Scholar
- American Academy of Sleep Medicine: International classification of sleep disorders: diagnostic and coding manual. 2nd edition. Westchester, IL: American Academy of Sleep Medicine; 2005.Google Scholar
- Bailey DR: Sleep disorders. Overview and relationship to orofacial pain. Dent Clin North Am 1997, 41: 189–209.Google Scholar
- Young T, Palta M, Dempsey J, Skatrud J, Weber S, Badr S: The occurrence of sleep-disordered breathing among middle-aged adults. N Engl J Med 1993, 328: 1230–1235. 10.1056/NEJM199304293281704View ArticleGoogle Scholar
- Bellia V, Cuttitta G, Insalaco G, Visconti A, Bonsignore G: Relationship of nocturnal bronchoconstriction to sleep stages. Am Rev Respir Dis 1989, 140: 363–367. 10.1164/ajrccm/140.2.363View ArticleGoogle Scholar
- Abeyratne UR, Wakwella AS, Hukins C: Pitch jump probability measures for the analysis of snoring sounds in apnea. Physiol Meas 2005, 26: 779–798. 10.1088/0967-3334/26/5/016View ArticleGoogle Scholar
- Guilleminault C, Stoohs R, Clerk A, Cetel M, Maistros P: A cause of excessive daytime sleepiness. The upper airway resistance syndrome. Chest 1993, 104: 781–787. 10.1378/chest.104.3.781View ArticleGoogle Scholar
- Hirano Y, Katayama S: Sleep-related disorders breathing and internal diseases. Kokyu To Junkan 1989, 37: 11–16.Google Scholar
- Hudgel DW: Variable site of airway narrowing among obstructive sleep apnea patients. J Appl Physiol 1986, 61: 1403–1409.Google Scholar
- Shepard JW Jr, Thawley SE: Evaluation of the upper airway by computerized tomography in patients undergoing uvulopalatopharyngoplasty for obstructive sleep apnea. Am Rev Respir Dis 1989, 140: 711–716. 10.1164/ajrccm/140.3.711View ArticleGoogle Scholar
- Dalmasso F, Benedetto G, Pogolotti R, Righini G, Spagnolo R: Digital processing of snoring sounds. Eur Respir J Suppl 1990, 11: 528s-532s.Google Scholar
- Jané R, Sola-Soler J, Fiz J, Morera J: Automatic detection of snoring signals: validation with simple snorers and OSAS patients. IEEE 2000, 4: 3129–3131.Google Scholar
- Chan CS, Woolcock AJ, Sullivan CE: Nocturnal asthma: role of snoring and obstructive sleep apnea. Am Rev Respir Dis 1988, 137: 1502–1504. 10.1164/ajrccm/137.6.1502View ArticleGoogle Scholar
- Cavusoglu M, Kamasak M, Erogul O, Ciloglu T, Serinagaoglu Y, Akcam T: An efficient method for snore/nonsnore classification of sleep sounds. Physiol Meas 2007, 28: 841–853. 10.1088/0967-3334/28/8/007View ArticleGoogle Scholar
- Pevernagie D, Aarts RM, De Meyer M: The acoustics of snoring. Sleep Med Rev 2010, 14: 131–144. 10.1016/j.smrv.2009.06.002View ArticleGoogle Scholar
- Fiz JA, Abad J, Jane R, Riera M, Mananas MA, Caminal P, Rodenstein D, Morera J: Acoustic analysis of snoring sound in patients with simple snoring and obstructive sleep apnoea. Eur Respir J 1996, 9: 2365–2370. 10.1183/09031936.96.09112365View ArticleGoogle Scholar
- Whitelaw W: Characteristics of the snoring noise in patients with and without occlusive sleep apnea. Am Rev Respir Dis 1993, 147: 635–644. 10.1164/ajrccm/147.3.635View ArticleGoogle Scholar
This article is published under license to BioMed Central Ltd. This is an Open Access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/4.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly credited. The Creative Commons Public Domain Dedication waiver (http://creativecommons.org/publicdomain/zero/1.0/) applies to the data made available in this article, unless otherwise stated.