feat: CosyVoice 한국어 엔진 통합 (Apache-2.0, GPU)

- vendor/CosyVoice: 패치된 CosyVoice 코드 + Matcha-TTS 벤더링
- cosyvoice_worker: 전용 venv에서 상주하는 합성 워커(FastAPI, 모델 1회 로드)
- app/engines/cosyvoice_engine: HTTP 프록시 엔진(속도/피치)
- Dockerfile: 전용 venv(torch cu128) + 모델 베이킹 + 빌드 워밍업
- entrypoint.sh: 워커(8001) + 메인앱(8788) 동시 기동
This commit is contained in:
claude
2026-08-23 23:16:24 +09:00
parent b92d2be2af
commit 9c1009d16d
93 changed files with 74398 additions and 6 deletions

15
entrypoint.sh Normal file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -e
# CosyVoice 워커(전용 venv)를 백그라운드로 기동 — 모델을 1회 로드해 상주
if [ -n "$COSYVOICE_URL" ] && [ -x /opt/cosyvoice-venv/bin/python ]; then
echo "[entrypoint] starting CosyVoice worker on :8001"
/opt/cosyvoice-venv/bin/python -m uvicorn worker:app \
--app-dir /opt/cosyvoice_worker \
--host 127.0.0.1 --port 8001 \
> /tmp/cosyvoice_worker.log 2>&1 &
fi
# 메인 앱(글로벌 파이썬, MeloTTS 인프로세스)
echo "[entrypoint] starting main app on :8788"
exec uvicorn app.server:app --host 0.0.0.0 --port 8788