- FastAPI 백엔드: /api/voices, /api/tts, /api/health - 한국어 메인 + 영어(5종 악센트), 중국어/일본어 UI 제거 - 언어별 목소리 모델 선택, 속도(0.5~2.0x)/피치(±12반음) 조절 - 로그인/사용제한/과금 유도 없음 (무제한 테스트) - NVIDIA GPU 자동 사용 (torch cu128, Blackwell sm_120) - 유저 친화 한국어 UI (frontend) - Docker/compose (GPU 예약), 8788 포트 - MeloTTS(순수 파이썬) 벤더링 + 검증된 버전 고정(constraints)
17 lines
563 B
Python
17 lines
563 B
Python
from numpy import zeros, int32, float32
|
|
from torch import from_numpy
|
|
|
|
from .core import maximum_path_jit
|
|
|
|
|
|
def maximum_path(neg_cent, mask):
|
|
device = neg_cent.device
|
|
dtype = neg_cent.dtype
|
|
neg_cent = neg_cent.data.cpu().numpy().astype(float32)
|
|
path = zeros(neg_cent.shape, dtype=int32)
|
|
|
|
t_t_max = mask.sum(1)[:, 0].data.cpu().numpy().astype(int32)
|
|
t_s_max = mask.sum(2)[:, 0].data.cpu().numpy().astype(int32)
|
|
maximum_path_jit(path, neg_cent, t_t_max, t_s_max)
|
|
return from_numpy(path).to(device=device, dtype=dtype)
|