From bb64e4659a8611b82cbe0413c8c26bcb1b7f1d8e Mon Sep 17 00:00:00 2001 From: iclementine Date: Sun, 20 Dec 2020 13:46:45 +0800 Subject: [PATCH] discard opencc untill we find an easy solution to install it on windows --- parakeet/frontend/phonectic.py | 8 +++++--- setup.py | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/parakeet/frontend/phonectic.py b/parakeet/frontend/phonectic.py index 2b1e2ae..4620b33 100644 --- a/parakeet/frontend/phonectic.py +++ b/parakeet/frontend/phonectic.py @@ -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 diff --git a/setup.py b/setup.py index 0fa9eb7..bf8f266 100644 --- a/setup.py +++ b/setup.py @@ -63,7 +63,7 @@ setup_info = dict( 'scipy', 'pandas', 'sox', - 'opencc', + # 'opencc', 'soundfile', 'g2p_en', 'g2pM',