discard opencc untill we find an easy solution to install it on windows

This commit is contained in:
iclementine 2020-12-20 13:46:45 +08:00
parent e03e96d9e4
commit bb64e4659a
2 changed files with 6 additions and 4 deletions

View File

@ -17,7 +17,8 @@ from typing import Union
from g2p_en import G2p
from g2pM import G2pM
from parakeet.frontend import Vocab
from opencc import OpenCC
# discard opencc untill we find an easy solution to install it on windows
# from opencc import OpenCC
from parakeet.frontend.punctuation import get_punctuations
from parakeet.frontend.normalizer.normalizer import normalize
@ -211,7 +212,7 @@ class Chinese(Phonetics):
"""
def __init__(self):
self.opencc_backend = OpenCC('t2s.json')
# self.opencc_backend = OpenCC('t2s.json')
self.backend = G2pM()
self.phonemes = self._get_all_syllables()
self.punctuations = get_punctuations("cn")
@ -236,7 +237,8 @@ class Chinese(Phonetics):
List[str]
The list of pronunciation sequence.
"""
simplified = self.opencc_backend.convert(sentence)
# simplified = self.opencc_backend.convert(sentence)
simplified = sentence
phonemes = self.backend(simplified)
start = self.vocab.start_symbol
end = self.vocab.end_symbol

View File

@ -63,7 +63,7 @@ setup_info = dict(
'scipy',
'pandas',
'sox',
'opencc',
# 'opencc',
'soundfile',
'g2p_en',
'g2pM',