Gap detection
-
I have a big ogg file that contains words in a foreign language one after another with a small but noticeable gap between them. I want to be able to detect this gap and record the time in which it occurs. Is there a way to do this in c#? or could this data be somehow stored in the ogg file itself?
-
I have a big ogg file that contains words in a foreign language one after another with a small but noticeable gap between them. I want to be able to detect this gap and record the time in which it occurs. Is there a way to do this in c#? or could this data be somehow stored in the ogg file itself?
Tricky but entirely possible. First thing I'd do is convert from Vorbis to a good old fasioned PCM wav file (get some third party thing to do this for you). You then need to interpret that, its in RIFF format which is pretty straight forward. The quiet bits between words will be represented by a series of smaller numbers. Large numbers represent loud noises. So you need to pass the file looking for periods of lower value samples. Set a threshold and minimum duration. By knowing where you are in the file and the sample rate you can work out the times of the quiet bits. You might need to potentially create some sort of low pass filter to remove any artifacts which could confuse the procedure. Sounds grim but its easy enough. Sort of vague, but hope that helps a bit.
Regards, Rob Philpott.