한국어 우선 MeloTTS 웹 서비스 추가 (GPU, 속도/피치, 로그인 없음)

- 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)
This commit is contained in:
claude
2026-08-23 21:57:48 +09:00
parent a6f3bac584
commit f197177ae1
77 changed files with 11621 additions and 1 deletions

38
Dockerfile Normal file
View File

@@ -0,0 +1,38 @@
FROM python:3.11-slim
ENV PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1 \
HF_HOME=/models \
NLTK_DATA=/models/nltk_data \
HF_HUB_DISABLE_TELEMETRY=1
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential git ffmpeg libsndfile1 curl ca-certificates \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
RUN mkdir -p /models/nltk_data
# Blackwell(sm_120, RTX 5050/5070Ti) 지원 torch cu128 휠
# (파일 의존성이 없어 constraints/requirements 수정 시에도 캐시 유지)
RUN pip install torch==2.11.0 torchaudio==2.11.0 \
--index-url https://download.pytorch.org/whl/cu128
COPY constraints.txt requirements.txt ./
# 나머지 의존성 (정확한 버전 고정)
RUN pip install -c constraints.txt -r requirements.txt
# MeloTTS(순수 파이썬) 벤더링: 검증된 호스트 사본을 그대로 설치
# (PyPI 미배포 0.1.2 + gradio/tensorboard 등 불필요 의존성 회피)
COPY vendor/melo /usr/local/lib/python3.11/site-packages/melo
COPY app ./app
COPY frontend ./frontend
COPY warmup.py ./
# 한국어/영어 모델 및 부가 데이터 사전 다운로드 (첫 요청 지연 제거)
RUN python warmup.py
EXPOSE 8788
CMD ["uvicorn", "app.server:app", "--host", "0.0.0.0", "--port", "8788"]