Fix hyphen (#1454)

This commit is contained in:
KamioRinn 2024-08-13 10:26:43 +08:00 committed by GitHub
parent c60e796452
commit 012de7058c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -324,6 +324,8 @@ class en_G2p(G2p):
# 单读 A 发音修正, 此处不存在大写的情况 # 单读 A 发音修正, 此处不存在大写的情况
if w == "a": if w == "a":
phones.extend(['EY1']) phones.extend(['EY1'])
elif not w.isalpha():
phones.extend([w])
else: else:
phones.extend(self.cmu[w][0]) phones.extend(self.cmu[w][0])
return phones return phones