Data reduction for cough studies using distribution of audio frequency content
© Barton et al.; licensee BioMed Central Ltd. 2012
Received: 15 March 2012
Accepted: 29 October 2012
Published: 12 December 2012
Recent studies suggest that objectively quantifying coughing in audio recordings offers a novel means to understand coughing and assess treatments. Currently, manual cough counting is the most accurate method for quantifying coughing. However, the demand of manually counting cough records is substantial, demonstrating a need to reduce record lengths prior to counting whilst preserving the coughs within them. This study tested the performance of an algorithm developed for this purpose.
20 subjects were recruited (5 healthy smokers and non-smokers, 5 chronic cough, 5 chronic obstructive pulmonary disease and 5 asthma), fitted with an ambulatory recording system and recorded for 24 hours. The recordings produced were divided into 15 min segments and counted. Periods of inactive audio in each segment were removed using the median frequency and power of the audio signal and the resulting files re-counted.
The median resultant segment length was 13.9 s (IQR 56.4 s) and median 24 hr recording length 62.4 min (IQR 100.4). A median of 0.0 coughs/h (IQR 0.0-0.2) were erroneously removed and the variability in the resultant cough counts was comparable to that between manual cough counts. The largest error was seen in asthmatic patients, but still only 1.0% coughs/h were missed.
These data show that a system which measures signal activity using the median audio frequency can substantially reduce record lengths without significantly compromising the coughs contained within them.
KeywordsAacoustics Cough sounds Monitoring
Cough is the commonest symptom reported by patients to doctors and presents as part of the symptom complex of many respiratory diseases [1, 2]. Until recent years the study of cough has been restricted by a lack of useful measurement tools, relying mainly upon subjective reporting of cough severity. The development of portable digital sound recording devices has allowed the number of cough sounds to be counted over extended time periods, providing an objective measure of cough rate and new insights into its determinants [3–6]. However, at present, sufficiently accurate algorithms are not in place to allow reliance upon fully automated detection systems. Patient recordings require laborious manual counting with confirmation of cough sounds by experienced observers. To enable studies of a meaningful size, either the present method of manual counting must be made more efficient, or for large studies an automatic system must be developed. The amount of data generated by larger cough studies requires either more trained human cough counters, or the computational power and algorithms to run an automatic system. Additionally, the constraints of battery life and integrated storage for a recording device can limit the scope of individual systems. A real-time algorithm embedded in a recording system which reduces the demand for data storage would reduce power consumption and increase the maximum possible record length achievable for such a system. Battery capacity remains a scarce resource for portable systems as longer battery lives in modern systems are enjoyed only as a result of such power demand reduction and not generally as a result of higher battery capacity. A system like this is essential for any medium to large study which seeks to make recordings of 24 hours or longer. Consequently, there is a need for a system which can minimise audio data prior to storage and cough counting in an effective manner without significantly affecting cough counts.
So far a number of projects have attempted to produce an automatic cough detection system , with limited success and no resultant commercially available system. Additionally, no research has been published which directly confronts the issue of data minimisation. The aim of this study is to provide the first of a series of modular elements of cough research software, which seeks to remove “inactive audio” from a patient recording. Inactive audio is defined as sections of a patient record which contain no sound that can be associated with cough and is not necessarily related to signal power. Simple approaches such as signal power thresholding are inappropriate for this application as cough sounds may not always be more powerful than inactive audio and quiet coughs may be of sufficiently low power to be rejected by a power threshold used alone. We have tried to overcome this by using the median frequency of the audio signal to provide a measure which is independent of signal power and can exploit the characteristic high frequency components of the cough sound.
We also aimed to address some of the difficulties in the assessment and reporting of the performance of automated cough detection systems. For example, the reporting of sensitivity, specificity and intra-class correlation coefficients may suggest systems perform accurately, when Bland-Altman plots of the same data suggest substantial errors in algorithm counts compared to the manual cough counts for individual subjects [8, 9]. Two primary performance measures of the proposed system will be investigated in this study; the ability of the system to reduce audio record lengths and also the “destructiveness” of the system, i.e. the extent to which the system erroneously removes cough sounds and how this compares to the differences seen between experienced manual cough counters.
57.4 yrs (±10.9)
54.0 yrs (±10.5)
57.4 yrs (±4.4)
50.4 yrs (±14.4)
67.6 yrs (±4.0)
Smoking Historypack yearsmedian (range)
FEV 1 % predicted (SD)
FEV1/FVC % ratio (SD)
The recording system and manual cough counting
The recording system used was the VitaloJAKTM (Vitalograph Ltd, Buckingham, UK), a two channel 24 h recording device with two sensors; one free air condenser microphone and one chest wall air-coupled condenser microphone. Recordings are made at a sample rate of 8 kHz and bit rate of 16 bits per sample and stored on a compact flash memory card.
Twenty-four hour recordings were made for all 20 patients, each of which was broken up into 15 minute segments for analysis. Each 15 minute segment was subsequently counted by trained manual cough counters (n = 3) and labelled with a number of coughs (Count A). We have previously demonstrated an excellent level of agreement between trained manual cough counters in a variety of diseases [6, 10, 11]. Additionally, 15 minute segments with zero cough counts were identified and excluded from testing the destructiveness of the algorithm as they would provide no useful information but still included in the data reduction analysis.
Assessment of file reduction
To measure the extent of audio reduction, the algorithm was used to process all of the 24 h recordings from the 20 patients and the positive records were produced to determine the length of the remaining audio. All the data were used as this provides a comprehensive measure of the reduction in storage requirements and duration of file for manual counting that the algorithm would generate. The data were then analysed both as individual segments and as full 24 h recordings to identify the level of reduction achieved.
Assessment of destructiveness
The value of the algorithm depends upon retention of an acceptable proportion of coughs from patient records. This can only be established by comparison with manual cough counts, despite such counts having an intrinsic variability. In our experience, the average agreement between manual cough counts is usually <1 cough/h and varies by approximately ±2 coughs/h (95% limits of agreement) [6, 10, 11]; thus an alternative approach to assessing algorithm performance is to compare the variability introduced by the algorithm to the intrinsic variability seen between manual counts. We find manual counts vary due to inconsistency from human error and from variable inter-observer interpretation of ‘borderline’ sounds (e.g. very quiet cough sounds and sounds difficult to classify as cough or throat clearing), where the algorithm will be more consistent, i.e. the same sound will always produce the same result.
To determine the magnitude of destructiveness, the algorithm was tested using 200 segments from 20 patients (34 healthy, 60 chronic cough, 54 COPD, 52 Asthma). Segments with no coughs counted by the initial manual counts (Count A) were eliminated from this test before selection of segments as they would provide no useful measure. Clearly for the healthy patients this results in a minimal number of useful segments such that there were fewer than 10, in this case the deficiencies in each individual were supplemented by random extra segments from other patient groups.
Once the segments were selected and processed, the positive and negative records were then returned to a single manual counter for counting (Count B and C respectively) in the same manner as unprocessed segments; the counter was blinded to the original counts (A). To cope with the potential for parts of a single cough to occur on both records (positive and negative), the manual counter was instructed to count only the start of a cough, i.e. its explosive phase. Ideally, the negative records should contain no coughs (C = 0) and the positive records should contain the same number of coughs as initially counted (B = A). Any coughs counted in negative records are referred to as ‘missed’ coughs. The total of both counts (B + C = D) was also compared to the original (A) as an indication of variability introduced by manual counting.
The different cough counts used in the statistical analysis are referred to by letter as follows:
Count A: Original counts of 15 minute segments
Count B: Counts from ‘positive’ reduced audio segments.
Count C: Counts from ‘negative’ reduced audio segments, also referred to as ‘missed coughs’.
Count D: Sum of counts from respective positive (B) and negative (C) segments for each 15 minute segment
Assessment of file reduction
For record lengths, we calculated the mean (standard deviation) as a percentage (%), duration (minutes) and skewness of the resultant length of both 15 minute segments and whole 24 h records. The minimum recording time required to capture a 24 h period for a given proportion of random recordings was estimated as a measure of the performance of the reduction with respect to change in demand on the recording hardware.
The t-distribution to estimate the statistics of patient recordings based on the data collected along with basic statistical measures such as mean, standard deviation and skewness.
Assessment of destructiveness
For destructiveness we calculated the mean missed cough rate per hour (coughs/hr) and the proportion of coughs missed (%) overall and per patient group, the average difference and the average rate of deviation (i.e. the absolute magnitude of the difference) from manual counts (coughs/hr) per patient group and overall. The deviation of cough counts from the original is the absolute value of the sum of positive and negative files (D) minus the original count (A) which can be represented as Abs(D-A).
The difference and the deviation in manual cough counts from the original files and both the algorithm processed files (B + A) was also calculated to provide a measure of variability between manual coughs.
Assessment of file reduction
A t-distribution with 19 degrees of freedom was used to estimate the expected minimum reduction across a given proportion of patients using the sample standard deviation and mean from the resultant lengths of the 20 full patient records. The estimated model showed that 99.9% of patient records would see a reduction down to at worst 23.1% (5.54 hours) and 95% of patient records would achieve better than down to 14.2% (3.41 hours) of original size.
Assessment of destructiveness
Cough counting results
Number of patients
Cough count for full files (A)
Positive file count (B)
Negative file count/Missed coughs (C)
Cough counts expressed as coughs per hour per patient; data are median (inter-quartile range)
(n = 20)
(n = 5)
(n = 5)
(n = 5)
(n = 5)
Full File Cough Rate (A)
Positive File Cough Rate (B)
Negative File Cough Rate (C)
% missed cough/h
Comparison of cough rates counted from positive algorithm files with original full files and comparison of cough rates counted from positive plus negative files with original full files; all data are median (inter-quartile range)
(n = 20)
(n = 5)
(n = 5)
(n = 5)
(n = 5)
Algorithm Difference (B-A)
0.0c/h (-1.2 to 0.4)
0.0c/h (0.0 to 0.2)
0.0c/h (-0.2 to 2.8)
0.0c/h (-2.5 to 1.4)
-3.2c/h (-6.2 to -0.2)
Manual Counters Difference (D-A)
0.0c/h (-0.4 to 0.4)
0.0c/h (0.0 to 0.2)
0.3c/h (-0.2 to 2.8)
0.0c/h (-2.5 to 1.6)
-0.4c/h (-3.2 to 0.4)
Algorithm Absolute deviation (B-A)
0.6c/h (0.0 to 2.9)
0.0c/h (0.0 to 0.2)
0.4c/h (0.0 to 2.8)
1.3c/h (0.4 to 2.8)
3.2c/h (0.6 to 6.2)
Manual Counters Absolute deviation Abs(D-A)
0.4c/h (0.0 to 2.0)
0.0c/h (0.0 to 0.2)
0.36c/h (0.2 to 2.8)
1.3c/h (0.6 to 2.8)
0.4c/h (0.4 to 3.2)
This study demonstrates that median frequency analysis can reduce 24 h audio records down to a median of just over 1 h in length, and the overall variability in the resultant cough counts is comparable to the current gold standard, which is seen between trained manual cough counters. It has also been estimated that for 99.9% of subjects the system can be expected to reduce data down to less than a quarter of its original size. The system can also be executed faster than real-time allowing it to be directly integrated to a recording system. With these results it is clear that this system can be of great use for the purposes of extending the recording time capabilities of a cough recording system and minimising data for storage prior to either manual or as an intermediate part of an automatic cough counting system.
Interestingly, median frequency analysis is not uncommonly used in the spectral analysis of other biomedical signals, such as EMG  and EEG , and has also been applied to the assessment of lung sounds. In asthma patients, changes in the median frequency of breath sounds reportedly correlates with changes in airway flows during bronchoconstriction [14, 15]. As coughing is typically associated with sudden increases in flow, this may in part explain the utility of this algorithm for identifying potential cough sounds.
The destructiveness of the algorithm was well within the previously reported tolerance of ±2coughs/hr for mean difference and also, more importantly, comparable to the difference between manual cough counters in this study (i.e. the original manual counts (A) and counts of positive and negative files combined (D)). This implies that the discrepancy between counts of processed and unprocessed data will mostly be explained by the disagreement in manual counts, rather than due to coughs erroneously removed. The reduced length of audio records may also help manual counters by reducing the challenge of maintaining full attention for long periods of time.
The majority (81%) of coughs missed by the algorithm were missed from one patient. Upon inspection of the raw data and measurement of the coughs missed, these coughs sounded muffled, as if either the mouth was closed or obstructed by a hand or clothing. They were low in volume causing the algorithm to reject them both on the grounds of being below the very low signal power threshold and below the median frequency required to prevent data removal. Due to the rarity of such incidents this would seem unlikely to be a significant problem and is not indicative of a particular problem with algorithm performance in asthma.
Recent publications suggest that automated/semi-automated cough detection systems may introduce significant errors into the resulting cough counts. As these errors randomly include both over-counting and under-counting, the average difference between algorithm counts and manual counts is often close to zero, but contain errors individual cough counts of ±40coughs/hr  and ±2coughs/minute . We suggest the method described here, comparing the variability introduced by any process used for cough detection with that intrinsic between trained cough counters (i.e. the gold standard), gives a more useful assessment of algorithm performance than those previously described . In addition calculation of the absolute deviation of algorithm counts from manual counts gives a more transparent quantification of errors.
Calculating resultant length of 24 h records using 20 patients, only allows for a conservative estimate and in future more patients should be studied to gain a clearer idea of how they vary. However, 20 patients is a relatively large number of patients for a cough related system validation [8, 9, 17] and highly demanding on manual counting resources to support findings. Moreover, a broader range of conditions was included than in other studies, suggesting this algorithm is robust to any differences in cough acoustics between different diseases. The disadvantage of this approach is that only small numbers of subjects were included for each diagnosis, allowing individual results to have undue influence, such as in our asthma data.
This study has demonstrated an algorithm based upon a median frequency threshold is capable of substantially shortening 24 h cough sound recordings with minimal loss of cough data. In recent years we have shown that the objective measurement of cough sounds is not only important in understanding the effects of anti-tussive agents [18, 19] but also provides novel insights into the mechanisms determining chronic coughing [5, 6]. This is an important development, not only facilitating the manual counting of cough sounds, currently the most accurate method for quantifying cough frequency, but also providing an essential step towards the development of more accurate automated algorithms.
Fast Fourier Transform
The absolute value of x (i.e. always positive).
AB funded by anonymous charitable donor with no influence in research. JAS is funded by an MRC fellowship. No funding body has had any influential role in the research undertaken.
Charitable donation to UHSM Endowment Fund.
- Burt CW, Schappert SM: Ambulatory care visits to physician offices, hospital outpatient departments, and emergency departments: United States, 1999--2000. Vital Health Stat. 2004, 13 (157): 1-70.Google Scholar
- Schappert SM, Burt CW: Ambulatory care visits to physician offices, hospital outpatient departments, and emergency departments: United States, 2001-02. Vital Health Stat. 2006, 13 (159): 1-66.Google Scholar
- Decalmer SC, Webster D, Kelsall AA, McGuinness K, Woodcock AA, Smith JA: Chronic cough: how do cough reflex sensitivity and subjective assessments correlate with objective cough counts during ambulatory monitoring?. Thorax. 2007, 62 (4): 329-334. 10.1136/thx.2006.067413.PubMed CentralView ArticlePubMedGoogle Scholar
- Marsden PA, Smith JA, Kelsall AA, Owen E, Naylor JR, Webster D, Sumner H, Alam U, McGuinness K, Woodcock AA: A comparison of objective and subjective measures of cough in asthma. J Allergy Clin Immunol. 2008, 122 (5): 903-907. 10.1016/j.jaci.2008.08.029.View ArticlePubMedGoogle Scholar
- Kelsall A, Decalmer S, McGuinness K, Woodcock A, Smith JA: Sex differences and predictors of objective cough frequency in chronic cough. Thorax. 2009, 64 (5): 393-398. 10.1136/thx.2008.106237.View ArticlePubMedGoogle Scholar
- Smith JA, Decalmer S, Kelsall A, McGuinness K, Jones H, Galloway S, Woodcock A, Houghton LA: Acoustic cough-reflux associations in chronic cough: potential triggers and mechanisms. Gastroenterology. 2010, 139 (3): 754-762. 10.1053/j.gastro.2010.06.050.View ArticlePubMedGoogle Scholar
- Smith J, Woodcock A: New developments in the objective assessment of cough. Lung. 2008, 186 (Suppl 1): S48-S54.View ArticlePubMedGoogle Scholar
- Birring SS, Fleming T, Matos S, Raj AA, Evans DH, Pavord ID: The Leicester cough monitor: preliminary validation of an automated cough detection system in chronic cough. Eur Respir J. 2008, 31 (5): 1013-1018. 10.1183/09031936.00057407.View ArticlePubMedGoogle Scholar
- Vizel E, Yigla M, Goryachev Y, Dekel E, Felis V, Levi H, Kroin I, Godfrey S, Gavriely N: Validation of an ambulatory cough detection and counting application using voluntary cough under different conditions. Cough. 2010, 6: 3-10.1186/1745-9974-6-3.PubMed CentralView ArticlePubMedGoogle Scholar
- Key AL, Holt K, Hamilton A, Smith JA, Earis JE: Objective cough frequency in idiopathic pulmonary fibrosis. Cough. 2010, 6: 4-10.1186/1745-9974-6-4.PubMed CentralView ArticlePubMedGoogle Scholar
- Smith JA, Owen EC, Jones AM, Dodd ME, Webb AK, Woodcock A: Objective measurement of cough during pulmonary exacerbations in adults with cystic fibrosis. Thorax. 2006, 61 (5): 425-429. 10.1136/thx.2005.050963.PubMed CentralView ArticlePubMedGoogle Scholar
- Farina D, Merletti R: Comparison of algorithms for estimation of EMG variables during voluntary isometric contractions. J Electromyogr Kinesiol. 2000, 10 (5): 337-349. 10.1016/S1050-6411(00)00025-0.View ArticlePubMedGoogle Scholar
- Tonner PH, Bein B: Classic electroencephalographic parameters: median frequency, spectral edge frequency etc. Best Pract Res Clin Anaesthesiol. 2006, 20 (1): 147-159. 10.1016/j.bpa.2005.08.008.View ArticlePubMedGoogle Scholar
- Malmberg LP, Sorva R, Sovijarvi AR: Frequency distribution of breath sounds as an indicator of bronchoconstriction during histamine challenge test in asthmatic children. Pediatr Pulmonol. 1994, 18 (3): 170-177. 10.1002/ppul.1950180309.View ArticlePubMedGoogle Scholar
- Anderson K, Aitken S, Carter R, MacLeod JE, Moran F: Variation of breath sound and airway caliber induced by histamine challenge. Am Rev Respir Dis. 1990, 141 (5 Pt 1): 1147-1150.View ArticlePubMedGoogle Scholar
- Morice AH, Fontana GA, Belvisi MG, Birring SS, Chung KF, Dicpinigaitis PV, Kastelik JA, McGarvey LP, Smith JA, Tatar M, Widdicombe J: ERS guidelines on the assessment of cough. Eur Respir J. 2007, 29 (6): 1256-1276. 10.1183/09031936.00101006.View ArticlePubMedGoogle Scholar
- Coyle MA, Keenan DB, Henderson LS, Watkins ML, Haumann BK, Mayleben DW, Wilson MG: Evaluation of an ambulatory system for the quantification of cough frequency in patients with chronic obstructive pulmonary disease. Cough. 2005, 1: 3-10.1186/1745-9974-1-3.PubMed CentralView ArticlePubMedGoogle Scholar
- Smith J, Owen E, Earis J, Woodcock A: Effect of codeine on objective measurement of cough in chronic obstructive pulmonary disease. J Allergy Clin Immunol. 2006, 117 (4): 831-835. 10.1016/j.jaci.2005.09.055.View ArticlePubMedGoogle Scholar
- Woodcock A, McLeod RL, Sadeh J, Smith J0041: The efficacy of a NOP1 agonist (SCH486757) in subacute cough. Lung. 2010, 188 (Suppl 1): S47-S52.View ArticlePubMedGoogle 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/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.