muzic
muzic copied to clipboard
关于songmass使用旋律生成歌词的疑问
首先非常感谢各位能开源这么好的工具!
我尝试了一下songmass的旋律生成歌词的功能.没有找到可以直接给一段旋律,然后生成歌词的方案。我现在的操作流程是.
制作旋律的文件和歌词文件,然后把他们当做验证集,使用验证集的方式来出结果.
具体流程如下:
fairseq-preprocess \ --user-dir mass \ --task xmasked_seq2seq \ --source-lang lyric --target-lang melody \ --trainpref $para_data_dir/train --validpref $para_data_dir/t3 \ --destdir $save_dir \ --srcdict $para_data_dir/dict.lyric.txt \ --tgtdict $para_data_dir/dict.melody.txt bash infer_lyric.sh $data_dir mass $model
问题是:
- 请问有办法直接给一个旋律自动生成歌词么?
- 我使用测试集和验证集里的数据,推理出的结果表现都很完美,和参考的的完全一致,所以请问测试集和验证集都参与过训练是么?
- 我自己按照规则制作了一首歌曲,推理出的结果很差。 我自己制作的歌词和旋律如下:
旋律:
65 129 65 129 [align] 65 129 72 129 [align] 72 129 67 130 [align] [sep] 67 129 [align] 67 129 67 129 [align] 67 129 65 129 [align] 64 129 65 129 [align] [sep] 65 129 65 129 [align] 65 129 65 129 [align] 65 129 [align] 65 129 65 129 [align] [sep] 65 129 [align] 65 129 [align] 65 129 [align] [sep] 72 130 [align] 65 129 [align] 65 129 [align] [sep]
歌词:
sky [align] is [align] raining [align] [sep] i [align] want [align] stay [align] alone [align] [sep] stay [align] with [align] my [align] mama [align] [sep] one [align] two [align] three [align] [sep] let [align] is [align] go [align] [sep]
想问一下生成的melody有什么办法可以播放吗?谢谢
想问一下生成的melody有什么办法可以播放吗?谢谢 这是我处理的方法,把生成的midi做成正式的midi文件,然后可以用库乐队来放
import pretty_midi
def midi_list2file(note_list):
# Create a PrettyMIDI object
cello_c_chord = pretty_midi.PrettyMIDI()
# Create an Instrument instance for a cello instrument
cello_program = pretty_midi.instrument_name_to_program('Cello')
cello = pretty_midi.Instrument(program=cello_program)
# Iterate over note names, which will be converted to note number later
st_tm = 0
idx = 0
while idx < len(note_list):
while note_list[idx] in ("[align]", "[sep]"):
idx += 1
if idx >= len(note_list):
break
if idx >= len(note_list):
break
# Create a Note instance for this note, starting at 0s and ending at .5s
print(note_list[idx], note_list[idx + 1])
note_number = int(note_list[idx])
duration = float(int(note_list[idx + 1]) - 128) * 0.5 # 120bpm,1/4音符一拍
if note_number < 128:
print(note_number, st_tm, duration + st_tm)
note = pretty_midi.Note(velocity=100, pitch=note_number, start=st_tm, end=duration + st_tm)
cello.notes.append(note)
st_tm += duration
idx += 2
# Add the cello instrument to the PrettyMIDI object
cello_c_chord.instruments.append(cello)
# Write out the MIDI data
cello_c_chord.write('cello-C-chord.mid')
我跑通了,非常感谢!
我跑通了,非常感谢!
不客气
请问一下,songmass的READ.md文件,第四部分 Evaluation中提到的这四个文件是处理得到的吗?还是需要我自己添加呢?
谢谢解惑
LYRIC=lyric.gt # The lyric file of ground truth
MELODY=melody.gt # The melody file of ground truth
HYPOS=hypo.txt # The generated result in fairseq format
SONG_ID=song_id_test.txt # The song id file
请问一下,songmass的READ.md文件,第四部分 Evaluation中提到的这四个文件是处理得到的吗?还是需要我自己添加呢? 谢谢解惑
LYRIC=lyric.gt # The lyric file of ground truth
MELODY=melody.gt # The melody file of ground truth
HYPOS=hypo.txt # The generated result in fairseq format
SONG_ID=song_id_test.txt # The song id file
We have provided an example about each data. You can replace these file by your data
首先非常感谢各位能开源这么好的工具! 我尝试了一下songmass的旋律生成歌词的功能.没有找到可以直接给一段旋律,然后生成歌词的方案。我现在的操作流程是. 制作旋律的文件和歌词文件,然后把他们当做验证集,使用验证集的方式来出结果. 具体流程如下:
fairseq-preprocess \ --user-dir mass \ --task xmasked_seq2seq \ --source-lang lyric --target-lang melody \ --trainpref $para_data_dir/train --validpref $para_data_dir/t3 \ --destdir $save_dir \ --srcdict $para_data_dir/dict.lyric.txt \ --tgtdict $para_data_dir/dict.melody.txt bash infer_lyric.sh $data_dir mass $model
问题是:
- 请问有办法直接给一个旋律自动生成歌词么?
- 我使用测试集和验证集里的数据,推理出的结果表现都很完美,和参考的的完全一致,所以请问测试集和验证集都参与过训练是么?
- 我自己按照规则制作了一首歌曲,推理出的结果很差。 我自己制作的歌词和旋律如下:
旋律:
65 129 65 129 [align] 65 129 72 129 [align] 72 129 67 130 [align] [sep] 67 129 [align] 67 129 67 129 [align] 67 129 65 129 [align] 64 129 65 129 [align] [sep] 65 129 65 129 [align] 65 129 65 129 [align] 65 129 [align] 65 129 65 129 [align] [sep] 65 129 [align] 65 129 [align] 65 129 [align] [sep] 72 130 [align] 65 129 [align] 65 129 [align] [sep]
歌词:
sky [align] is [align] raining [align] [sep] i [align] want [align] stay [align] alone [align] [sep] stay [align] with [align] my [align] mama [align] [sep] one [align] two [align] three [align] [sep] let [align] is [align] go [align] [sep]
To Q1, Your solution is an option, we will consider to prepare a code for automatic lyric/generation in the future. To Q2 & Q3, our model only use train data for training, just as shown in demo. Our training data is in the LMD domain, may be is still not optimal to open domain.
Hi there, thank you all for the detailed explanation, I have a quick question about match between melody and lyric. I use the model and obtain the result like:
S-499 see these eyes so green i can stare for a [sep] thousand years [sep] colder than the moon well long [sep] these [sep] the [sep]
T-499 67 144 69 144 72 144 69 140 74 140 128 144 67 144 69 144 72 144 71 140 69 140 [sep] 71 140 128 136 71 144 [sep] 128 144 67 144 69 144 72 144 76 140 128 144 74 144 69 132 [sep] 81 136 [sep] 84 136 [sep]
How do we match the lyric (S) to the melody (T)?
Thank you.
请问怎么生成melody,我跟着reademe在执行infer_melody.sh脚本之后,只有一串输出在控制台的字符串
请问怎么生成melody,我跟着reademe在执行infer_melody.sh脚本之后,只有一串输出在控制台的字符串
我也是这种情况,请问你是怎么解决的?
首先非常感谢各位能开源这么好的工具! 我尝试了一下songmass的旋律生成歌词的功能.没有找到可以直接给一段旋律,然后生成歌词的方案。我现在的操作流程是. 制作旋律的文件和歌词文件,然后把他们当做验证集,使用验证集的方式来出结果. 具体流程如下:
fairseq-preprocess \ --user-dir mass \ --task xmasked_seq2seq \ --source-lang lyric --target-lang melody \ --trainpref $para_data_dir/train --validpref $para_data_dir/t3 \ --destdir $save_dir \ --srcdict $para_data_dir/dict.lyric.txt \ --tgtdict $para_data_dir/dict.melody.txt bash infer_lyric.sh $data_dir mass $model
问题是:
- 请问有办法直接给一个旋律自动生成歌词么?
- 我使用测试集和验证集里的数据,推理出的结果表现都很完美,和参考的的完全一致,所以请问测试集和验证集都参与过训练是么?
- 我自己按照规则制作了一首歌曲,推理出的结果很差。 我自己制作的歌词和旋律如下:
旋律:
65 129 65 129 [align] 65 129 72 129 [align] 72 129 67 130 [align] [sep] 67 129 [align] 67 129 67 129 [align] 67 129 65 129 [align] 64 129 65 129 [align] [sep] 65 129 65 129 [align] 65 129 65 129 [align] 65 129 [align] 65 129 65 129 [align] [sep] 65 129 [align] 65 129 [align] 65 129 [align] [sep] 72 130 [align] 65 129 [align] 65 129 [align] [sep]
歌词:
sky [align] is [align] raining [align] [sep] i [align] want [align] stay [align] alone [align] [sep] stay [align] with [align] my [align] mama [align] [sep] one [align] two [align] three [align] [sep] let [align] is [align] go [align] [sep]
您好!抱歉打扰,因为作者提供的checkpoint链接失效了,想请问一下您是否有曾经作者提供的训练好的模型存档?谢谢您!
首先非常感谢各位能开源这么好的工具! 我尝试了一下songmass的旋律生成歌词的功能.没有找到可以直接给一段旋律,然后生成歌词的方案。我现在的操作流程是. 制作旋律的文件和歌词文件,然后把他们当做验证集,使用验证集的方式来出结果. 具体流程如下:
fairseq-preprocess \ --user-dir mass \ --task xmasked_seq2seq \ --source-lang lyric --target-lang melody \ --trainpref $para_data_dir/train --validpref $para_data_dir/t3 \ --destdir $save_dir \ --srcdict $para_data_dir/dict.lyric.txt \ --tgtdict $para_data_dir/dict.melody.txt bash infer_lyric.sh $data_dir mass $model
问题是:
- 请问有办法直接给一个旋律自动生成歌词么?
- 我使用测试集和验证集里的数据,推理出的结果表现都很完美,和参考的的完全一致,所以请问测试集和验证集都参与过训练是么?
- 我自己按照规则制作了一首歌曲,推理出的结果很差。 我自己制作的歌词和旋律如下:
旋律:
65 129 65 129 [align] 65 129 72 129 [align] 72 129 67 130 [align] [sep] 67 129 [align] 67 129 67 129 [align] 67 129 65 129 [align] 64 129 65 129 [align] [sep] 65 129 65 129 [align] 65 129 65 129 [align] 65 129 [align] 65 129 65 129 [align] [sep] 65 129 [align] 65 129 [align] 65 129 [align] [sep] 72 130 [align] 65 129 [align] 65 129 [align] [sep]
歌词:sky [align] is [align] raining [align] [sep] i [align] want [align] stay [align] alone [align] [sep] stay [align] with [align] my [align] mama [align] [sep] one [align] two [align] three [align] [sep] let [align] is [align] go [align] [sep]
您好!抱歉打扰,因为作者提供的checkpoint链接失效了,想请问一下您是否有曾经作者提供的训练好的模型存档?谢谢您!
抱歉,太久了,一直没有搞这个,所以没有保存了
抱歉,太久了,一直没有搞这个,所以没有保存了
您好!很感谢您的及时回复,十分抱歉再次打扰您,我现在也走到了训练好模型后可以跑通infer_melody.sh的情况了,想请问一下这个模型如果想要自定义输入歌词生成旋律,是否只能按照原来的形式先经过一系列处理步骤,划分好sep之类的东西当作验证集来输出结果?因为没太看懂它取得是prepocess里面的哪个文件,没有找到固定的输入格式。如果是这样的话,请问您方便大概描述一下您当时的处理方式,或者分享一下代码吗?或者是否有其他更好的办法?特别特别特别感谢!!!