Shortcuts

asteroid.dsp.vad module

asteroid.dsp.vad.ebased_vad(mag_spec, th_db: int = 40)[source]

Compute energy-based VAD from a magnitude spectrogram (or equivalent).

Parameters:
  • mag_spec (torch.Tensor) – the spectrogram to perform VAD on. Expected shape (batch, *, freq, time). The VAD mask will be computed independently for all the leading dimensions until the last two. Independent of the ordering of the last two dimensions.
  • th_db (int) – The threshold in dB from which a TF-bin is considered silent.
Returns:

torch.BoolTensor, the VAD mask.

Examples
>>> import torch
>>> mag_spec = torch.abs(torch.randn(10, 2, 65, 16))
>>> batch_src_mask = ebased_vad(mag_spec)
Read the Docs v: v0.4.4
Versions
latest
stable
v0.4.4
v0.4.3
v0.4.2
v0.4.1
v0.4.0
v0.3.5_b
v0.3.4
v0.3.3
v0.3.2
v0.3.1
Downloads
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.