jhansss commited on
Commit
cbe5f84
·
1 Parent(s): 4d8ad2d

Refactor svs_inference and related functions; Bug fixes and code cleanup

Files changed (2) hide show
  1. svs_utils.py +1 -1
  2. util.py +1 -1
svs_utils.py CHANGED
@@ -138,7 +138,7 @@ def svs_inference(answer_text, svs_model, config, **kwargs):
138
  raise NotImplementedError(f"melody source {config.melody_source} not supported")
139
 
140
  if config.model_path == "espnet/aceopencpop_svs_visinger2_40singer_pretrain":
141
- sid = np.array([config.speaker])
142
  output_dict = svs_model(batch, sids=sid)
143
  elif config.model_path == "espnet/mixdata_svs_visinger2_spkembed_lang_pretrained":
144
  langs = {
 
138
  raise NotImplementedError(f"melody source {config.melody_source} not supported")
139
 
140
  if config.model_path == "espnet/aceopencpop_svs_visinger2_40singer_pretrain":
141
+ sid = np.array([int(config.speaker)])
142
  output_dict = svs_model(batch, sids=sid)
143
  elif config.model_path == "espnet/mixdata_svs_visinger2_spkembed_lang_pretrained":
144
  langs = {
util.py CHANGED
@@ -15,7 +15,7 @@ def preprocess_input(src_str, seg_syb=" "):
15
 
16
 
17
  def postprocess_phn(phns, model_name, lang):
18
- if "Chinese" in model_name:
19
  return phns
20
  return [phn + "@" + lang for phn in phns]
21
 
 
15
 
16
 
17
  def postprocess_phn(phns, model_name, lang):
18
+ if model_name == "espnet/aceopencpop_svs_visinger2_40singer_pretrain":
19
  return phns
20
  return [phn + "@" + lang for phn in phns]
21