Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to generate metadata.pkl file ? #113

Open
Edward205 opened this issue May 30, 2022 · 6 comments
Open

How to generate metadata.pkl file ? #113

Edward205 opened this issue May 30, 2022 · 6 comments

Comments

@Edward205
Copy link

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.

@auspicious3000
Copy link
Owner

The train.pkl is intended for training.

@Edward205
Copy link
Author

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)

@auspicious3000
Copy link
Owner

For testing, please refer to this issue #108

@Edward205
Copy link
Author

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.

@auspicious3000
Copy link
Owner

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)

@Edward205
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants