Update app.py
Browse files
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(
|
349 |
if not ref_wav_path:
|
350 |
-
|
351 |
return
|
352 |
-
func(ref_wav_path, *args
|
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 |
|