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
0812f22a
Unverified
Commit
0812f22a
authored
Jul 22, 2020
by
moto
Committed by
GitHub
Jul 22, 2020
Browse files
Get rid of whitenoise_1min.mp3 (#813)
Part of #764
parent
f16f74af
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
5 deletions
+2
-5
test/assets/whitenoise_1min.mp3
test/assets/whitenoise_1min.mp3
+0
-0
test/test_librosa_compatibility.py
test/test_librosa_compatibility.py
+2
-5
No files found.
test/assets/whitenoise_1min.mp3
deleted
100644 → 0
View file @
f16f74af
File deleted
test/test_librosa_compatibility.py
View file @
0812f22a
...
@@ -270,16 +270,13 @@ class TestTransforms(common_utils.TorchaudioTestCase):
...
@@ -270,16 +270,13 @@ class TestTransforms(common_utils.TorchaudioTestCase):
}
}
self
.
assert_compatibilities
(
**
kwargs
)
self
.
assert_compatibilities
(
**
kwargs
)
@
unittest
.
skipIf
(
not
common_utils
.
BACKENDS_MP3
,
'no backend to read mp3'
)
def
test_MelScale
(
self
):
def
test_MelScale
(
self
):
"""MelScale transform is comparable to that of librosa"""
"""MelScale transform is comparable to that of librosa"""
n_fft
=
2048
n_fft
=
2048
n_mels
=
256
n_mels
=
256
hop_length
=
n_fft
//
4
hop_length
=
n_fft
//
4
sample_rate
=
44100
# Prepare spectrogram input. We use torchaudio to compute one.
sound
=
common_utils
.
get_whitenoise
(
sample_rate
=
sample_rate
,
duration
=
60
)
common_utils
.
set_audio_backend
(
'default'
)
sound
,
sample_rate
=
_load_audio_asset
(
'whitenoise_1min.mp3'
)
sound
=
sound
.
mean
(
dim
=
0
,
keepdim
=
True
)
sound
=
sound
.
mean
(
dim
=
0
,
keepdim
=
True
)
spec_ta
=
F
.
spectrogram
(
spec_ta
=
F
.
spectrogram
(
sound
,
pad
=
0
,
window
=
torch
.
hann_window
(
n_fft
),
n_fft
=
n_fft
,
sound
,
pad
=
0
,
window
=
torch
.
hann_window
(
n_fft
),
n_fft
=
n_fft
,
...
...
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