Commit 50bba1df authored by Ravi Makhija's avatar Ravi Makhija Committed by Facebook GitHub Bot
Browse files

Added example for SlidingWindowCmn transform (#2600)

Summary:
Added example for `SlidingWindowCmn` transform as mentioned in issue https://github.com/pytorch/audio/issues/1564

Pull Request resolved: https://github.com/pytorch/audio/pull/2600

Reviewed By: mthrok

Differential Revision: D38395579

Pulled By: carolineechen

fbshipit-source-id: 44c5b7181789eedcaaa1d80149d5a1ab8de4c0ba
parent bcf958f6
......@@ -1348,6 +1348,11 @@ class SlidingWindowCmn(torch.nn.Module):
center (bool, optional): If true, use a window centered on the current frame
(to the extent possible, modulo end effects). If false, window is to the left. (bool, default = false)
norm_vars (bool, optional): If true, normalize variance to one. (bool, default = false)
Example
>>> waveform, sample_rate = torchaudio.load('test.wav', normalize=True)
>>> transform = transforms.SlidingWindowCmn(cmn_window=1000)
>>> cmn_waveform = transform(waveform)
"""
def __init__(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment