Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
Torchaudio
Commits
63f0614b
"...text-generation-inference.git" did not exist on "95a4bb696a2388f34d50c6873ff93911d6b235de"
Unverified
Commit
63f0614b
authored
Aug 23, 2021
by
Arijit Roy
Committed by
GitHub
Aug 23, 2021
Browse files
Add example for Fade transform (#1719)
parent
ecfaac11
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
torchaudio/transforms.py
torchaudio/transforms.py
+5
-0
No files found.
torchaudio/transforms.py
View file @
63f0614b
...
@@ -997,6 +997,11 @@ class Fade(torch.nn.Module):
...
@@ -997,6 +997,11 @@ class Fade(torch.nn.Module):
fade_out_len (int, optional): Length of fade-out (time frames). (Default: ``0``)
fade_out_len (int, optional): Length of fade-out (time frames). (Default: ``0``)
fade_shape (str, optional): Shape of fade. Must be one of: "quarter_sine",
fade_shape (str, optional): Shape of fade. Must be one of: "quarter_sine",
"half_sine", "linear", "logarithmic", "exponential". (Default: ``"linear"``)
"half_sine", "linear", "logarithmic", "exponential". (Default: ``"linear"``)
Example
>>> waveform, sample_rate = torchaudio.load('test.wav', normalize=True)
>>> transform = transforms.Fade(fade_in_len=sample_rate, fade_out_len=2 * sample_rate, fade_shape='linear')
>>> faded_waveform = transform(waveform)
"""
"""
def
__init__
(
self
,
def
__init__
(
self
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment