mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2026-08-29 10:09:32 +02:00
Add RVC Realtime VST2/VST3 source project
This commit is contained in:
44
RVCRealtimeVST/scripts/test-worker.ps1
Normal file
44
RVCRealtimeVST/scripts/test-worker.ps1
Normal file
@@ -0,0 +1,44 @@
|
||||
param(
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string]$RvcRoot,
|
||||
[string]$Python = "",
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string]$Model,
|
||||
[string]$Index = ""
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$Root = Split-Path -Parent $PSScriptRoot
|
||||
$Build = Join-Path $Root "build"
|
||||
|
||||
& (Join-Path $PSScriptRoot "prepare-dependencies.ps1")
|
||||
|
||||
if ([string]::IsNullOrWhiteSpace($Python)) {
|
||||
$Python = Join-Path $RvcRoot "runtime\python.exe"
|
||||
}
|
||||
foreach ($RequiredPath in @($RvcRoot, $Python, $Model)) {
|
||||
if (-not (Test-Path -LiteralPath $RequiredPath)) {
|
||||
throw "Required worker test path does not exist: $RequiredPath"
|
||||
}
|
||||
}
|
||||
if (-not [string]::IsNullOrWhiteSpace($Index) -and -not (Test-Path -LiteralPath $Index -PathType Leaf)) {
|
||||
throw "Index path does not exist: $Index"
|
||||
}
|
||||
|
||||
cmake -S $Root -B $Build -G "Visual Studio 17 2022" -A x64 -DRVC_BUILD_SMOKE_TEST=ON
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "CMake configuration failed with exit code $LASTEXITCODE"
|
||||
}
|
||||
cmake --build $Build --config Release --target rvc-worker-smoke --parallel
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "Worker smoke-test build failed with exit code $LASTEXITCODE"
|
||||
}
|
||||
$WorkerArgs = @($RvcRoot, $Python, $Model)
|
||||
if (-not [string]::IsNullOrWhiteSpace($Index)) {
|
||||
$WorkerArgs += $Index
|
||||
}
|
||||
& (Join-Path $Build "Release\rvc-worker-smoke.exe") @WorkerArgs
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "Worker smoke test failed with exit code $LASTEXITCODE"
|
||||
}
|
||||
Reference in New Issue
Block a user