MATLAB: Find the duration of speech

Image Processing Toolboxspeech processing

i have a video or audio with 2 persons speaking… Is it possible to get the
1. duration of speech by person1 and person2 separately
2. duration of overlapping speech
3. duration of silence also
from the video or audio input?

Best Answer

Why can't you just threshold the signal and then use regionprops() to find out where the silent regions start and stop? I know you've used regionprops() before.
[silentRegions, numRegions] = y < someThreshold;
labeledRegions = bwlabel(silentRegions);
props = regionprops(labeledRegions, 'PixelList');
for k = 1 : numRegions
fprintf('Silence region %d is between element %d and %d.\n',...
k, props(k).PixelList(1), props(k).PixelList(end));
end