This commit is contained in:
James Betker 2022-05-23 07:06:25 -06:00
parent 68c0afcbcc
commit 2da8f8a666

View File

@ -32,6 +32,7 @@ if __name__ == '__main__':
mel = TorchMelSpectrogramInjector({'n_mel_channels': 256, 'mel_fmax': 22000, 'normalize': True, 'in': 'in', 'out': 'out'}, {})({'in': wav.unsqueeze(0)})['out'] mel = TorchMelSpectrogramInjector({'n_mel_channels': 256, 'mel_fmax': 22000, 'normalize': True, 'in': 'in', 'out': 'out'}, {})({'in': wav.unsqueeze(0)})['out']
codes = model.get_codes(mel) codes = model.get_codes(mel)
codes2 = model.get_codes(mel)
collapsed = collapse_codegroups(codes) collapsed = collapse_codegroups(codes)
recovered = recover_codegroups(collapsed, 8) recovered = recover_codegroups(collapsed, 8)