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
a4df8caf
"vscode:/vscode.git/clone" did not exist on "6c314ad0ce8f59f24a26556488972bb70bd904a8"
Commit
a4df8caf
authored
Dec 13, 2018
by
David Pollack
Committed by
Soumith Chintala
Dec 25, 2018
Browse files
added a few more tests
parent
948b5a5c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
test/test_sox_effects.py
test/test_sox_effects.py
+3
-1
No files found.
test/test_sox_effects.py
View file @
a4df8caf
...
...
@@ -71,7 +71,8 @@ class Test_SoxEffectsChain(unittest.TestCase):
E
.
append_effect_to_chain
(
"channels"
,
[
si_in
.
channels
])
x
,
sr
=
E
.
sox_build_flow_effects
()
# The chorus effect will make the output file longer than the input
self
.
assertGreater
(
x
.
size
(
1
)
*
x
.
size
(
0
),
si_in
.
length
)
self
.
assertEqual
(
x
.
size
(
0
),
si_in
.
channels
)
self
.
assertGreaterEqual
(
x
.
size
(
1
)
*
x
.
size
(
0
),
si_in
.
length
)
def
test_synth
(
self
):
si_in
,
ei_in
=
torchaudio
.
info
(
self
.
test_filepath
)
...
...
@@ -83,6 +84,7 @@ class Test_SoxEffectsChain(unittest.TestCase):
E
.
append_effect_to_chain
(
"rate"
,
[
44100
])
E
.
append_effect_to_chain
(
"channels"
,
[
2
])
x
,
sr
=
E
.
sox_build_flow_effects
()
self
.
assertEqual
(
x
.
size
(
0
),
si_in
.
channels
)
self
.
assertEqual
(
si_in
.
length
,
x
.
size
(
0
)
*
x
.
size
(
1
))
def
test_gain
(
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