sannawag / data_driven_pitch_corrector

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to tune my own sound track

wingchu opened this issue · comments

I am trying to tune my own sound track using this model but could not get to it.

After pre-process two sound track: vocal and background music, I got two .npy files.
the vocal pyin f0 candidate files in place in vocals_pitch_pyin folder, and the background music pyin f0 candidate files in place in back_chroma folder

And I modify the code in rnn.py and try to tune the sound track with the following code:

performance_list = sorted(list(set([f[:-4] for f in os.listdir(pyin_directory) if "npy" in f]) & set([f[:-4] for f in os.listdir(back_chroma_directory) if "npy" in f])))
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
dataset = get_dataset(performance_list, args.num_shifts, 1, 'testing', device, False)
outputs, loss = program.eval(dataset, save_song_outputs=True, plot=False)

However, in the get_dataset I got an Type error, details is following
TypeError: list indices must be integers or slices, not str

I would like to know how to get the program run properly to tune my own sound track, Thank you

Hi, I revised the program code after you opened this issue. It should be clearer and easier to use.

The program only needs the pyin of the vocals track. For the backing track, it needs the wav file. Also, it doesn't use a chroma directory anymore. The vocals pyin files should go into pyin_directory or realworld_pyin_directory, depending on whether you are training or testing.

I wonder whether, since you have only one example, performance_list[i] is returning a single character instead of the full file name. That is just a guess, though. If you run the program again, please paste a few lines of the stack trace.

Я пытаюсь настроить свою звуковую дорожку с помощью этой модели, но не могу до нее добраться.

После предварительной обработки двух звуковых дорожек: вокальной и фоновой, я получил два файла .npy.
файлы кандидатов vocal pyin f0 на месте в папке voice_pitch_pyin и файлы кандидатов pyin f0 фоновой музыки на месте в папке back_chroma

И я изменяю код в rnn.py и пытаюсь настроить звуковую дорожку с помощью следующего кода:

performance_list = sorted (list (установить ([f [: - 4] для f в os.listdir (pyin_directory), если «npy» в f]) и установить ([f [: - 4] для f в os.listdir (back_chroma_directory ) если «npy» в f])))
device = torch.device («cuda», если torch.cuda.is_available () else «cpu»)
dataset = get_dataset (performance_list, args.num_shifts, 1, 'тестирование', устройство , False)
выходы, loss = program.eval (набор данных, save_song_outputs = True, plot = False)

Однако в get_dataset я получил ошибку типа, подробности следуют за
TypeError: индексы списка должны быть целыми числами или срезами, а не str

Я хотел бы знать, как правильно запустить программу для настройки моей звуковой дорожки, спасибо

Were you able to run your audio files? I could not prepare audio