muzic
muzic copied to clipboard
telemelody: how can I get dict.trend.txt?
When inference using pretrained models, I got error about missing file:
FileNotFoundError: [Errno 2] No such file or directory: 'data-bin/template2melody_zh/dict.trend.txt'
I have dict.beat.txt
and dict.lyric.txt
copied from training dir, do I need to run training first to get the trend
file?
No. In fact, you just need to run the gen_dictionary
function in gen.py
to get the dict (ref: https://github.com/microsoft/muzic/blob/main/telemelody/training/template2melody/gen.py#L180
)
Hello I am trying to run the same inference portion. This is what I have in my folders, but seem to keep getting the same error:
checkpoints
- lyric2rhythm
---- checkpoint_best.pt (Also are these the lyric2rhythem_en_best.pt files that are provided? Do we torch.load them 1st?
-template2melody
---- checkpoint_best.pt
data-bin
-lyric2rhythm
---- dict.beat.txt
---- dict.lyric.txt
-template2melody
---- dict.trend.txt
---- dict.note.txt
Error:
2022-04-14 01:37:31 | INFO | fairseq.file_utils | loading archive file checkpoints/lyric2rhythm_en_best
2022-04-14 01:37:31 | INFO | fairseq.file_utils | loading archive file data-bin/lyric2rhythm_en_best
Traceback (most recent call last):
File "infer_en.py", line 154, in
Should I only but the dict.beat.txt file in both? The txt file shouldn't have an attribute called 'data' right?
Hi @benfenison , you can refer to this link https://github.com/microsoft/muzic/issues/29#issuecomment-1019877476