mirror of
https://github.com/TMElyralab/MuseTalk.git
synced 2026-02-05 01:49:20 +08:00
Remove crop_audio_window from DataLoader.py
This commit is contained in:
@@ -118,18 +118,6 @@ class Dataset(object):
|
||||
|
||||
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):
|
||||
# 1 x H x W x 3
|
||||
x = np.asarray(window) / 255.
|
||||
@@ -249,4 +237,4 @@ if __name__ == "__main__":
|
||||
ref_image, image, masked_image, mask, audio_feature = data
|
||||
print("ref_image: ", ref_image.shape)
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user