oh-my-dear-ai commited on
Commit
4475c95
·
verified ·
1 Parent(s): 91da13b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -344,12 +344,12 @@ def get_bert_final(phones, word2ph, norm_text,language,device):
344
 
345
  def get_ref_path_decor(func):
346
  # 为了hg部署添加的装饰函数,将参考文本的内容改为路径
347
- def inner(*args):
348
- ref_wav_path = text_to_audio_mappings.get(args[0], "")
349
  if not ref_wav_path:
350
- logger.warn("Audio file not found for the selected text.")
351
  return
352
- func(ref_wav_path, *args[1:])
353
 
354
  return inner
355
 
 
344
 
345
  def get_ref_path_decor(func):
346
  # 为了hg部署添加的装饰函数,将参考文本的内容改为路径
347
+ def inner(wav_name, *args):
348
+ ref_wav_path = text_to_audio_mappings.get(wav_name, "")
349
  if not ref_wav_path:
350
+ print("Audio file not found for the selected text.")
351
  return
352
+ func(ref_wav_path, *args)
353
 
354
  return inner
355