$ErrorActionPreference = 'Stop' $root = Split-Path -Parent $PSScriptRoot Set-Location $root Write-Host 'Instalando dependencias locales del proyecto...' -ForegroundColor Cyan if (-not (Get-Command npm -ErrorAction SilentlyContinue)) { throw 'Instala Node.js LTS y vuelve a abrir PowerShell.' } & npm.cmd install if ($LASTEXITCODE -ne 0) { throw 'npm install fallo' } if (-not (Test-Path '.venv\Scripts\python.exe')) { if (Get-Command py -ErrorAction SilentlyContinue) { & py -3 -m venv .venv } elseif(Get-Command python -ErrorAction SilentlyContinue) { & python -m venv .venv } else { throw 'Instala Python 3 de 64 bits y asegúrate de agregarlo al PATH.' } if ($LASTEXITCODE -ne 0) { throw 'No se pudo crear el entorno virtual de Python.' } } & '.\.venv\Scripts\python.exe' -m pip install --upgrade pip if ($LASTEXITCODE -ne 0) { throw 'No se pudo actualizar pip' } & '.\.venv\Scripts\python.exe' -m pip install piper-tts if ($LASTEXITCODE -ne 0) { throw 'No se pudo instalar Piper. Comprueba version de Python e internet.' } Write-Host 'Instalacion del codigo terminada.' -ForegroundColor Green Write-Host 'Pasos restantes: ejecutar descargar_voz.ps1, ollama pull qwen2.5:3b, crear el avatar e instalar OBS/TikFinity/VNyan.'