autovc icon indicating copy to clipboard operation
autovc copied to clipboard

How to generate metadata.pkl file ?

Open Edward205 opened this issue 2 years ago • 6 comments

I am not very experienced with the libraries which are used, however I just want to train a model and use it. I have been able to generate sound with the example files, but I can't train my own model and use my own recordings because I can't generate the metadata.pkl file. I have looked through every issue posted here and tried everything but there's no proper solution. The make_metadata.py file doesn't make the metadata.pkl file, but instead a train.pkl file. So how do I generate a metadata.pkl file with my own recordings? Thanks in advance.

Edward205 avatar May 30 '22 15:05 Edward205

The train.pkl is intended for training.

auspicious3000 avatar May 30 '22 16:05 auspicious3000

Okay it appears training is working but once I'm done I still need the metadata.pkl file to generate audio. So what do I do? (also thanks a lot for replying in such timely manner)

Edward205 avatar May 30 '22 16:05 Edward205

For testing, please refer to this issue #108

auspicious3000 avatar May 30 '22 16:05 auspicious3000

Thanks but as I said, I read through all the issues. Your comment: "Each metadata is a list of [filename, speaker embedding, spectrogram]" isn't of much help because I don't know how to create a file in the format .pkl. Opening it in a text editor gives garbled data. conversion.ipynb reads a metadata.pkl file metadata = pickle.load(open('metadata.pkl', "rb")) and the end-to-end notebook which lisabecker made also reads a metadata.pkl file. So none of these scripts create a metadata.pkl file. I don't know what to do.

Edward205 avatar May 30 '22 18:05 Edward205

the .pkl is not a format, it is just a suffix of the filename. You can name it whatever you like such as .abc, .qaz, or .wsx, etc. To save the list, just use the following code: with open('xxxxx', 'wb') as handle: pickle.dump(your list, handle)

auspicious3000 avatar May 30 '22 19:05 auspicious3000

Okay so I should make a list that's like this:

[ ["./wavs/001/1.wav", ?, "./spmel/001/1.npy"]
    ...
]

And then save it using the code you gave me. But I don't know what to put as speaker embedding.

Edward205 avatar May 31 '22 14:05 Edward205