version 4.32 (4.8 KB) by Alexis
Detects initiation and ending or maxima of respiratory events association with inhalation, especially for speech breathing.


Updated 12 Sep 2022

View License

This function is for use with a linear respiratory signal--typically meaning data produced with transducer breath belts. The function is optimised for speech breathing, which produces a highly irregular and idiosyncratic kinematic trace in comparison with "resting" or metabolic breathing. For instance, we have found from comparison with the acoustic speech spectrogram that speech-related inhalations often end before local maxima in the respiratory signal. breathTimes therefore performs slope grade analysis, among other steps, to search for abrupt reductions in the steepness of the positive-going signal, as opposed to absolute peaks. Similarly, inhalation onsets are not determined via the absolute minima or valleys in the respiratory signal, but rather based on prior context and thresholding within the inhalation slope. For more details, see my thesis.
breathTimes returns two time series: the first is for the initiations of inhalations, and the second is for the ending of inhalations. You can also optionally plot the results, to make sure the parameters are appropriate for your data. See comments for documentation.
I strongly recommend you combine this approach with speech analysis (i.e., using my other function Acoustic Landmarks) so that you can cross-corroborate and be sure your respiratory signal is doing what you think it is (for example, some peaks are in reality associated with exhalation during vocalisation, and not inhalation).
Example Usage: [onsets,offsets] = ...

Cite As

MacIntyre, A.D. 2022, The Analysis of Breathing and Rhythm in Speech, University of London, University College London (United Kingdom).

MATLAB Release Compatibility
Created with R2019a
Compatible with R2016a and later releases
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!