open-mmlab / Amphion

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.
https://openhlt.github.io/amphion/
MIT License
4.28k stars 364 forks source link

[Help]: NaturalSpeech2 training and data preprocess issue #206

Closed CreepJoye closed 1 month ago

CreepJoye commented 2 months ago

Hello,I would like to run sh egs/tts/NaturalSpeech2/run_train.sh,and it reports : usage: accelerate <command> [<args>] Accelerate CLI tool: error: argument {config,estimate-memory,env,launch,tpu-config,test}: invalid choice: /home/lqb/project/Amphion/bins/tts/train.py' (choose from 'config', 'estimate-memory', 'env', 'launch', 'tpu-config', 'test') How should I handle this issue? thank you for your patient explanation!

CreepJoye commented 1 month ago
  1. When I follow other Amphion TTS recipes for the data processing,it seems works but not totally.I get these files in egs/tts/NaturalSpeech2/data_processed/libritts,but no content features. image image
  2. How should I set the path of the "metadata_dir" in NaturalSpeech2/exp_config.json/"preprocess"?I don't know what is "metadata" and it seems like I get no "metadata" since I have created a 'metadata' folder and set the path of 'metadata' to this folder, but it is empty.
  3. I complete preprocess.py, and also obtain train.json and valid.json.Then I start to run train.py,and it reports image

Your responses are greatly appreciated!!!

chazo1994 commented 1 month ago

I face same issues! Change "accelerate" to "accelerate launch" in run_train.sh

CreepJoye commented 1 month ago

I face same issues! Change "accelerate" to "accelerate launch" in run_train.sh

Thank you,I have solved the problem already

Linghuxc commented 1 month ago

@CreepJoye Hello, How did you solve this problem? I made the same mistake:

 usage: accelerate <command> [<args>]
Accelerate CLI tool: error: argument {config,estimate-memory,env,launch,tpu-config,test}: invalid choice: /home/Amphion/bins/tts/train.py' (choose from 'config', 'estimate-memory', 'env', 'launch', 'tpu-config', 'test')

I then encountered this error after changing "accelerate" in run_train.sh to "accelerate launch":

usage: train.py [-h] --config CONFIG --exp_name EXP_NAME [--resume] [--log_level LOG_LEVEL] [--resume_type RESUME_TYPE] [--checkpoint_path CHECKPOINT_PATH] [--train_stage TRAIN_STAGE] [--ar_model_ckpt_dir AR_MODEL_CKPT_DIR]
train.py: error: unrecognized arguments: \
Traceback (most recent call last):
  File "/home/anaconda3/envs/amphion/bin/accelerate", line 8, in <module>
    sys.exit(main())
  File "/home/anaconda3/envs/amphion/lib/python3.9/site-packages/accelerate/commands/accelerate_cli.py", line 47, in main
    args.func(args)
  File "/home/anaconda3/envs/amphion/lib/python3.9/site-packages/accelerate/commands/launch.py", line 994, in launch_command
    simple_launcher(args)
  File "/home/anaconda3/envs/amphion/lib/python3.9/site-packages/accelerate/commands/launch.py", line 636, in simple_launcher
    raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)
subprocess.CalledProcessError: Command '['/home/anaconda3/envs/amphion/bin/python3.9', '/home/Amphion/bins/tts/train.py', '--config=/home/Amphion/egs/tts/NaturalSpeech2/exp_config.json', '--exp_name=ns2_libritts', '--log_level', 'debug', '\\']' returned non-zero exit status 2.`

Can you help me? I look forward to your answer, thanks!