Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Command Line using the latest Applio core.py doesn't work. #779

Closed
tomakorea opened this issue Oct 4, 2024 · 3 comments
Closed
Labels
bug Something isn't working

Comments

@tomakorea
Copy link

tomakorea commented Oct 4, 2024

Project Version

3.2.6

Platform and OS Version

Ubuntu terminal

Affected Devices

PC

Existing Issues

No response

What happened?

When Infer using core.py from Applio 3.2.6 in command line mode, it fails, I found some part of the issue but it still doesn't work :

Here is a simple CLI command I tested :

python core.py infer --pitch 2 --input_path "/media/john/PC_AI/1_Models_Vox/rec_0.wav" --output_path "/media/john/PC_AI/1_Models_Vox/output/rec_0.wav" --pth_path "/media/john/PC_AI/1_Models_Vox/logs/Ad_085.pth" --index_path "/media/john/PC_AI/1_Models_Vox/logs/Ad_085.index"

Here is the result :

An error occurred during execution: run_infer_script() missing 36 required positional arguments: 'post_process', 'reverb', 'pitch_shift', 'limiter', 'gain', 'distortion', 'chorus', 'bitcrush', 'clipping', 'compressor', 'delay', 'reverb_room_size', 'reverb_damping', 'reverb_wet_gain', 'reverb_dry_gain', 'reverb_width', 'reverb_freeze_mode', 'pitch_shift_semitones', 'limiter_threshold', 'limiter_release_time', 'gain_db', 'distortion_gain', 'chorus_rate', 'chorus_depth', 'chorus_center_delay', 'chorus_feedback', 'chorus_mix', 'bitcrush_bit_depth', 'clipping_threshold', 'compressor_threshold', 'compressor_ratio', 'compressor_attack', 'compressor_release', 'delay_seconds', 'delay_feedback', and 'delay_mix'
Traceback (most recent call last):
  File "/home/john/Applio/core.py", line 1679, in main
    run_infer_script(
    
TypeError: run_infer_script() missing 36 required positional arguments: 'post_process', 'reverb', 'pitch_shift', 'limiter', 'gain', 'distortion', 'chorus', 'bitcrush', 'clipping', 'compressor', 'delay', 'reverb_room_size', 'reverb_damping', 'reverb_wet_gain', 'reverb_dry_gain', 'reverb_width', 'reverb_freeze_mode', 'pitch_shift_semitones', 'limiter_threshold', 'limiter_release_time', 'gain_db', 'distortion_gain', 'chorus_rate', 'chorus_depth', 'chorus_center_delay', 'chorus_feedback', 'chorus_mix', 'bitcrush_bit_depth', 'clipping_threshold', 'compressor_threshold', 'compressor_ratio', 'compressor_attack', 'compressor_release', 'delay_seconds', 'delay_feedback', and 'delay_mix'

So I changed this part of the code (starting line 1670) :

def main():
    if len(sys.argv) == 1:
        print("Please run the script with '-h' for more information.")
        sys.exit(1)

    args = parse_arguments()

    try:
        if args.mode == "infer":
            run_infer_script(
                pitch=args.pitch,
                filter_radius=args.filter_radius,
                index_rate=args.index_rate,
                volume_envelope=args.volume_envelope,
                protect=args.protect,
                hop_length=args.hop_length,
                f0_method=args.f0_method,
                input_path=args.input_path,
                output_path=args.output_path,
                pth_path=args.pth_path,
                index_path=args.index_path,
                split_audio=args.split_audio,
                f0_autotune=args.f0_autotune,
                clean_audio=args.clean_audio,
                clean_strength=args.clean_strength,
                export_format=args.export_format,
                embedder_model=args.embedder_model,
                upscale_audio=args.upscale_audio,
                f0_file=args.f0_file,
                formant_shifting=args.formant_shifting,
                formant_qfrency=args.formant_qfrency,
                formant_timbre=args.formant_timbre,
                embedder_model_custom=args.embedder_model_custom,
                post_process=False,
                reverb=False,
                pitch_shift=False,
                limiter=False,
                gain=False,
                distortion=False,
                chorus=False,
                bitcrush=False,
                clipping=False,
                compressor=False,
                delay=False,
                reverb_room_size=0,
                reverb_damping=0,
                reverb_wet_gain=0,
                reverb_dry_gain=0,
                reverb_width=0,
                reverb_freeze_mode=0,
                pitch_shift_semitones=0,
                limiter_threshold=0,
                limiter_release_time=0,
                gain_db=0,
                distortion_gain=0,
                chorus_rate=0,
                chorus_depth=0,
                chorus_center_delay=0,
                chorus_feedback=0,
                chorus_mix=0,
                bitcrush_bit_depth=0,
                clipping_threshold=0,
                compressor_threshold=0,
                compressor_ratio=0,
                compressor_attack=0,
                compressor_release=0,
                delay_seconds=0,
                delay_feedback=0,
                delay_mix=0,
                sid=args.sid,

From here, there is no the previous errors but there is a new one :


An error occurred during execution: No module named 'noisereduce'
Traceback (most recent call last):
  File "/home/john/Applio/core.py", line 1679, in main
    run_infer_script(
  File "/home/john/Applio/core.py", line 114, in run_infer_script
    infer_pipeline = import_voice_converter()
  File "/home/john/Applio/core.py", line 39, in import_voice_converter
    from rvc.infer.infer import VoiceConverter
  File "/home/john/Applio/rvc/infer/infer.py", line 10, in <module>
    import noisereduce as nr
ModuleNotFoundError: No module named 'noisereduce'

Steps to reproduce

  1. Write a simple CLI command to be used with core.py
  2. Press Enter
  3. Error message
    ...

Expected behavior

It should work with a simple infer CLI command

Attachments

No response

Screenshots or Videos

No response

Additional Information

No response

@tomakorea tomakorea added the bug Something isn't working label Oct 4, 2024
@rmdom-dev
Copy link
Contributor

Try to install the dependencies correctly

@blaisewf
Copy link
Member

blaisewf commented Oct 6, 2024

@ShiromiyaG

@ShiromiyaG ShiromiyaG mentioned this issue Oct 6, 2024
8 tasks
@tomakorea
Copy link
Author

My changes in the code fixed the issues, I just forgot to activate the venv before launching it.

@blaisewf blaisewf closed this as completed Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants