Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Martin Lebourdais
s4d
Commits
1152e5d7
Commit
1152e5d7
authored
Sep 30, 2020
by
Martin Lebourdais
Browse files
removal of the bad print
parent
476a1625
Changes
1
Hide whitespace changes
Inline
Side-by-side
s4d/nnet/wavsets.py
View file @
1152e5d7
...
...
@@ -388,22 +388,28 @@ class SeqSet(Dataset):
# Randomly pick an audio chunk within the current segment
while
not
ok
:
try
:
ok
=
True
start
=
random
.
uniform
(
seg
[
"start"
],
seg
[
"start"
]
+
self
.
duration
)
sig
,
_
=
soundfile
.
read
(
self
.
wav_dir
+
seg
[
"show"
]
+
".wav"
,
start
=
int
(
start
*
self
.
audio_framerate
),
stop
=
int
((
start
+
self
.
duration
)
*
self
.
audio_framerate
)
sig
=
numpy
.
array
([
0
,
0
])
try
:
sig
,
_
=
soundfile
.
read
(
self
.
wav_dir
+
seg
[
"show"
]
+
".wav"
,
start
=
int
(
start
*
self
.
audio_framerate
),
stop
=
int
((
start
+
self
.
duration
)
*
self
.
audio_framerate
),
)
except
RuntimeError
:
print
(
"==============="
+
self
.
wav_dir
+
seg
[
"show"
]
+
".flac"
)
sig
+=
0.0001
*
numpy
.
random
.
randn
(
sig
.
shape
[
0
])
if
self
.
transform_pipeline
:
sig
,
speaker_idx
,
_t
,
_s
=
self
.
transforms
((
sig
,
None
,
None
,
None
,
None
,
None
))
except
ValueError
as
e
:
ok
=
False
# sig, speaker_idx, _, __, _t, _s = self.transforms((sig, None, None, None, None, None))
if
sig
.
T
.
shape
!=
(
198
,
30
):
pr
int
(
sig
.
T
.
shape
)
#
pr
oblem of dimension idk why ?
ok
=
False
tmp_label
,
overlaps
=
mdtm_to_label
(
mdtm_filename
=
self
.
mdtm_dir
+
seg
[
"show"
]
+
".mdtm"
,
start_time
=
start
,
...
...
Write
Preview
Supports
Markdown
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