Commit 068fc29c authored by Ravi Makhija's avatar Ravi Makhija Committed by Facebook GitHub Bot
Browse files

Added example for LFCC transform (#2640)

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

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

Reviewed By: carolineechen

Differential Revision: D38908975

Pulled By: nateanl

fbshipit-source-id: ffdd994390db7f27556b011a8050a65eef9cd09d
parent c0815850
......@@ -757,6 +757,14 @@ class LFCC(torch.nn.Module):
log_lf (bool, optional): whether to use log-lf spectrograms instead of db-scaled. (Default: ``False``)
speckwargs (dict or None, optional): arguments for Spectrogram. (Default: ``None``)
Example
>>> waveform, sample_rate = torchaudio.load("test.wav", normalize=True)
>>> transform = transforms.LFCC(
>>> sample_rate=sample_rate,
>>> n_lfcc=13,
>>> speckwargs={"n_fft": 400, "hop_length": 160, "center": False},
>>> )
>>> lfcc = transform(waveform)
See also:
:py:func:`torchaudio.functional.linear_fbanks` - The function used to
......
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