We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 332760d commit 265bc5cCopy full SHA for 265bc5c
src/torchaudio/functional/filtering.py
@@ -1665,6 +1665,6 @@ def vad(
1665
if not has_triggered:
1666
return waveform[..., :0].view(shape[:-1] + torch.Size([0]))
1667
1668
- res = waveform[:, pos - samplesLen_ns + flushedLen_ns :]
+ res = waveform[:, max(pos - samplesLen_ns + flushedLen_ns, 0) :]
1669
# unpack batch
1670
return res.view(shape[:-1] + res.shape[-1:])
0 commit comments