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
32cd700a
Unverified
Commit
32cd700a
authored
Mar 15, 2021
by
moto
Committed by
GitHub
Mar 15, 2021
Browse files
Fix JSON Lines file extension (#1392)
parent
2a3d52ff
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
11 additions
and
11 deletions
+11
-11
test/torchaudio_unittest/assets/kaldi_test_fbank_args.jsonl
test/torchaudio_unittest/assets/kaldi_test_fbank_args.jsonl
+0
-0
test/torchaudio_unittest/assets/kaldi_test_mfcc_args.jsonl
test/torchaudio_unittest/assets/kaldi_test_mfcc_args.jsonl
+0
-0
test/torchaudio_unittest/assets/kaldi_test_pitch_args.jsonl
test/torchaudio_unittest/assets/kaldi_test_pitch_args.jsonl
+0
-0
test/torchaudio_unittest/assets/kaldi_test_spectrogram_args.jsonl
...chaudio_unittest/assets/kaldi_test_spectrogram_args.jsonl
+0
-0
test/torchaudio_unittest/assets/sox_effect_test_args.jsonl
test/torchaudio_unittest/assets/sox_effect_test_args.jsonl
+0
-0
test/torchaudio_unittest/functional/kaldi_compatibility_test_impl.py
...udio_unittest/functional/kaldi_compatibility_test_impl.py
+1
-1
test/torchaudio_unittest/sox_effect/smoke_test.py
test/torchaudio_unittest/sox_effect/smoke_test.py
+3
-3
test/torchaudio_unittest/sox_effect/sox_effect_test.py
test/torchaudio_unittest/sox_effect/sox_effect_test.py
+2
-2
test/torchaudio_unittest/sox_effect/torchscript_test.py
test/torchaudio_unittest/sox_effect/torchscript_test.py
+2
-2
test/torchaudio_unittest/transforms/kaldi_compatibility_impl.py
...orchaudio_unittest/transforms/kaldi_compatibility_impl.py
+3
-3
No files found.
test/torchaudio_unittest/assets/kaldi_test_fbank_args.json
→
test/torchaudio_unittest/assets/kaldi_test_fbank_args.json
l
View file @
32cd700a
File moved
test/torchaudio_unittest/assets/kaldi_test_mfcc_args.json
→
test/torchaudio_unittest/assets/kaldi_test_mfcc_args.json
l
View file @
32cd700a
File moved
test/torchaudio_unittest/assets/kaldi_test_pitch_args.json
→
test/torchaudio_unittest/assets/kaldi_test_pitch_args.json
l
View file @
32cd700a
File moved
test/torchaudio_unittest/assets/kaldi_test_spectrogram_args.json
→
test/torchaudio_unittest/assets/kaldi_test_spectrogram_args.json
l
View file @
32cd700a
File moved
test/torchaudio_unittest/assets/sox_effect_test_args.json
→
test/torchaudio_unittest/assets/sox_effect_test_args.json
l
View file @
32cd700a
File moved
test/torchaudio_unittest/functional/kaldi_compatibility_test_impl.py
View file @
32cd700a
...
@@ -43,7 +43,7 @@ class KaldiCPUOnly(TempDirMixin, TestBaseMixin):
...
@@ -43,7 +43,7 @@ class KaldiCPUOnly(TempDirMixin, TestBaseMixin):
expected
=
expected
.
to
(
dtype
=
self
.
dtype
,
device
=
self
.
device
)
expected
=
expected
.
to
(
dtype
=
self
.
dtype
,
device
=
self
.
device
)
self
.
assertEqual
(
output
,
expected
,
rtol
=
rtol
,
atol
=
atol
)
self
.
assertEqual
(
output
,
expected
,
rtol
=
rtol
,
atol
=
atol
)
@
parameterized
.
expand
(
load_params
(
'kaldi_test_pitch_args.json'
))
@
parameterized
.
expand
(
load_params
(
'kaldi_test_pitch_args.json
l
'
))
@
skipIfNoExec
(
'compute-kaldi-pitch-feats'
)
@
skipIfNoExec
(
'compute-kaldi-pitch-feats'
)
def
test_pitch_feats
(
self
,
kwargs
):
def
test_pitch_feats
(
self
,
kwargs
):
"""compute_kaldi_pitch produces numerically compatible result with compute-kaldi-pitch-feats"""
"""compute_kaldi_pitch produces numerically compatible result with compute-kaldi-pitch-feats"""
...
...
test/torchaudio_unittest/sox_effect/smoke_test.py
View file @
32cd700a
...
@@ -25,7 +25,7 @@ class SmokeTest(TempDirMixin, TorchaudioTestCase):
...
@@ -25,7 +25,7 @@ class SmokeTest(TempDirMixin, TorchaudioTestCase):
however without such tools, the correctness of each function cannot be verified.
however without such tools, the correctness of each function cannot be verified.
"""
"""
@
parameterized
.
expand
(
@
parameterized
.
expand
(
load_params
(
"sox_effect_test_args.json"
),
load_params
(
"sox_effect_test_args.json
l
"
),
name_func
=
lambda
f
,
i
,
p
:
f
'
{
f
.
__name__
}
_
{
i
}
_
{
p
.
args
[
0
][
"effects"
][
0
][
0
]
}
'
,
name_func
=
lambda
f
,
i
,
p
:
f
'
{
f
.
__name__
}
_
{
i
}
_
{
p
.
args
[
0
][
"effects"
][
0
][
0
]
}
'
,
)
)
def
test_apply_effects_tensor
(
self
,
args
):
def
test_apply_effects_tensor
(
self
,
args
):
...
@@ -39,7 +39,7 @@ class SmokeTest(TempDirMixin, TorchaudioTestCase):
...
@@ -39,7 +39,7 @@ class SmokeTest(TempDirMixin, TorchaudioTestCase):
_found
,
_sr
=
sox_effects
.
apply_effects_tensor
(
original
,
input_sr
,
effects
)
_found
,
_sr
=
sox_effects
.
apply_effects_tensor
(
original
,
input_sr
,
effects
)
@
parameterized
.
expand
(
@
parameterized
.
expand
(
load_params
(
"sox_effect_test_args.json"
),
load_params
(
"sox_effect_test_args.json
l
"
),
name_func
=
lambda
f
,
i
,
p
:
f
'
{
f
.
__name__
}
_
{
i
}
_
{
p
.
args
[
0
][
"effects"
][
0
][
0
]
}
'
,
name_func
=
lambda
f
,
i
,
p
:
f
'
{
f
.
__name__
}
_
{
i
}
_
{
p
.
args
[
0
][
"effects"
][
0
][
0
]
}
'
,
)
)
def
test_apply_effects_file
(
self
,
args
):
def
test_apply_effects_file
(
self
,
args
):
...
@@ -58,7 +58,7 @@ class SmokeTest(TempDirMixin, TorchaudioTestCase):
...
@@ -58,7 +58,7 @@ class SmokeTest(TempDirMixin, TorchaudioTestCase):
input_path
,
effects
,
normalize
=
False
,
channels_first
=
channels_first
)
input_path
,
effects
,
normalize
=
False
,
channels_first
=
channels_first
)
@
parameterized
.
expand
(
@
parameterized
.
expand
(
load_params
(
"sox_effect_test_args.json"
),
load_params
(
"sox_effect_test_args.json
l
"
),
name_func
=
lambda
f
,
i
,
p
:
f
'
{
f
.
__name__
}
_
{
i
}
_
{
p
.
args
[
0
][
"effects"
][
0
][
0
]
}
'
,
name_func
=
lambda
f
,
i
,
p
:
f
'
{
f
.
__name__
}
_
{
i
}
_
{
p
.
args
[
0
][
"effects"
][
0
][
0
]
}
'
,
)
)
def
test_apply_effects_fileobj
(
self
,
args
):
def
test_apply_effects_fileobj
(
self
,
args
):
...
...
test/torchaudio_unittest/sox_effect/sox_effect_test.py
View file @
32cd700a
...
@@ -64,7 +64,7 @@ class TestSoxEffectsTensor(TempDirMixin, PytorchTestCase):
...
@@ -64,7 +64,7 @@ class TestSoxEffectsTensor(TempDirMixin, PytorchTestCase):
self
.
assertEqual
(
expected
,
found
)
self
.
assertEqual
(
expected
,
found
)
@
parameterized
.
expand
(
@
parameterized
.
expand
(
load_params
(
"sox_effect_test_args.json"
),
load_params
(
"sox_effect_test_args.json
l
"
),
name_func
=
lambda
f
,
i
,
p
:
f
'
{
f
.
__name__
}
_
{
i
}
_
{
p
.
args
[
0
][
"effects"
][
0
][
0
]
}
'
,
name_func
=
lambda
f
,
i
,
p
:
f
'
{
f
.
__name__
}
_
{
i
}
_
{
p
.
args
[
0
][
"effects"
][
0
][
0
]
}
'
,
)
)
def
test_apply_effects
(
self
,
args
):
def
test_apply_effects
(
self
,
args
):
...
@@ -113,7 +113,7 @@ class TestSoxEffectsFile(TempDirMixin, PytorchTestCase):
...
@@ -113,7 +113,7 @@ class TestSoxEffectsFile(TempDirMixin, PytorchTestCase):
self
.
assertEqual
(
expected
,
found
)
self
.
assertEqual
(
expected
,
found
)
@
parameterized
.
expand
(
@
parameterized
.
expand
(
load_params
(
"sox_effect_test_args.json"
),
load_params
(
"sox_effect_test_args.json
l
"
),
name_func
=
lambda
f
,
i
,
p
:
f
'
{
f
.
__name__
}
_
{
i
}
_
{
p
.
args
[
0
][
"effects"
][
0
][
0
]
}
'
,
name_func
=
lambda
f
,
i
,
p
:
f
'
{
f
.
__name__
}
_
{
i
}
_
{
p
.
args
[
0
][
"effects"
][
0
][
0
]
}
'
,
)
)
def
test_apply_effects_str
(
self
,
args
):
def
test_apply_effects_str
(
self
,
args
):
...
...
test/torchaudio_unittest/sox_effect/torchscript_test.py
View file @
32cd700a
...
@@ -46,7 +46,7 @@ class SoxEffectFileTransform(torch.nn.Module):
...
@@ -46,7 +46,7 @@ class SoxEffectFileTransform(torch.nn.Module):
@
skipIfNoSox
@
skipIfNoSox
class
TestTorchScript
(
TempDirMixin
,
PytorchTestCase
):
class
TestTorchScript
(
TempDirMixin
,
PytorchTestCase
):
@
parameterized
.
expand
(
@
parameterized
.
expand
(
load_params
(
"sox_effect_test_args.json"
),
load_params
(
"sox_effect_test_args.json
l
"
),
name_func
=
lambda
f
,
i
,
p
:
f
'
{
f
.
__name__
}
_
{
i
}
_
{
p
.
args
[
0
][
"effects"
][
0
][
0
]
}
'
,
name_func
=
lambda
f
,
i
,
p
:
f
'
{
f
.
__name__
}
_
{
i
}
_
{
p
.
args
[
0
][
"effects"
][
0
][
0
]
}
'
,
)
)
def
test_apply_effects_tensor
(
self
,
args
):
def
test_apply_effects_tensor
(
self
,
args
):
...
@@ -72,7 +72,7 @@ class TestTorchScript(TempDirMixin, PytorchTestCase):
...
@@ -72,7 +72,7 @@ class TestTorchScript(TempDirMixin, PytorchTestCase):
self
.
assertEqual
(
expected
,
found
)
self
.
assertEqual
(
expected
,
found
)
@
parameterized
.
expand
(
@
parameterized
.
expand
(
load_params
(
"sox_effect_test_args.json"
),
load_params
(
"sox_effect_test_args.json
l
"
),
name_func
=
lambda
f
,
i
,
p
:
f
'
{
f
.
__name__
}
_
{
i
}
_
{
p
.
args
[
0
][
"effects"
][
0
][
0
]
}
'
,
name_func
=
lambda
f
,
i
,
p
:
f
'
{
f
.
__name__
}
_
{
i
}
_
{
p
.
args
[
0
][
"effects"
][
0
][
0
]
}
'
,
)
)
def
test_apply_effects_file
(
self
,
args
):
def
test_apply_effects_file
(
self
,
args
):
...
...
test/torchaudio_unittest/transforms/kaldi_compatibility_impl.py
View file @
32cd700a
...
@@ -21,7 +21,7 @@ class Kaldi(TempDirMixin, TestBaseMixin):
...
@@ -21,7 +21,7 @@ class Kaldi(TempDirMixin, TestBaseMixin):
expected
=
expected
.
to
(
dtype
=
self
.
dtype
,
device
=
self
.
device
)
expected
=
expected
.
to
(
dtype
=
self
.
dtype
,
device
=
self
.
device
)
self
.
assertEqual
(
output
,
expected
,
rtol
=
rtol
,
atol
=
atol
)
self
.
assertEqual
(
output
,
expected
,
rtol
=
rtol
,
atol
=
atol
)
@
parameterized
.
expand
(
load_params
(
'kaldi_test_fbank_args.json'
))
@
parameterized
.
expand
(
load_params
(
'kaldi_test_fbank_args.json
l
'
))
@
skipIfNoExec
(
'compute-fbank-feats'
)
@
skipIfNoExec
(
'compute-fbank-feats'
)
def
test_fbank
(
self
,
kwargs
):
def
test_fbank
(
self
,
kwargs
):
"""fbank should be numerically compatible with compute-fbank-feats"""
"""fbank should be numerically compatible with compute-fbank-feats"""
...
@@ -32,7 +32,7 @@ class Kaldi(TempDirMixin, TestBaseMixin):
...
@@ -32,7 +32,7 @@ class Kaldi(TempDirMixin, TestBaseMixin):
kaldi_result
=
run_kaldi
(
command
,
'scp'
,
wave_file
)
kaldi_result
=
run_kaldi
(
command
,
'scp'
,
wave_file
)
self
.
assert_equal
(
result
,
expected
=
kaldi_result
,
rtol
=
1e-4
,
atol
=
1e-8
)
self
.
assert_equal
(
result
,
expected
=
kaldi_result
,
rtol
=
1e-4
,
atol
=
1e-8
)
@
parameterized
.
expand
(
load_params
(
'kaldi_test_spectrogram_args.json'
))
@
parameterized
.
expand
(
load_params
(
'kaldi_test_spectrogram_args.json
l
'
))
@
skipIfNoExec
(
'compute-spectrogram-feats'
)
@
skipIfNoExec
(
'compute-spectrogram-feats'
)
def
test_spectrogram
(
self
,
kwargs
):
def
test_spectrogram
(
self
,
kwargs
):
"""spectrogram should be numerically compatible with compute-spectrogram-feats"""
"""spectrogram should be numerically compatible with compute-spectrogram-feats"""
...
@@ -43,7 +43,7 @@ class Kaldi(TempDirMixin, TestBaseMixin):
...
@@ -43,7 +43,7 @@ class Kaldi(TempDirMixin, TestBaseMixin):
kaldi_result
=
run_kaldi
(
command
,
'scp'
,
wave_file
)
kaldi_result
=
run_kaldi
(
command
,
'scp'
,
wave_file
)
self
.
assert_equal
(
result
,
expected
=
kaldi_result
,
rtol
=
1e-4
,
atol
=
1e-8
)
self
.
assert_equal
(
result
,
expected
=
kaldi_result
,
rtol
=
1e-4
,
atol
=
1e-8
)
@
parameterized
.
expand
(
load_params
(
'kaldi_test_mfcc_args.json'
))
@
parameterized
.
expand
(
load_params
(
'kaldi_test_mfcc_args.json
l
'
))
@
skipIfNoExec
(
'compute-mfcc-feats'
)
@
skipIfNoExec
(
'compute-mfcc-feats'
)
def
test_mfcc
(
self
,
kwargs
):
def
test_mfcc
(
self
,
kwargs
):
"""mfcc should be numerically compatible with compute-mfcc-feats"""
"""mfcc should be numerically compatible with compute-mfcc-feats"""
...
...
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