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
4100ad89
"...text-generation-inference.git" did not exist on "8c3669b287a1c651cb07049e67f1ce5967828167"
Unverified
Commit
4100ad89
authored
Mar 17, 2021
by
Vincent QB
Committed by
GitHub
Mar 17, 2021
Browse files
fix a few typos/grammar (#1397)
parent
80a8739a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
test/torchaudio_unittest/transforms/librosa_compatibility_test.py
...chaudio_unittest/transforms/librosa_compatibility_test.py
+2
-2
torchaudio/functional/filtering.py
torchaudio/functional/filtering.py
+7
-7
No files found.
test/torchaudio_unittest/transforms/librosa_compatibility_test.py
View file @
4100ad89
...
@@ -219,7 +219,7 @@ class TestTransforms(common_utils.TorchaudioTestCase):
...
@@ -219,7 +219,7 @@ class TestTransforms(common_utils.TorchaudioTestCase):
spec_ta
=
spec_ta
.
sqrt
()
spec_ta
=
spec_ta
.
sqrt
()
threshold
=
2.0
threshold
=
2.0
# This threshold was cho
o
sen empirically, based on the following observation
# This threshold was chosen empirically, based on the following observation
#
#
# torch.dist(spec_lr, spec_ta, p=float('inf'))
# torch.dist(spec_lr, spec_ta, p=float('inf'))
# >>> tensor(1.9666)
# >>> tensor(1.9666)
...
@@ -234,7 +234,7 @@ class TestTransforms(common_utils.TorchaudioTestCase):
...
@@ -234,7 +234,7 @@ class TestTransforms(common_utils.TorchaudioTestCase):
self
.
assertEqual
(
spec_ta
,
spec_lr
,
atol
=
threshold
,
rtol
=
1e-5
)
self
.
assertEqual
(
spec_ta
,
spec_lr
,
atol
=
threshold
,
rtol
=
1e-5
)
threshold
=
1700.0
threshold
=
1700.0
# This threshold was cho
o
sen empirically, based on the following observations
# This threshold was chosen empirically, based on the following observations
#
#
# torch.dist(spec_orig, spec_ta, p=1)
# torch.dist(spec_orig, spec_ta, p=1)
# >>> tensor(1644.3516)
# >>> tensor(1644.3516)
...
...
torchaudio/functional/filtering.py
View file @
4100ad89
...
@@ -20,7 +20,7 @@ def _generate_wave_table(
...
@@ -20,7 +20,7 @@ def _generate_wave_table(
phase
:
float
,
phase
:
float
,
device
:
torch
.
device
,
device
:
torch
.
device
,
)
->
Tensor
:
)
->
Tensor
:
r
"""A helper fu
c
ntion for phaser. Generates a table with given parameters
r
"""A helper fun
c
tion for phaser. Generates a table with given parameters
.
Args:
Args:
wave_type (str): SINE or TRIANGULAR
wave_type (str): SINE or TRIANGULAR
...
@@ -625,7 +625,7 @@ def flanger(
...
@@ -625,7 +625,7 @@ def flanger(
Allowed range of values are 0 to 30
Allowed range of values are 0 to 30
depth (float): desired delay depth in milliseconds(ms)
depth (float): desired delay depth in milliseconds(ms)
Allowed range of values are 0 to 10
Allowed range of values are 0 to 10
regen (float): desired regen(feeback gain) in dB
regen (float): desired regen(fee
d
back gain) in dB
Allowed range of values are -95 to 95
Allowed range of values are -95 to 95
width (float): desired width(delay gain) in dB
width (float): desired width(delay gain) in dB
Allowed range of values are 0 to 100
Allowed range of values are 0 to 100
...
@@ -885,7 +885,7 @@ def lfilter(
...
@@ -885,7 +885,7 @@ def lfilter(
r
"""Perform an IIR filter by evaluating difference equation.
r
"""Perform an IIR filter by evaluating difference equation.
Note:
Note:
To avoid numerical problems, small filter order is prefered.
To avoid numerical problems, small filter order is prefer
r
ed.
Using double precision could also minimize numerical precision errors.
Using double precision could also minimize numerical precision errors.
Args:
Args:
...
@@ -1032,7 +1032,7 @@ def phaser(
...
@@ -1032,7 +1032,7 @@ def phaser(
Allowed range of values are 0 to 1
Allowed range of values are 0 to 1
gain_out (float): desired output gain at the boost (or attenuation) in dB
gain_out (float): desired output gain at the boost (or attenuation) in dB
Allowed range of values are 0 to 1e9
Allowed range of values are 0 to 1e9
delay_ms (float): desired delay in milli
seconds
delay_ms (float): desired delay in milliseconds
Allowed range of values are 0 to 5.0
Allowed range of values are 0 to 5.0
decay (float): desired decay relative to gain-in
decay (float): desired decay relative to gain-in
Allowed range of values are 0 to 0.99
Allowed range of values are 0 to 0.99
...
@@ -1105,7 +1105,7 @@ def phaser(
...
@@ -1105,7 +1105,7 @@ def phaser(
def
riaa_biquad
(
waveform
:
Tensor
,
sample_rate
:
int
)
->
Tensor
:
def
riaa_biquad
(
waveform
:
Tensor
,
sample_rate
:
int
)
->
Tensor
:
r
"""Apply RIAA vinyl playback equali
s
ation. Similar to SoX implementation.
r
"""Apply RIAA vinyl playback equali
z
ation. Similar to SoX implementation.
Args:
Args:
waveform (Tensor): audio waveform of dimension of `(..., time)`
waveform (Tensor): audio waveform of dimension of `(..., time)`
...
@@ -1149,7 +1149,7 @@ def riaa_biquad(waveform: Tensor, sample_rate: int) -> Tensor:
...
@@ -1149,7 +1149,7 @@ def riaa_biquad(waveform: Tensor, sample_rate: int) -> Tensor:
a1
=
-
(
poles
[
0
]
+
poles
[
1
])
a1
=
-
(
poles
[
0
]
+
poles
[
1
])
a2
=
poles
[
0
]
*
poles
[
1
]
a2
=
poles
[
0
]
*
poles
[
1
]
# Normali
s
e to 0dB at 1kHz
# Normali
z
e to 0dB at 1kHz
y
=
2
*
math
.
pi
*
1000
/
sample_rate
y
=
2
*
math
.
pi
*
1000
/
sample_rate
b_re
=
b0
+
b1
*
math
.
cos
(
-
y
)
+
b2
*
math
.
cos
(
-
2
*
y
)
b_re
=
b0
+
b1
*
math
.
cos
(
-
y
)
+
b2
*
math
.
cos
(
-
2
*
y
)
a_re
=
a0
+
a1
*
math
.
cos
(
-
y
)
+
a2
*
math
.
cos
(
-
2
*
y
)
a_re
=
a0
+
a1
*
math
.
cos
(
-
y
)
+
a2
*
math
.
cos
(
-
2
*
y
)
...
@@ -1329,7 +1329,7 @@ def vad(
...
@@ -1329,7 +1329,7 @@ def vad(
to search for quieter/shorter bursts of audio to include prior
to search for quieter/shorter bursts of audio to include prior
to the detected trigger point. (Default: 1.0)
to the detected trigger point. (Default: 1.0)
allowed_gap (float, optional): The allowed gap (in seconds) between
allowed_gap (float, optional): The allowed gap (in seconds) between
qui
t
eter/shorter bursts of audio to include prior
quieter/shorter bursts of audio to include prior
to the detected trigger point. (Default: 0.25)
to the detected trigger point. (Default: 0.25)
pre_trigger_time (float, optional): The amount of audio (in seconds) to preserve
pre_trigger_time (float, optional): The amount of audio (in seconds) to preserve
before the trigger point and any found quieter/shorter bursts. (Default: 0.0)
before the trigger point and any found quieter/shorter bursts. (Default: 0.0)
...
...
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