Skip to content

ext_audio becomes redunant for MAPS and MAESTRO #17

@KinWaiCheuk

Description

@KinWaiCheuk

In the most updated version of AudioLoader, when sampling_rate=None, it loads .wav files. When sampling_rate!=None, it loads .flac files when they exist, otherwise it will downsample .wav files into .flac format and load the .flac. Please refer to the code snippet below:

if self.sampling_rate and (self.sampling_rate != 44100):
    # When sampling rate is given, it will automatically create a downsampled copy
    if self.downsample_exist('flac'):
        print(f"downsampled audio exists, skipping downsampling")
    else:
        print('doing resample()')
        self.resample(sampling_rate, 'flac', num_threads=4)
        
    for idx, audio in tqdm((enumerate(self._walker))):
        self._walker[idx] = audio.replace('.wav', '.flac')  

Therefore, ext_audio becomes useless. We can try to remove it without breaking the code.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions