aryo100 commited on
Commit
92dbf11
·
1 Parent(s): 29c7647

update models.py

Browse files
Files changed (1) hide show
  1. modules/models.py +8 -2
modules/models.py CHANGED
@@ -194,9 +194,15 @@ class VoiceConvertModel:
194
  prefix_num = int(result.group(0))
195
  if index < prefix_num:
196
  index = prefix_num
 
 
 
 
 
 
197
  audio.export(
198
  os.path.join(
199
- output_dir, f"{index+1}-{model_splitext}-{input_audio_splitext}.wav"
200
  ),
201
  format="wav",
202
  )
@@ -274,7 +280,7 @@ def get_vc_model(model_name: str):
274
  else:
275
  # Fallback to checkpoints folder
276
  model_path = os.path.join(MODELS_DIR, "checkpoints", model_name)
277
-
278
  torch.serialization.add_safe_globals([fairseq.data.dictionary.Dictionary])
279
  weight = torch.load(model_path, map_location="cpu", weights_only=False)
280
  return VoiceConvertModel(model_name, weight)
 
194
  prefix_num = int(result.group(0))
195
  if index < prefix_num:
196
  index = prefix_num
197
+ # audio.export(
198
+ # os.path.join(
199
+ # output_dir, f"{index+1}-{model_splitext}-{input_audio_splitext}.wav"
200
+ # ),
201
+ # format="wav",
202
+ # )
203
  audio.export(
204
  os.path.join(
205
+ output_dir, input_audio
206
  ),
207
  format="wav",
208
  )
 
280
  else:
281
  # Fallback to checkpoints folder
282
  model_path = os.path.join(MODELS_DIR, "checkpoints", model_name)
283
+
284
  torch.serialization.add_safe_globals([fairseq.data.dictionary.Dictionary])
285
  weight = torch.load(model_path, map_location="cpu", weights_only=False)
286
  return VoiceConvertModel(model_name, weight)