Open kyakuno opened 1 year ago
htsの音素ラベルはnnmnkwiiを使用している。 https://r9y9.github.io/nnmnkwii/latest/references/generated/nnmnkwii.io.hts.load.html
推論コード。 https://github.com/nnsvs/nnsvs/blob/master/notebooks/Demos.ipynb
engine = create_svs_engine("r9y9/yoko_latest")
contexts = pysinsy.extract_fullcontext(nnsvs.util.example_xml_file("song070_f00001_063"))
labels = hts.HTSLabelFile.create_from_contexts(contexts)
wav, sr = engine.svs(labels)
Audio(wav, rate=sr)
歌声の合成を目指しており、f0も引数に与える形になっている。 https://r9y9.github.io/blog/2020/05/10/nnsvs/
スコアはmidiで与える。 https://r9y9.github.io/projects/nnsvs/
svsの中は複数モデルで構成されており、モデル分割してonnx変換が必要。 https://github.com/nnsvs/nnsvs/blob/master/nnsvs/svs.py
モデル一覧
音声合成はgen.pyに記載されている。
predict_acousticにおいて、linguistic_featuresを取得し、acoustic_model.inferenceを行った後、denormalilzationを行っている。 linguistic_featuresはnnmnkwii.merlinからimportしている。 https://r9y9.github.io/nnmnkwii/latest/references/generated/nnmnkwii.frontend.merlin.linguistic_features.html https://github.com/r9y9/nnmnkwii/blob/master/nnmnkwii/frontend/merlin.py
predict_waveformにおいて、vocoder_typeがworldの場合はpyworldを使用して推論している。 vocoder_typeがpwgかusfganの場合、torchでf0_inpとaux_featesを推論している。
extract_fullcontextはpysinsyを使用している。pysinsyはsinsyのpython binding。sinsyは平仮名を入力して音素を出力する。 https://github.com/r9y9/pysinsy https://github.com/r9y9/sinsy
https://github.com/nnsvs/nnsvs mit