Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tools/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ def forced_align(log_probs: torch.Tensor, targets: torch.Tensor, blank: int = 0)
"score": round(score, 3),
}
)
except:
except Exception:
pass
return items
4 changes: 2 additions & 2 deletions tools/whisper_mix_normalize.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ def safe_ja_g2p(text, kana=True, max_length=100):
try:
converted = pyopenjtalk.g2p(part, kana=kana)
parts.append(converted)
except:
except Exception:
parts.append(part) # 如果转换失败,使用原文本
return ' '.join(parts)
else:
try:
return pyopenjtalk.g2p(text, kana=kana)
except:
except Exception:
return text # 如果转换失败,返回原文本


Expand Down