|
|
@ -320,7 +320,7 @@ class en_G2p(G2p):
|
|
|
|
|
|
|
|
|
|
|
|
# 尝试分离所有格
|
|
|
|
# 尝试分离所有格
|
|
|
|
if re.match(r"^([a-z]+)('s)$", word):
|
|
|
|
if re.match(r"^([a-z]+)('s)$", word):
|
|
|
|
phones = self.qryword(word[:-2])
|
|
|
|
phones = self.qryword(word[:-2])[:]
|
|
|
|
# P T K F TH HH 无声辅音结尾 's 发 ['S']
|
|
|
|
# P T K F TH HH 无声辅音结尾 's 发 ['S']
|
|
|
|
if phones[-1] in ['P', 'T', 'K', 'F', 'TH', 'HH']:
|
|
|
|
if phones[-1] in ['P', 'T', 'K', 'F', 'TH', 'HH']:
|
|
|
|
phones.extend(['S'])
|
|
|
|
phones.extend(['S'])
|
|
|
@ -359,4 +359,4 @@ def g2p(text):
|
|
|
|
if __name__ == "__main__":
|
|
|
|
if __name__ == "__main__":
|
|
|
|
print(g2p("hello"))
|
|
|
|
print(g2p("hello"))
|
|
|
|
print(g2p(text_normalize("e.g. I used openai's AI tool to draw a picture.")))
|
|
|
|
print(g2p(text_normalize("e.g. I used openai's AI tool to draw a picture.")))
|
|
|
|
print(g2p(text_normalize("In this; paper, we propose 1 DSPGAN, a GAN-based universal vocoder.")))
|
|
|
|
print(g2p(text_normalize("In this; paper, we propose 1 DSPGAN, a GAN-based universal vocoder.")))
|
|
|
|