GPT-SoVITS icon indicating copy to clipboard operation
GPT-SoVITS copied to clipboard

refactor: inference_cli for more input param choice targeting inferece_webui

Open JackyHe398 opened this issue 8 months ago • 1 comments

Changes

  • adding missing params: There are a bunch of params missing in inference_cli.py comparing to webui which doesn't make any sense. I have added those back to inference_cli.py which should correctly point all the params to get_tts_wav.
  • better cli support:
    1. instead of inputing the path of the text, the cli was changed to inputing text directly
    2. instead of inputing only accepting the path of the gpt and sovits model, the cli now accept selector like syntax. user can select the exp_name, epoch, version of both gpt and sovits model separately. Path model is also kept.
    3. Support outputing to specific {path/filename.wav} instead of only path is allowed(otherwise it will output {path/filename.wav}/output.wav)

Usage example

path mode

python GPT_SoVITS/inference_cil.py\
                --ref_audio "audio_path" --ref_text "text" --ref_language "中文" \
                --target_text "text" --target_language "中文" \
                --slicer "按标点符号切" \
                --output_path "OUTPUT" \
                path --gpt_path "path" --sovits_path "path"

selector mode

 python GPT_SoVITS/inference_cil.py \
                --ref_audio "audio_path" --ref_text "text" --ref_language "中文" \
                --target_text "text" --target_language "中文" \
                --slicer "按标点符号切" \
                --output_path "OUTPUT" \
                select \
                --exp_name "xxx" \
                --gpt_version "v2Pro" --sovits_version "v4" \
                --gpt_epoch "test" #if epoch is not found, the largest will be used

JackyHe398 avatar Aug 12 '25 02:08 JackyHe398

@RVC-Boss 麻烦老哥看一下 这个PL加上了CLI 推理接口缺少的参数,和加了一个selector。详情请看上面

JackyHe398 avatar Aug 19 '25 04:08 JackyHe398