I\'m trying to prepare some audio files for my neural network. In order to remove the silent parts I used a solution a user posted hier on SO:
def detect_leading_