espnet2.train.preprocessor.detect_non_silence
Less than 1 minute
espnet2.train.preprocessor.detect_non_silence
espnet2.train.preprocessor.detect_non_silence(x: ndarray, threshold: float = 0.01, frame_length: int = 1024, frame_shift: int = 512, window: str = 'boxcar') → ndarray
Power based voice activity detection.
- Parameters:x – (Channel, Time)
>>> x = np.random.randn(1000)
>>> detect = detect_non_silence(x)
>>> assert x.shape == detect.shape
>>> assert detect.dtype == np.bool