RuntimeError: The size of tensor a (51) must match the size of tensor b (53) at non-singleton dimension 1
File "/data/home/scv1106/FastSpeech2/model/modules.py", line 121, in forward x = x + pitch_embedding RuntimeError: The size of tensor a (51) must match the size of tensor b (53) at non-singleton dimension 1
use biaobei dataset to training, but found the problem that the tensor is not in same dimension what should i do to reslove the problems?
我之前也是这样,我觉得是词库不是完整导致有的索引为空 数据不对齐。 但是当我补充完词汇后发现了新的问题 不知道是不是采样率的问题 你可以先打印缺少的字符 在text/system中
使用MFA后的数据 我的实验就正常可以跑了
我使用了mfa 生成的词汇表和声学模型,但是还是有这个问题,
Maybe your lexicon generated by MFA contains some phones that are not included in the phone list in the text/pinyin.py file.
finals = [
"a1",
"a2",
"a3",
"a4",
"a5",
"ai1",
"ai2",
"ai3",
"ai4",
...
]
You can print out the missing phones by modifying the _symbols_to_sequence function in text/__init__.py into
def _symbols_to_sequence(symbols):
missing=[s for s in symbols if not _should_keep_symbol(s)]
if missing:
print(missing)
return [_symbol_to_id[s] for s in symbols if _should_keep_symbol(s)]
And add the missing phones into text/pinyin.py
if chinese, please try PR: https://github.com/ming024/FastSpeech2/pull/153
我也遇到了类似的问题,但是我是刚训练的,mfa生成的音节已经不是拼音了,是一些我看不懂的符号
我也遇到了类似的问题,但是我是刚训练的,mfa生成的音节已经不是拼音了,是一些我看不懂的符号
你需要把音素加到,text/symbols里
Maybe your lexicon generated by MFA contains some phones that are not included in the phone list in the
text/pinyin.pyfile.finals = [ "a1", "a2", "a3", "a4", "a5", "ai1", "ai2", "ai3", "ai4", ... ]You can print out the missing phones by modifying the
_symbols_to_sequencefunction intext/__init__.pyintodef _symbols_to_sequence(symbols): missing=[s for s in symbols if not _should_keep_symbol(s)] if missing: print(missing) return [_symbol_to_id[s] for s in symbols if _should_keep_symbol(s)]And add the missing phones into
text/pinyin.py
This worked
MFA によって生成された辞書には、ファイル内の電話リストに含まれていない電話が含まれている可能性があります
text/pinyin.py。finals = [ "a1", "a2", "a3", "a4", "a5", "ai1", "ai2", "ai3", "ai4", ... ]
_symbols_to_sequenceの関数をtext/__init__.py次のように変更することで、不足している電話機を印刷できます。def _symbols_to_sequence(symbols): missing=[s for s in symbols if not _should_keep_symbol(s)] if missing: print(missing) return [_symbol_to_id[s] for s in symbols if _should_keep_symbol(s)]不足している電話を追加します
text/pinyin.py
this is useful when also training japanese model! Thank you!!!
Maybe your lexicon generated by MFA contains some phones that are not included in the phone list in the
text/pinyin.pyfile.finals = [ "a1", "a2", "a3", "a4", "a5", "ai1", "ai2", "ai3", "ai4", ... ]You can print out the missing phones by modifying the
_symbols_to_sequencefunction intext/__init__.pyintodef _symbols_to_sequence(symbols): missing=[s for s in symbols if not _should_keep_symbol(s)] if missing: print(missing) return [_symbol_to_id[s] for s in symbols if _should_keep_symbol(s)]And add the missing phones into
text/pinyin.pyI am getting list of many missing phones, where should I exactly add them. Please guide me on this
Maybe your lexicon generated by MFA contains some phones that are not included in the phone list in the
text/pinyin.pyfile.finals = [ "a1", "a2", "a3", "a4", "a5", "ai1", "ai2", "ai3", "ai4", ... ]You can print out the missing phones by modifying the
_symbols_to_sequencefunction intext/__init__.pyintodef _symbols_to_sequence(symbols): missing=[s for s in symbols if not _should_keep_symbol(s)] if missing: print(missing) return [_symbol_to_id[s] for s in symbols if _should_keep_symbol(s)]And add the missing phones into
text/pinyin.pyI am getting list of many missing phones, where should I exactly add them. Please guide me on this
add them into to the finals list in the file text/pinyin.py
https://github.com/ming024/FastSpeech2/blob/d4e79eb52e8b01d24703b2dfc0385544092958f3/text/pinyin.py#L211