Thank you very much for your reply, sir. Can I understand it this way?
1、In the file musdb_moisesdb_datamodule.py, can the part processed by h5py be modified to the reading method required for my current audio format?
2、Is this code also not mandatory?
def codec_simu(wav, sr=16000, options={'bitrate':'random','compression':'random', 'complexity':'random', 'vbr':'random'}):
if options['bitrate'] == 'random':
options['bitrate'] = random.choice([24000, 32000, 48000, 64000, 96000, 128000])
compression = int(options['bitrate']//1000)
param = {'format': "mp3", "compression": compression}
wav_encdec = apply_codec(wav, sr, **param)
if wav_encdec.shape[-1] >= wav.shape[-1]:
wav_encdec = wav_encdec[...,:wav.shape[-1]]
else:
wav_encdec = torch.cat([wav_encdec, wav[..., wav_encdec.shape[-1]:]], -1)
tau = match2(wav, wav_encdec)
wav_encdec = torch.roll(wav_encdec, -tau[0], -1)
return wav_encdec
3、Are there any requirements for high-quality audio and low-quality audio?
4、Can ./hdf5_datas in the configuration file also be in WAV or FLAC format?
Thank you very much for your reply, sir. Can I understand it this way?
1、In the file musdb_moisesdb_datamodule.py, can the part processed by h5py be modified to the reading method required for my current audio format?
2、Is this code also not mandatory?
def codec_simu(wav, sr=16000, options={'bitrate':'random','compression':'random', 'complexity':'random', 'vbr':'random'}):
if options['bitrate'] == 'random':
options['bitrate'] = random.choice([24000, 32000, 48000, 64000, 96000, 128000])
compression = int(options['bitrate']//1000)
param = {'format': "mp3", "compression": compression}
wav_encdec = apply_codec(wav, sr, **param)
if wav_encdec.shape[-1] >= wav.shape[-1]:
wav_encdec = wav_encdec[...,:wav.shape[-1]]
else:
wav_encdec = torch.cat([wav_encdec, wav[..., wav_encdec.shape[-1]:]], -1)
tau = match2(wav, wav_encdec)
wav_encdec = torch.roll(wav_encdec, -tau[0], -1)
return wav_encdec
3、Are there any requirements for high-quality audio and low-quality audio?
4、Can ./hdf5_datas in the configuration file also be in WAV or FLAC format?