Amphion (/æmˈfaɪən/) is a toolkit for Audio, Music, and Speech Generation. Its purpose is to support reproducible research and help junior researchers and engineers get started in the field of audio, music, and speech generation research and development.
The official config ns2.json does not have diffusion.diffusion_type attribute. Meanwhile, in models/tts/naturalspeech2/ns2.py, it is required.
How To Reproduce
Steps to reproduce the behavior:
Config/File changes: None
Run command: bash egs/tts/NaturalSpeech2/run_inference.sh --text "[The text you want to generate]"
See error:
Traceback (most recent call last):
File "/tools/Amphion/bins/tts/inference.py", line 169, in <module>
main()
File "/tools/Amphion/bins/tts/inference.py", line 162, in main
inferencer = build_inference(args, cfg)
File "/tools/Amphion/bins/tts/inference.py", line 29, in build_inference
inference = inference_class(args, cfg)
File "/tools/Amphion/models/tts/naturalspeech2/ns2_inference.py", line 29, in __init__
self.model = self.build_model()
File "/tools/Amphion/models/tts/naturalspeech2/ns2_inference.py", line 37, in build_model
model = NaturalSpeech2(self.cfg.model)
File "/tools/Amphion/models/tts/naturalspeech2/ns2.py", line 31, in __init__
if cfg.diffusion.diffusion_type == "diffusion":
AttributeError: 'JsonHParams' object has no attribute 'diffusion_type'
Describe the bug
The official config
ns2.json
does not havediffusion.diffusion_type
attribute. Meanwhile, inmodels/tts/naturalspeech2/ns2.py
, it is required.How To Reproduce
Steps to reproduce the behavior:
bash egs/tts/NaturalSpeech2/run_inference.sh --text "[The text you want to generate]"
Expected behavior
Simply add
into the
ns2.json
config will solve the problem.