Spaces:
Sleeping
Sleeping
Upload infertest.py
Browse files- infertest.py +3 -1
infertest.py
CHANGED
@@ -120,7 +120,7 @@ def convert_voice(spk_id, input_audio_path, voice_transform):
|
|
120 |
f0_up_key=voice_transform, # Assuming voice_transform corresponds to f0_up_key
|
121 |
f0_file=None ,
|
122 |
f0_method="rmvpe",
|
123 |
-
file_index=
|
124 |
index_rate=0.75,
|
125 |
filter_radius=3,
|
126 |
resample_sr=0,
|
@@ -151,10 +151,12 @@ def vc_single(
|
|
151 |
print(f"Converting...")
|
152 |
|
153 |
audio, sr = librosa.load(input_audio_path, sr=16000, mono=True)
|
|
|
154 |
f0_up_key = int(f0_up_key)
|
155 |
times = [0, 0, 0]
|
156 |
if hubert_model == None:
|
157 |
load_hubert()
|
|
|
158 |
if_f0 = 1
|
159 |
audio_opt = vc.pipeline(
|
160 |
hubert_model,
|
|
|
120 |
f0_up_key=voice_transform, # Assuming voice_transform corresponds to f0_up_key
|
121 |
f0_file=None ,
|
122 |
f0_method="rmvpe",
|
123 |
+
file_index="model.index", # Assuming file_index_path corresponds to file_index
|
124 |
index_rate=0.75,
|
125 |
filter_radius=3,
|
126 |
resample_sr=0,
|
|
|
151 |
print(f"Converting...")
|
152 |
|
153 |
audio, sr = librosa.load(input_audio_path, sr=16000, mono=True)
|
154 |
+
print(f"found audio ")
|
155 |
f0_up_key = int(f0_up_key)
|
156 |
times = [0, 0, 0]
|
157 |
if hubert_model == None:
|
158 |
load_hubert()
|
159 |
+
print("loaded hubert")
|
160 |
if_f0 = 1
|
161 |
audio_opt = vc.pipeline(
|
162 |
hubert_model,
|