From 4d61d9bda837d45206ff8d782890078d56535b1f Mon Sep 17 00:00:00 2001 From: Vidalnt Date: Sun, 29 Sep 2024 17:36:06 -0500 Subject: [PATCH] fix: :art: Modifying the Colab according to the previous arrangements --- assets/Applio_NoUI.ipynb | 170 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 165 insertions(+), 5 deletions(-) diff --git a/assets/Applio_NoUI.ipynb b/assets/Applio_NoUI.ipynb index d58f300d..955a9231 100644 --- a/assets/Applio_NoUI.ipynb +++ b/assets/Applio_NoUI.ipynb @@ -75,7 +75,7 @@ "outputs": [], "source": [ "# @title Clone\n", - "!git clone https://github.com/IAHispano/Applio --branch 3.2.5 --single-branch\n", + "!git clone https://github.com/IAHispano/Applio --branch 3.2.6 --single-branch\n", "%cd /content/Applio" ] }, @@ -233,8 +233,96 @@ "formant_shift = False # @param{type:\"boolean\"}\n", "formant_qfrency = 1.0 # @param {type:\"slider\", min:1.0, max:16.0, step:0.1}\n", "formant_timbre = 1.0 # @param {type:\"slider\", min:1.0, max:16.0, step:0.1}\n", - "\n", - "!python core.py infer --pitch \"{f0_up_key}\" --filter_radius \"{filter_radius}\" --volume_envelope \"{rms_mix_rate}\" --index_rate \"{index_rate}\" --hop_length \"{hop_length}\" --protect \"{protect}\" --f0_autotune \"{f0_autotune}\" --f0_method \"{f0_method}\" --input_path \"{input_path}\" --output_path \"{output_path}\" --pth_path \"{pth_file}\" --index_path \"{index_file}\" --split_audio \"{split_audio}\" --clean_audio \"{clean_audio}\" --clean_strength \"{clean_strength}\" --export_format \"{export_format}\" --formant_shifting \"{formant_shift}\" --formant_qfrency \"{formant_qfrency}\" --formant_timbre \"{formant_timbre}\"\n", + "embedder_model = \"contentvec\" # @param [\"contentvec\", \"chinese-hubert-base\", \"japanese-hubert-base\", \"korean-hubert-base\", \"custom\"] {allow-input: false}\n", + "embedder_model_custom = \"\" # @param {type:\"string\"}\n", + "upscale_audio = False # @param{type:\"boolean\"}\n", + "\n", + "\n", + "# Post-processing effects\n", + "if \"post_process\" not in globals():\n", + " post_process = False \n", + "if \"reverb\" not in globals():\n", + " reverb = False \n", + "if \"pitch_shift\" not in globals():\n", + " pitch_shift = False \n", + "if \"limiter\" not in globals():\n", + " limiter = False \n", + "if \"gain\" not in globals():\n", + " gain = False \n", + "if \"distortion\" not in globals():\n", + " distortion = False \n", + "if \"chorus\" not in globals():\n", + " chorus = False \n", + "if \"bitcrush\" not in globals():\n", + " bitcrush = False\n", + "if \"clipping\" not in globals():\n", + " clipping = False \n", + "if \"compressor\" not in globals():\n", + " compressor = False \n", + "if \"delay\" not in globals():\n", + " delay = False\n", + "\n", + "if \"reverb_room_size\" not in globals():\n", + " reverb_room_size = 0.5 \n", + "if \"reverb_damping\" not in globals():\n", + " reverb_damping = 0.5 \n", + "if \"reverb_wet_gain\" not in globals():\n", + " reverb_wet_gain = 0.0 \n", + "if \"reverb_dry_gain\" not in globals():\n", + " reverb_dry_gain = 0.0 \n", + "if \"reverb_width\" not in globals():\n", + " reverb_width = 1.0 \n", + "if \"reverb_freeze_mode\" not in globals():\n", + " reverb_freeze_mode = 0.0 \n", + "\n", + "if \"pitch_shift_semitones\" not in globals():\n", + " pitch_shift_semitones = 0.0 \n", + "\n", + "if \"limiter_threshold\" not in globals():\n", + " limiter_threshold = -1.0 \n", + "if \"limiter_release_time\" not in globals():\n", + " limiter_release_time = 0.05 \n", + "\n", + "if \"gain_db\" not in globals():\n", + " gain_db = 0.0 \n", + "\n", + "if \"distortion_gain\" not in globals():\n", + " distortion_gain = 0.0 \n", + "\n", + "if \"chorus_rate\" not in globals():\n", + " chorus_rate = 1.5 \n", + "if \"chorus_depth\" not in globals():\n", + " chorus_depth = 0.1 \n", + "if \"chorus_center_delay\" not in globals():\n", + " chorus_center_delay = 15.0 \n", + "if \"chorus_feedback\" not in globals():\n", + " chorus_feedback = 0.25 \n", + "if \"chorus_mix\" not in globals():\n", + " chorus_mix = 0.5 \n", + "\n", + "if \"bitcrush_bit_depth\" not in globals():\n", + " bitcrush_bit_depth = 4 \n", + "\n", + "if \"clipping_threshold\" not in globals():\n", + " clipping_threshold = 0.5 \n", + "\n", + "if \"compressor_threshold\" not in globals():\n", + " compressor_threshold = -20.0\n", + "if \"compressor_ratio\" not in globals():\n", + " compressor_ratio = 4.0 \n", + "if \"compressor_attack\" not in globals():\n", + " compressor_attack = 0.001 \n", + "if \"compressor_release\" not in globals():\n", + " compressor_release = 0.1 \n", + "\n", + "if \"delay_seconds\" not in globals():\n", + " delay_seconds = 0.1\n", + "if \"delay_feedback\" not in globals():\n", + " delay_feedback = 0.5 \n", + "if \"delay_mix\" not in globals():\n", + " delay_mix = 0.5 \n", + " \n", + "!python core.py infer --pitch \"{f0_up_key}\" --filter_radius \"{filter_radius}\" --volume_envelope \"{rms_mix_rate}\" --index_rate \"{index_rate}\" --hop_length \"{hop_length}\" --protect \"{protect}\" --f0_autotune \"{f0_autotune}\" --f0_method \"{f0_method}\" --input_path \"{input_path}\" --output_path \"{output_path}\" --pth_path \"{pth_file}\" --index_path \"{index_file}\" --split_audio \"{split_audio}\" --clean_audio \"{clean_audio}\" --clean_strength \"{clean_strength}\" --export_format \"{export_format}\" --embedder_model \"{embedder_model}\" --embedder_model_custom \"{embedder_model_custom}\" --upscale_audio \"{upscale_audio}\" --formant_shifting \"{formant_shift}\" --formant_qfrency \"{formant_qfrency}\" --formant_timbre \"{formant_timbre}\" --post_process \"{post_process}\" --reverb \"{reverb}\" --pitch_shift \"{pitch_shift}\" --limiter \"{limiter}\" --gain \"{gain}\" --distortion \"{distortion}\" --chorus \"{chorus}\" --bitcrush \"{bitcrush}\" --clipping \"{clipping}\" --compressor \"{compressor}\" --delay \"{delay}\" --reverb_room_size \"{reverb_room_size}\" --reverb_damping \"{reverb_damping}\" --reverb_wet_gain \"{reverb_wet_gain}\" --reverb_dry_gain \"{reverb_dry_gain}\" --reverb_width \"{reverb_width}\" --reverb_freeze_mode \"{reverb_freeze_mode}\" --pitch_shift_semitones \"{pitch_shift_semitones}\" --limiter_threshold \"{limiter_threshold}\" --limiter_release_time \"{limiter_release_time}\" --gain_db \"{gain_db}\" --distortion_gain \"{distortion_gain}\" --chorus_rate \"{chorus_rate}\" --chorus_depth \"{chorus_depth}\" --chorus_center_delay \"{chorus_center_delay}\" --chorus_feedback \"{chorus_feedback}\" --chorus_mix \"{chorus_mix}\" --bitcrush_bit_depth \"{bitcrush_bit_depth}\" --clipping_threshold \"{clipping_threshold}\" --compressor_threshold \"{compressor_threshold}\" --compressor_ratio \"{compressor_ratio}\" --compressor_attack \"{compressor_attack}\" --compressor_release \"{compressor_release}\" --delay_seconds \"{delay_seconds}\" --delay_feedback \"{delay_feedback}\" --delay_mix \"{delay_mix}\"\n", "\n", "from IPython.display import Audio, display, clear_output\n", "\n", @@ -243,6 +331,73 @@ "display(Audio(output_path, autoplay=True))" ] }, + { + "cell_type": "markdown", + "metadata": { + "id": "yrWw2h9d2TRn" + }, + "source": [ + "## **Advanced Settings**" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "cellView": "form", + "id": "J43qejJ-2Tpp" + }, + "outputs": [], + "source": [ + "# @title # Post-processing effects\n", + "post_process = False # @param{type:\"boolean\"}\n", + "reverb = False # @param{type:\"boolean\"}\n", + "pitch_shift = False # @param{type:\"boolean\"}\n", + "limiter = False # @param{type:\"boolean\"}\n", + "gain = False # @param{type:\"boolean\"}\n", + "distortion = False # @param{type:\"boolean\"}\n", + "chorus = False # @param{type:\"boolean\"}\n", + "bitcrush = False # @param{type:\"boolean\"}\n", + "clipping = False # @param{type:\"boolean\"}\n", + "compressor = False # @param{type:\"boolean\"}\n", + "delay = False # @param{type:\"boolean\"}\n", + "\n", + "reverb_room_size = 0.5 # @param {type:\"slider\", min:0.0, max:1.0, step:0.1}\n", + "reverb_damping = 0.5 # @param {type:\"slider\", min:0.0, max:1.0, step:0.1}\n", + "reverb_wet_gain = 0.0 # @param {type:\"slider\", min:-20.0, max:20.0, step:0.1}\n", + "reverb_dry_gain = 0.0 # @param {type:\"slider\", min:-20.0, max:20.0, step:0.1}\n", + "reverb_width = 1.0 # @param {type:\"slider\", min:0.0, max:1.0, step:0.1}\n", + "reverb_freeze_mode = 0.0 # @param {type:\"slider\", min:0.0, max:1.0, step:0.1}\n", + "\n", + "pitch_shift_semitones = 0.0 # @param {type:\"slider\", min:-12.0, max:12.0, step:0.1}\n", + "\n", + "limiter_threshold = -1.0 # @param {type:\"slider\", min:-20.0, max:0.0, step:0.1}\n", + "limiter_release_time = 0.05 # @param {type:\"slider\", min:0.0, max:1.0, step:0.01}\n", + "\n", + "gain_db = 0.0 # @param {type:\"slider\", min:-20.0, max:20.0, step:0.1}\n", + "\n", + "distortion_gain = 0.0 # @param {type:\"slider\", min:0.0, max:1.0, step:0.1}\n", + "\n", + "chorus_rate = 1.5 # @param {type:\"slider\", min:0.1, max:10.0, step:0.1}\n", + "chorus_depth = 0.1 # @param {type:\"slider\", min:0.0, max:1.0, step:0.1}\n", + "chorus_center_delay = 15.0 # @param {type:\"slider\", min:0.0, max:50.0, step:0.1}\n", + "chorus_feedback = 0.25 # @param {type:\"slider\", min:0.0, max:1.0, step:0.1}\n", + "chorus_mix = 0.5 # @param {type:\"slider\", min:0.0, max:1.0, step:0.1}\n", + "\n", + "bitcrush_bit_depth = 4 # @param {type:\"slider\", min:1, max:16, step:1}\n", + "\n", + "clipping_threshold = 0.5 # @param {type:\"slider\", min:0.0, max:1.0, step:0.1}\n", + "\n", + "compressor_threshold = -20.0 # @param {type:\"slider\", min:-60.0, max:0.0, step:0.1}\n", + "compressor_ratio = 4.0 # @param {type:\"slider\", min:1.0, max:20.0, step:0.1}\n", + "compressor_attack = 0.001 # @param {type:\"slider\", min:0.0, max:0.1, step:0.001}\n", + "compressor_release = 0.1 # @param {type:\"slider\", min:0.0, max:1.0, step:0.01}\n", + "\n", + "delay_seconds = 0.1 # @param {type:\"slider\", min:0.0, max:1.0, step:0.01}\n", + "delay_feedback = 0.5 # @param {type:\"slider\", min:0.0, max:1.0, step:0.1}\n", + "delay_mix = 0.5 # @param {type:\"slider\", min:0.0, max:1.0, step:0.1}\n" + ] + }, { "cell_type": "markdown", "metadata": { @@ -271,8 +426,11 @@ "sr = int(sample_rate.rstrip(\"k\")) * 1000\n", "cpu_cores = 2 # @param {type:\"slider\", min:1, max:2, step:1}\n", "cut_preprocess = True # @param{type:\"boolean\"}\n", + "process_effects = False # @param{type:\"boolean\"}\n", + "noise_reduction = False # @param{type:\"boolean\"}\n", + "noise_reduction_strength = 0.7 # @param {type:\"slider\", min:0.0, max:1.0, step:0.1}\n", "\n", - "!python core.py preprocess --model_name \"{model_name}\" --dataset_path \"{dataset_path}\" --sample_rate \"{sr}\" --cpu_cores \"{cpu_cores}\" --cut_preprocess \"{cut_preprocess}\"" + "!python core.py preprocess --model_name \"{model_name}\" --dataset_path \"{dataset_path}\" --sample_rate \"{sr}\" --cpu_cores \"{cpu_cores}\" --cut_preprocess \"{cut_preprocess}\" --process_effects \"{process_effects}\" --noise_reduction \"{noise_reduction}\" --noise_reduction_strength \"{noise_reduction_strength}\"" ] }, { @@ -292,8 +450,10 @@ "\n", "sr = int(sample_rate.rstrip(\"k\")) * 1000\n", "cpu_cores = 2 # @param {type:\"slider\", min:1, max:2, step:1}\n", + "embedder_model = \"contentvec\" # @param [\"contentvec\", \"chinese-hubert-base\", \"japanese-hubert-base\", \"korean-hubert-base\", \"custom\"] {allow-input: false}\n", + "embedder_model_custom = \"\" # @param {type:\"string\"}\n", "\n", - "!python core.py extract --model_name \"{model_name}\" --rvc_version \"{rvc_version}\" --f0_method \"{f0_method}\" --pitch_guidance \"{pitch_guidance}\" --hop_length \"{hop_length}\" --sample_rate \"{sr}\" --cpu_cores \"{cpu_cores}\" --gpu \"0\"" + "!python core.py extract --model_name \"{model_name}\" --rvc_version \"{rvc_version}\" --f0_method \"{f0_method}\" --pitch_guidance \"{pitch_guidance}\" --hop_length \"{hop_length}\" --sample_rate \"{sr}\" --cpu_cores \"{cpu_cores}\" --gpu \"0\" --embedder_model \"{embedder_model}\" --embedder_model_custom \"{embedder_model_custom}\"" ] }, {