Version Check (#1390)
* version check * fix webui and symbols * fix v1 language map
This commit is contained in:
@@ -4,12 +4,6 @@ import sys
|
||||
|
||||
import pyopenjtalk
|
||||
|
||||
|
||||
import os
|
||||
if os.environ.get("version","v1")=="v1":
|
||||
from text.symbols import symbols
|
||||
else:
|
||||
from text.symbols2 import symbols
|
||||
from text.symbols import punctuation
|
||||
# Regular expression matching Japanese without punctuation marks:
|
||||
_japanese_characters = re.compile(
|
||||
@@ -61,12 +55,13 @@ def post_replace_ph(ph):
|
||||
"、": ",",
|
||||
"...": "…",
|
||||
}
|
||||
|
||||
if ph in rep_map.keys():
|
||||
ph = rep_map[ph]
|
||||
if ph in symbols:
|
||||
return ph
|
||||
if ph not in symbols:
|
||||
ph = "UNK"
|
||||
# if ph in symbols:
|
||||
# return ph
|
||||
# if ph not in symbols:
|
||||
# ph = "UNK"
|
||||
return ph
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user