"git@developer.sourcefind.cn:OpenDAS/vision.git" did not exist on "efb073682101e1f4f43e1f96a755f1e8ae6958ea"
Unverified Commit 4100ad89 authored by Vincent QB's avatar Vincent QB Committed by GitHub
Browse files

fix a few typos/grammar (#1397)

parent 80a8739a
...@@ -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 choosen 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 choosen 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)
......
...@@ -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 fucntion for phaser. Generates a table with given parameters r"""A helper function 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(feedback 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 preferred.
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 equalisation. Similar to SoX implementation. r"""Apply RIAA vinyl playback equalization. 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]
# Normalise to 0dB at 1kHz # Normalize 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
quiteter/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)
......
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