mirror of
https://github.com/TMElyralab/MuseTalk.git
synced 2026-02-05 18:09:19 +08:00
Remove crop_audio_window from DataLoader.py
This commit is contained in:
@@ -118,18 +118,6 @@ class Dataset(object):
|
|||||||
|
|
||||||
return window
|
return window
|
||||||
|
|
||||||
|
|
||||||
def crop_audio_window(self, spec, start_frame):
|
|
||||||
if type(start_frame) == int:
|
|
||||||
start_frame_num = start_frame
|
|
||||||
else:
|
|
||||||
start_frame_num = self.get_frame_id(start_frame)
|
|
||||||
start_idx = int(80. * (start_frame_num / float(hparams.fps)))
|
|
||||||
|
|
||||||
end_idx = start_idx + syncnet_mel_step_size
|
|
||||||
|
|
||||||
return spec[start_idx : end_idx, :]
|
|
||||||
|
|
||||||
def prepare_window(self, window):
|
def prepare_window(self, window):
|
||||||
# 1 x H x W x 3
|
# 1 x H x W x 3
|
||||||
x = np.asarray(window) / 255.
|
x = np.asarray(window) / 255.
|
||||||
|
|||||||
Reference in New Issue
Block a user