Identifying silence at the end of an mp3 using java

前端 未结 1 2054
醉话见心
醉话见心 2021-01-25 19:26

Trying to detect silence at the end of audio in mp3 format, well all formats would be useful but mp3 format is the most important

相关标签:
1条回答
  • 2021-01-25 19:47

    The only way I know of to reliably detect silence at the end of a sound clip is to convert it to a PCM format and do one of the following calculations checking for a certain minimum cut-off amplitude.

    • Decibels (dB)
    • Root Mean Square (RMS)

    I've never managed to implement dB, but RMS is relatively simple, and should work for this use. I used it for the small bars seen on the lower left/right of trace area of the DukeBox player.

    DukeBox screenshot

    As to how to do any of that with MP3 format, see the details on the Java Sound info. page.

    0 讨论(0)
提交回复
热议问题