Ver 2.7.0 maybe

This commit is contained in:
litagin02
2025-08-24 11:27:27 +09:00
parent 4859d64e9f
commit c51c80fe1a
24 changed files with 173 additions and 33 deletions

View File

@@ -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:

View File

@@ -121,7 +121,7 @@ def normalize_text(text: str) -> str:
# 結合文字の濁点・半濁点を削除
# 通常の「ば」等はそのままのこされる、「あ゛」は上で「あ゙」になりここで「あ」になる
res = res.replace("\u3099", "") # 結合文字の濁点を削除、る゙ → る
res = res.replace("\u309A", "") # 結合文字の半濁点を削除、な゚ → な
res = res.replace("\u309a", "") # 結合文字の半濁点を削除、な゚ → な
return res

View File

@@ -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]

View File

@@ -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 番目の要素のみを返す関数を生成する。