Ver 2.7.0 maybe
This commit is contained in:
@@ -11,10 +11,8 @@ import torch
|
||||
from numpy.typing import NDArray
|
||||
|
||||
from style_bert_vits2.logging import logger
|
||||
from style_bert_vits2.models.utils import (
|
||||
checkpoints, # type: ignore # noqa: F401
|
||||
safetensors, # type: ignore # noqa: F401
|
||||
)
|
||||
from style_bert_vits2.models.utils import checkpoints # type: ignore # noqa: F401
|
||||
from style_bert_vits2.models.utils import safetensors # type: ignore # noqa: F401
|
||||
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
||||
@@ -121,7 +121,7 @@ def normalize_text(text: str) -> str:
|
||||
# 結合文字の濁点・半濁点を削除
|
||||
# 通常の「ば」等はそのままのこされる、「あ゛」は上で「あ゙」になりここで「あ」になる
|
||||
res = res.replace("\u3099", "") # 結合文字の濁点を削除、る゙ → る
|
||||
res = res.replace("\u309A", "") # 結合文字の半濁点を削除、な゚ → な
|
||||
res = res.replace("\u309a", "") # 結合文字の半濁点を削除、な゚ → な
|
||||
return res
|
||||
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ class WorkerServer:
|
||||
def start_server(self, port: int, no_client_timeout: int = 30) -> None:
|
||||
logger.info("start pyopenjtalk worker server")
|
||||
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as server_socket:
|
||||
server_socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
server_socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
server_socket.bind((socket.gethostname(), port))
|
||||
server_socket.listen()
|
||||
sockets = [server_socket]
|
||||
|
||||
@@ -41,7 +41,7 @@ def run_script_with_log(
|
||||
|
||||
|
||||
def second_elem_of(
|
||||
original_function: Callable[..., tuple[Any, Any]]
|
||||
original_function: Callable[..., tuple[Any, Any]],
|
||||
) -> Callable[..., Any]:
|
||||
"""
|
||||
与えられた関数をラップし、その戻り値の 2 番目の要素のみを返す関数を生成する。
|
||||
|
||||
Reference in New Issue
Block a user