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
ff47955c
"src/vscode:/vscode.git/clone" did not exist on "443aa14e415533031aa8b9761d1808ec68acda1e"
Commit
ff47955c
authored
Aug 18, 2017
by
David Pollack
Browse files
change to downsample in VCTK
parent
3433b9b6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
test/test_transforms.py
test/test_transforms.py
+1
-1
torchaudio/datasets/vctk.py
torchaudio/datasets/vctk.py
+2
-2
No files found.
test/test_transforms.py
View file @
ff47955c
torchaudio/datasets/vctk.py
View file @
ff47955c
...
@@ -36,9 +36,9 @@ def read_audio(fp, downsample=True):
...
@@ -36,9 +36,9 @@ def read_audio(fp, downsample=True):
if
downsample
:
if
downsample
:
# 48khz -> 16 khz
# 48khz -> 16 khz
if
sig
.
size
(
0
)
%
3
==
0
:
if
sig
.
size
(
0
)
%
3
==
0
:
sig
=
sig
.
view
(
3
,
-
1
,
sig
.
size
(
1
)).
mean
(
0
)
sig
=
sig
[::
3
].
contiguous
(
)
else
:
else
:
sig
=
sig
[:
-
(
sig
.
size
(
0
)
%
3
)
].
view
(
3
,
-
1
,
sig
.
size
(
1
)).
mean
(
0
)
sig
=
sig
[:
-
(
sig
.
size
(
0
)
%
3
)
:
3
].
contiguous
(
)
return
sig
,
sr
return
sig
,
sr
def
load_txts
(
dir
):
def
load_txts
(
dir
):
...
...
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