midi2voice icon indicating copy to clipboard operation
midi2voice copied to clipboard

Dose it support Chinese song?

Open yangkang2318 opened this issue 3 years ago • 10 comments

Hello,this project is amazing!But dose it support Chinese song?

yangkang2318 avatar Jun 29 '22 10:06 yangkang2318

Hey! No, but it's a good idea, I just added that feature :) Please try it and let me know how that goes

mathigatti avatar Jun 29 '22 18:06 mathigatti

There is a bug in line 33,and occurs TypeError: 'int' object is not callable.Because when run in python,the "voice_index" is identified as "int" object instead of "voice_index" method. image

yangkang2318 avatar Jun 30 '22 02:06 yangkang2318

And you should modify line 26 in "__main__.py",the last args should be "args["language"]" image

yangkang2318 avatar Jun 30 '22 02:06 yangkang2318

It should be chinese instead of mandarin image Beacuse in your code is "chinese" image

so there should be "chinese". image

yangkang2318 avatar Jun 30 '22 02:06 yangkang2318

Oh sorry and thanks for reviewing it, I just pushed some possible fixes I will test it thoroughly tomorrow

mathigatti avatar Jun 30 '22 03:06 mathigatti

When using the Chinese song ,the performance is worse.Maybe the file"lyrics_tokenizer.py" caused the results. Because chinese words doesn't need to tokenize into subwords

yangkang2318 avatar Jun 30 '22 05:06 yangkang2318

ah right, I don't know much about japanese and mandarin. If you can send me a text example and how it should be splitted into notes that would be great.

For example in english, if I have this sentence "hello this is my song" and I have 6 notes it's splitted into something like this: ["he", "llo", "this", "is", "my", "song"], then I assign each text piece to each note.

mathigatti avatar Jul 01 '22 21:07 mathigatti

Do you have some text to try? I added a basic tokenization, given some text like this: 曲项向天歌 it assigns each character to a different note

"曲项向天歌" is converted into this [u'\u66f2', u'\u9879', u'\u5411', u'\u5929', u'\u6b4c']

mathigatti avatar Jul 05 '22 17:07 mathigatti

I fix this problem,because the musescore decode the midi into .xml is wrong. Thanks for your help and project!

yangkang2318 avatar Jul 11 '22 13:07 yangkang2318

Awesome! Do you want to share how you fixed it?

mathigatti avatar Jul 11 '22 17:07 mathigatti