Identifying silence at the end of an mp3 using java

可紊 提交于 2019-12-02 07:06:36

问题


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:


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.

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



来源:https://stackoverflow.com/questions/10918200/identifying-silence-at-the-end-of-an-mp3-using-java

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!