mirror of https://github.com/coqui-ai/TTS.git
Fixed lint errors
This commit is contained in:
parent
0536aa6d0f
commit
f921a05bdb
|
@ -3,7 +3,6 @@
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import MeCab
|
import MeCab
|
||||||
from typing import List, Tuple
|
|
||||||
|
|
||||||
_CONVRULES = [
|
_CONVRULES = [
|
||||||
# Conversion of 2 letters
|
# Conversion of 2 letters
|
||||||
|
@ -364,7 +363,7 @@ def text2kata(text: str) -> str:
|
||||||
else:
|
else:
|
||||||
if word in _SYMBOL_TOKENS:
|
if word in _SYMBOL_TOKENS:
|
||||||
res.append(word)
|
res.append(word)
|
||||||
elif word == 'っ' or word == 'ッ':
|
elif word in ('っ', 'ッ'):
|
||||||
res.append('ッ')
|
res.append('ッ')
|
||||||
elif word in _NO_YOMI_TOKENS:
|
elif word in _NO_YOMI_TOKENS:
|
||||||
pass
|
pass
|
||||||
|
|
|
@ -39,7 +39,8 @@ def text2phone(text, language):
|
||||||
if language == "zh-CN":
|
if language == "zh-CN":
|
||||||
ph = chinese_text_to_phonemes(text)
|
ph = chinese_text_to_phonemes(text)
|
||||||
return ph
|
return ph
|
||||||
elif language == "ja-jp":
|
|
||||||
|
if language == "ja-jp":
|
||||||
from TTS.tts.utils.japanese import japanese_text2phone
|
from TTS.tts.utils.japanese import japanese_text2phone
|
||||||
ph = japanese_text2phone(text)
|
ph = japanese_text2phone(text)
|
||||||
return ph
|
return ph
|
||||||
|
|
Loading…
Reference in New Issue