Commit 1152e5d7 authored by Martin Lebourdais's avatar Martin Lebourdais
Browse files

removal of the bad print

parent 476a1625
......@@ -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):
print(sig.T.shape)
#problem of dimension idk why ?
ok=False
tmp_label,overlaps = mdtm_to_label(mdtm_filename=self.mdtm_dir + seg["show"] + ".mdtm",
start_time=start,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment