-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart_uvb.bat
More file actions
130 lines (112 loc) · 4.67 KB
/
Copy pathstart_uvb.bat
File metadata and controls
130 lines (112 loc) · 4.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
@echo off
title Ultimate Voice Bridge Launcher - FIXED
color 0A
echo.
echo ========================================
echo Ultimate Voice Bridge Launcher
echo ========================================
echo.
echo Checking prerequisites...
:: Check if LM Studio is running
echo Checking LM Studio connection...
curl -s http://192.168.68.111:1234/v1/models >nul 2>&1
if %errorlevel% neq 0 (
echo ERROR: LM Studio not detected at http://192.168.68.111:1234
echo Please start LM Studio and load a model first
echo.
pause
exit /b 1
) else (
echo OK: LM Studio is running
)
:: Check Python
python --version >nul 2>&1
if %errorlevel% neq 0 (
echo ERROR: Python not found
echo Please install Python 3.8+ first
pause
exit /b 1
) else (
echo OK: Python is available
)
:: Check Node.js
node --version >nul 2>&1
if %errorlevel% neq 0 (
echo ERROR: Node.js not found
echo Please install Node.js first
pause
exit /b 1
) else (
echo OK: Node.js is available
)
echo.
echo Starting Ultimate Voice Bridge...
echo.
:: Kill any existing processes on our ports
echo Checking for existing processes on required ports...
for /f "tokens=5" %%a in ('netstat -ano ^| findstr :8000') do taskkill /f /pid %%a 2>nul
for /f "tokens=5" %%a in ('netstat -ano ^| findstr :3000') do taskkill /f /pid %%a 2>nul
for /f "tokens=5" %%a in ('netstat -ano ^| findstr :8765') do taskkill /f /pid %%a 2>nul
echo OK: Ports cleared
:: Get the full path to Ultimate_Voice_Bridge
set "UVB_DIR=%~dp0Ultimate_Voice_Bridge"
echo UVB Directory: %UVB_DIR%
:: Create .env file if it doesn't exist
if not exist "%UVB_DIR%\.env" (
echo Creating environment configuration...
copy "%UVB_DIR%\.env.example" "%UVB_DIR%\.env" 2>nul
if %errorlevel% neq 0 (
echo Warning: Could not create .env file - continuing anyway
) else (
echo OK: Environment file created
)
) else (
echo OK: Environment file already exists
)
:: Start backend in new window with explicit path
echo Starting Backend...
set "BACKEND_DIR=%UVB_DIR%\backend"
echo Backend Directory: %BACKEND_DIR%
start "UVB Backend" cmd /k "echo Starting Backend... && cd /d "%BACKEND_DIR%" && echo Current directory: %cd% && echo Activating virtual environment... && call "%BACKEND_DIR%\..\myenv\Scripts\activate.bat" && echo Virtual environment activated && echo Fixing Whisper installation... && pip uninstall -y whisper && pip install openai-whisper && echo Installing TTS dependencies... && pip install edge-tts pydub librosa soundfile && echo Installing base dependencies... && pip install -r requirements.txt && echo Installing RTX 5090 GPU dependencies... && pip install -r requirements_gpu.txt && echo Installing additional backend dependencies... && pip install pydantic-settings fastapi[all] uvicorn[standard] python-multipart aiofiles && echo All dependencies installed && echo Starting UVB Backend with RTX 5090 GPU support... && python main.py"
:: Wait a moment for backend to start
echo Waiting for backend to initialize...
timeout /t 8 /nobreak >nul
:: Start Memory Playground WebSocket server
echo Starting Memory Playground...
set "PLAYGROUND_DIR=%UVB_DIR%\playground"
echo Playground Directory: %PLAYGROUND_DIR%
start "Memory Playground" cmd /k "echo Starting Memory Playground WebSocket... && cd /d "%PLAYGROUND_DIR%" && echo Current directory: %cd% && echo Installing playground dependencies... && pip install websockets && echo Dependencies installed && python working_playground.py"
:: Wait a moment for playground to start
timeout /t 5 /nobreak >nul
:: Start frontend in new window
echo Starting Frontend...
set "FRONTEND_DIR=%UVB_DIR%\frontend"
echo Frontend Directory: %FRONTEND_DIR%
start "UVB Frontend" cmd /k "echo Starting Frontend... && cd /d "%FRONTEND_DIR%" && echo Current directory: %cd% && echo Installing Node.js dependencies... && npm install && echo Dependencies installed && echo Starting development server... && npm run dev"
echo.
echo Ultimate Voice Bridge is starting!
echo.
echo Frontend: http://localhost:3000
echo Backend: http://localhost:8000
echo API Docs: http://localhost:8000/docs
echo LM Studio: http://192.168.68.111:1234
echo.
echo Check the backend and frontend windows for status messages
echo.
:: Wait for services to be ready, then open browser
echo Waiting for services to be ready...
timeout /t 20 /nobreak >nul
echo Opening browser...
start http://localhost:3000
echo.
echo STATUS CHECK:
echo - Backend should show: Uvicorn running on http://0.0.0.0:8000
echo - Frontend should show: Ready in Xms
echo - LM Studio should be accessible at http://192.168.68.111:1234/v1/models
echo.
echo.
echo Ultimate Voice Bridge is ready!
echo Browser opened automatically.
echo Close this window when you're done.
echo.
pause