Collect and label audio
Gather consented cough recordings with consistent metadata (device, environment) and clear labels for the target classes.
Classify cough sounds. Inspect the audio features.
Cough-sound classification aims to distinguish cough types or presence from audio recordings using signal features or learned spectrogram representations. Real-world challenges include background noise, recording device variability, overlapping speech, label noise, and privacy-consent for medical audio.
Learning concept · Not a validated service
Cough-sound classification aims to distinguish cough types or presence from audio recordings using signal features or learned spectrogram representations. Real-world challenges include background noise, recording device variability, overlapping speech, label noise, and privacy-consent for medical audio.
A proposed application: help clinicians triage audio-collected cough recordings as a screening aid. Any diagnostic or clinical use should keep a trained clinician in the loop; the supplied starter is only a toy baseline and not for clinical decisions.
Gather consented cough recordings with consistent metadata (device, environment) and clear labels for the target classes.
Compute mel-spectrograms, MFCCs or other time–frequency features and apply augmentation for noise and device variability.
Fit a baseline classifier with speaker- or recording-level splits and report class-wise metrics such as recall and precision.
Analyse errors by noise level, device type and patient group, and build a review workflow for ambiguous predictions.
The supplied starter synthesises two classes of 1s sine-tone signals with added Gaussian noise, computes simple FFT-derived summary features (mean, std, argmax, 95th percentile), then fits a RandomForestClassifier and prints a scikit-learn classification report.
def synth_clip(freq, label):
t = np.linspace(0, 1, sample_rate, endpoint=False)
signal = np.sin(2 * np.pi * freq * t) + 0.05 * rng.normal(size=sample_rate)
spectrum = np.abs(np.fft.rfft(signal))
features = [
spectrum.mean(),
spectrum.std(),
spectrum.argmax(),
np.percentile(spectrum, 95),
]The code does not use cough recordings or an audio dataset and it lacks realistic audio preprocessing (no mel-spectrograms, MFCCs or device/noise augmentation). Its synthetic sine tones are not representative of cough acoustics, so reported metrics do not validate a healthcare cough classifier.
A proposed extension: collect a consented small dataset of cough recordings, extract mel-spectrogram features, train a neural or tree-based model, and expose predictions with a clinician review queue for ambiguous cases.
This is a potential application pathway, not a delivered product. The supplied starter does not implement this service or validate it with real users.
Networkers Home runs this topic inside its AI Engineer Course, with placement support and hands-on labs.