Spaces:
Sleeping
Sleeping
gpu zero
Browse files- src/main.py +3 -0
src/main.py
CHANGED
@@ -21,6 +21,8 @@ from pydub import AudioSegment
|
|
21 |
from src.mdx import run_mdx, run_roformer
|
22 |
from src.rvc import Config, load_hubert, get_vc, rvc_infer
|
23 |
|
|
|
|
|
24 |
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
25 |
|
26 |
mdxnet_models_dir = os.path.join(BASE_DIR, 'mdxnet_models')
|
@@ -232,6 +234,7 @@ def combine_audio(audio_paths, output_path, main_gain, backup_gain, inst_gain, o
|
|
232 |
instrumental_audio = AudioSegment.from_wav(audio_paths[2]) - 7 + inst_gain
|
233 |
main_vocal_audio.overlay(backup_vocal_audio).overlay(instrumental_audio).export(output_path, format=output_format)
|
234 |
|
|
|
235 |
def song_cover_pipeline(song_input, voice_model, pitch_change, keep_files,
|
236 |
is_webui=0, main_gain=0, backup_gain=0, inst_gain=0, index_rate=0.5, filter_radius=3,
|
237 |
rms_mix_rate=0.25, f0_method='rmvpe', crepe_hop_length=128, protect=0.33, pitch_change_all=0,
|
|
|
21 |
from src.mdx import run_mdx, run_roformer
|
22 |
from src.rvc import Config, load_hubert, get_vc, rvc_infer
|
23 |
|
24 |
+
import spaces
|
25 |
+
|
26 |
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
27 |
|
28 |
mdxnet_models_dir = os.path.join(BASE_DIR, 'mdxnet_models')
|
|
|
234 |
instrumental_audio = AudioSegment.from_wav(audio_paths[2]) - 7 + inst_gain
|
235 |
main_vocal_audio.overlay(backup_vocal_audio).overlay(instrumental_audio).export(output_path, format=output_format)
|
236 |
|
237 |
+
@spaces.GPU
|
238 |
def song_cover_pipeline(song_input, voice_model, pitch_change, keep_files,
|
239 |
is_webui=0, main_gain=0, backup_gain=0, inst_gain=0, index_rate=0.5, filter_radius=3,
|
240 |
rms_mix_rate=0.25, f0_method='rmvpe', crepe_hop_length=128, protect=0.33, pitch_change_all=0,
|