Clear Filters
Clear Filters

How to get starting and ending limits of each silence interval?

3 views (last 30 days)
I have a code in which a Boolean vector(vad) the same length as the audio returns '1' for audio and '0' for silence. Now i want to get limits of each starting and ending silence interval... for example if silence bits start from 2 to 5 and 7 to 9 then i want to get this 2 to 5 and 7 to 9 limits. By using voicebox function activlev i get this logical array vad. http://www.ee.ic.ac.uk/hp/staff/dmb/voicebox/doc/voicebox/activlev.html
Can anyone help me?

Accepted Answer

Walter Roberson
Walter Roberson on 23 Aug 2016
There is a trick:
begin_positions = strfind(vad, [1 0])
end_positions = strfind(vad, [0 1])
you will probably need to adjust the boundary by + or - 1 for your purposes.
Beware the edge cases: plan ahead what you want to do if the data starts with silence (or starts with non-silence)
  33 Comments
ayesha jabeen
ayesha jabeen on 3 Oct 2016
Sir i have hide data by using LSB method.Data covered successfully in audio but when video is reconstructed by using this audio and after that extract data there is no hidden data in file.I can not understand why this problem is happening?What could that compress the file and due to this compression data is exiting from audio?tell me how do I solve this problem?
Walter Roberson
Walter Roberson on 10 Jul 2017
How are you saving the audio data into the video ? How are you constructing the video object when you do that?

Sign in to comment.

More Answers (0)

Categories

Find more on Audio Plugin Creation and Hosting in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!