param( [string]$AceStepRoot = "D:\ai\ACE-Step-1.5", [string]$Python = "", [ValidateRange(1024, 65535)] [int]$Port = 9874 ) $ErrorActionPreference = "Stop" if ($env:ACESTEP_ROOT -and -not $PSBoundParameters.ContainsKey("AceStepRoot")) { $AceStepRoot = $env:ACESTEP_ROOT } if (-not $Python) { $Python = Join-Path $AceStepRoot ".venv\Scripts\python.exe" } if (-not (Test-Path -LiteralPath $Python -PathType Leaf)) { throw "Python not found: $Python. Supply -Python with a prepared Python interpreter." } $env:ACESTEP_ROOT = $AceStepRoot $env:PYTHONPATH = Join-Path $PSScriptRoot "src" if (-not $env:VOICE_STUDIO_SOURCE) { $env:VOICE_STUDIO_SOURCE = Join-Path (Split-Path $PSScriptRoot -Parent) "Voice Characters" } Write-Host "" Write-Host "VOICE STUDIO" -ForegroundColor Magenta Write-Host "Open http://127.0.0.1:$Port in your browser." Write-Host "Training starts only when you explicitly request it in the studio." Write-Host "Press Ctrl+C to stop the studio." Write-Host "" & $Python -m voice_studio.server --port $Port exit $LASTEXITCODE