Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Gap detection

Gap detection

Scheduled Pinned Locked Moved C#
csharpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    viciouskinid
    wrote on last edited by
    #1

    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?

    R 1 Reply Last reply
    0
    • V viciouskinid

      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?

      R Offline
      R Offline
      Rob Philpott
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups