Silence detection in .wav file RRS feed

  • Question

  • Hello!

    I have 3 songs in one .wav file (At first I converted .mp3 file to .wav using MediaTranscoder)

    I need to cut this file and get 3 separate songs.

    I need to use RMS algorithm for silence detection (I cannot use any of third parties libraries).

    Now I can create array data with volume values (-32768 to 32767), also I know that it is: 1 channel, mono,  256 kbps, 44.1 kHz

    Could some one explain me how it can be realized?

    (step by step, pseudo code or using C# - will be great,....)

    Thank you.

    • Edited by Timaxoxa Monday, October 19, 2015 2:46 PM
    Monday, October 19, 2015 2:46 PM


  • Hi Timaxoxa,

    Audio analysis is a difficult thing requiring a lot of complex math. If the audio that you are trying to edit is captured from an analog source, the chances are that there isn't any silence, they will only be areas of soft noise (line hum, ambient background noise, etc).

    An algorithm that should work would be to determine a minimum volume threshold and duration. This article(Sound visualizer in C# ) looks interesting. It describes C# code to draw a waveform. That’s the same kind of code which could be used to do other amplitude analysis.

    Best Regards,

    Xavier Eoro

    Note: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by Xavier Xie-MSFT Monday, October 26, 2015 7:44 AM
    • Marked as answer by Timaxoxa Wednesday, October 28, 2015 1:07 PM
    Wednesday, October 21, 2015 1:50 AM