Audio-indexing off by one step
This commit is contained in:
parent
1e903f5658
commit
d27e32bad0
1 changed files with 2 additions and 2 deletions
|
|
@ -55,7 +55,7 @@ class Dataset(object):
|
||||||
|
|
||||||
def crop_audio_window(self, spec, start_frame):
|
def crop_audio_window(self, spec, start_frame):
|
||||||
# num_frames = (T x hop_size * fps) / sample_rate
|
# num_frames = (T x hop_size * fps) / sample_rate
|
||||||
start_frame_num = self.get_frame_id(start_frame) + 1 # 0-indexing ---> 1-indexing
|
start_frame_num = self.get_frame_id(start_frame)
|
||||||
start_idx = int(80. * (start_frame_num / float(hparams.fps)))
|
start_idx = int(80. * (start_frame_num / float(hparams.fps)))
|
||||||
|
|
||||||
end_idx = start_idx + syncnet_mel_step_size
|
end_idx = start_idx + syncnet_mel_step_size
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue