문제

I am tying to do silence detection in uncompressed AIFF audio files. I prefer to do it in Python, but would consider other options if this is super inefficient. The uncompressed files I am dealing with are expected to be 20 MB (maximum size).

I can understand basics of signal processing, but am not an expert in it.

도움이 되었습니까?

해결책

You're in luck! The aifc library seems to do enough to support the solving of your problem.

다른 팁

Language-agnostic pseudo code:

  • for each time window (e.g. 10 ms)
    • calculate RMS power in time window
    • silence = RMS power < silence threshold

To calculate RMS power:

  • sum_sq = 0
  • for each sample in N sample window
    • sum_sq += sample^2
  • RMS power = sqrt(sum_sq / N)

You probably also want to add a further layer of detection, e.g. decide that silence = M consecutive silent windows, where M determines how long a silence needs to be before it counts as an actual silence.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top