- voice-changer/: install.bat (uv + Python 3.12 + pinned Applio + torch cu128), VoiceChanger.exe launcher (mingw), tkinter GUI (model list, auto ±12 pitch across genders, mic/output/monitor devices, latency, noise gate), train.bat (preprocess/extract/train/index → models/<id>), examples.bat (Korean example models from KSS + Zeroth-Korean), build-release.sh - consent-recorder: default OPERATOR_NAME=사금향 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
64 lines
3.0 KiB
PowerShell
64 lines
3.0 KiB
PowerShell
# 음성 변환기 설치: uv → Python 3.12 → Applio 엔진(고정 커밋) → torch(CUDA 12.8, RTX 50 지원) → 기본 모델
|
|
$ErrorActionPreference = "Stop"
|
|
$ProgressPreference = "SilentlyContinue"
|
|
[Console]::OutputEncoding = [Text.Encoding]::UTF8
|
|
$Root = Split-Path -Parent $PSScriptRoot
|
|
Set-Location $Root
|
|
|
|
# Applio (MIT) 고정 커밋. 올릴 때는 이 값만 바꾸고 다시 install.bat
|
|
$ApplioCommit = "6d5d9511b7e719b1f613362bc767e841ad72fa72"
|
|
$UvVersion = "0.13.7"
|
|
|
|
$Tools = Join-Path $Root "tools"
|
|
$Uv = Join-Path $Tools "uv.exe"
|
|
$Engine = Join-Path $Root "engine"
|
|
$VenvDir = Join-Path $Root "env"
|
|
New-Item -ItemType Directory -Force $Tools | Out-Null
|
|
|
|
if (-not (Test-Path $Uv)) {
|
|
Write-Host "[1/5] uv 받기..."
|
|
$zip = Join-Path $Tools "uv.zip"
|
|
Invoke-WebRequest "https://github.com/astral-sh/uv/releases/download/$UvVersion/uv-x86_64-pc-windows-msvc.zip" -OutFile $zip
|
|
Expand-Archive $zip -DestinationPath $Tools -Force
|
|
Remove-Item $zip
|
|
} else { Write-Host "[1/5] uv 있음" }
|
|
|
|
$stamp = Join-Path $Engine ".commit"
|
|
if (-not (Test-Path $stamp) -or (Get-Content $stamp) -ne $ApplioCommit) {
|
|
Write-Host "[2/5] 엔진(Applio $($ApplioCommit.Substring(0,7))) 받기..."
|
|
$zip = Join-Path $Tools "applio.zip"
|
|
Invoke-WebRequest "https://github.com/IAHispano/Applio/archive/$ApplioCommit.zip" -OutFile $zip
|
|
$tmp = Join-Path $Tools "applio_tmp"
|
|
if (Test-Path $tmp) { Remove-Item -Recurse -Force $tmp }
|
|
Expand-Archive $zip -DestinationPath $tmp -Force
|
|
$src = Get-ChildItem $tmp | Select-Object -First 1
|
|
# 받아 둔 기본 모델(rvc/models)은 남기고 코드만 바꾼다
|
|
if (Test-Path $Engine) {
|
|
Get-ChildItem $Engine -Exclude "rvc","ffmpeg.exe","ffprobe.exe" | Remove-Item -Recurse -Force
|
|
}
|
|
New-Item -ItemType Directory -Force $Engine | Out-Null
|
|
Copy-Item -Recurse -Force (Join-Path $src.FullName "*") $Engine
|
|
Remove-Item -Recurse -Force $tmp, $zip
|
|
Set-Content $stamp $ApplioCommit
|
|
} else { Write-Host "[2/5] 엔진 있음" }
|
|
|
|
$env:UV_PYTHON_INSTALL_DIR = Join-Path $Tools "python"
|
|
$env:UV_CACHE_DIR = Join-Path $Tools "uv-cache"
|
|
if (-not (Test-Path (Join-Path $VenvDir "Scripts\python.exe"))) {
|
|
Write-Host "[3/5] Python 3.12 환경 만들기..."
|
|
& $Uv venv --python 3.12 $VenvDir
|
|
if ($LASTEXITCODE -ne 0) { throw "Python 환경을 만들지 못했습니다" }
|
|
} else { Write-Host "[3/5] Python 환경 있음" }
|
|
|
|
Write-Host "[4/5] 패키지 설치 (torch CUDA 12.8 포함, 처음엔 약 4GB)..."
|
|
& $Uv pip install --python (Join-Path $VenvDir "Scripts\python.exe") -r (Join-Path $Engine "requirements-engine.txt") pyarrow `
|
|
--extra-index-url https://download.pytorch.org/whl/cu128 --index-strategy unsafe-best-match
|
|
if ($LASTEXITCODE -ne 0) { throw "패키지 설치에 실패했습니다" }
|
|
|
|
Write-Host "[5/5] 기본 모델 받기 · GPU 확인..."
|
|
& (Join-Path $VenvDir "Scripts\python.exe") (Join-Path $Root "app\setup_engine.py")
|
|
if ($LASTEXITCODE -ne 0) { throw "기본 모델 받기 또는 GPU 확인에 실패했습니다" }
|
|
|
|
Write-Host ""
|
|
Write-Host "설치가 끝났습니다. VoiceChanger.exe 로 실행하세요."
|