forked from KoljaB/RealtimeVoiceChat
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup_complete.bat
More file actions
144 lines (126 loc) Β· 3.55 KB
/
setup_complete.bat
File metadata and controls
144 lines (126 loc) Β· 3.55 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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
@echo off
REM setup_complete.bat - Complete setup for RealtimeVoiceChat on Windows
echo.
echo π€π RealtimeVoiceChat Complete Setup for Windows
echo ===============================================
echo.
REM Check if Python is available
python --version >nul 2>&1
if errorlevel 1 (
echo β Python not found. Please install Python 3.8+ first.
echo π‘ Download from: https://www.python.org/downloads/
pause
exit /b 1
)
echo β
Python found
python --version
REM Check if pip is available
pip --version >nul 2>&1
if errorlevel 1 (
echo β pip not found. Please ensure pip is installed with Python.
pause
exit /b 1
)
echo β
pip found
REM Install Python dependencies
echo.
echo π Installing Python dependencies...
pip install --upgrade pip
pip install -r requirements.txt
if errorlevel 1 (
echo β Failed to install Python dependencies
pause
exit /b 1
)
echo β
Python dependencies installed
REM Check if Ollama is installed
echo.
echo π¦ Checking Ollama installation...
ollama --version >nul 2>&1
if errorlevel 1 (
echo β Ollama not found. Please install Ollama first.
echo π‘ Download from: https://ollama.ai/download
echo π‘ After installation, run: ollama pull mistral:7b
pause
exit /b 1
)
echo β
Ollama found
ollama --version
REM Check if Ollama service is running
echo.
echo π Checking Ollama service...
curl -s http://localhost:11434/api/tags >nul 2>&1
if errorlevel 1 (
echo β οΈ Ollama service not responding
echo π‘ Please start Ollama service and run: ollama pull mistral:7b
echo π‘ Then restart this setup script
pause
exit /b 1
)
echo β
Ollama service is running
REM Check if Mistral model is available
echo.
echo π€ Checking Mistral model...
ollama list | findstr "mistral" >nul 2>&1
if errorlevel 1 (
echo β¬ Downloading Mistral model...
ollama pull mistral:7b
if errorlevel 1 (
echo β Failed to download Mistral model
pause
exit /b 1
)
)
echo β
Mistral model available
REM Test Python imports
echo.
echo π§ͺ Testing Python imports...
python -c "import whisper, torch, numpy, scipy, transformers, requests, fastapi, uvicorn; print('β
All imports successful')"
if errorlevel 1 (
echo β Some Python packages are missing
echo π‘ Try: pip install -r requirements.txt --force-reinstall
pause
exit /b 1
)
REM Create startup batch file
echo.
echo π Creating startup script...
(
echo @echo off
echo echo π€π Starting RealtimeVoiceChat Application
echo echo =========================================
echo echo.
echo.
echo REM Check Ollama service
echo curl -s http://localhost:11434/api/tags ^>nul 2^>^&1
echo if errorlevel 1 ^(
echo echo β Ollama service not running
echo echo π‘ Please start Ollama service first
echo pause
echo exit /b 1
echo ^)
echo echo β
Ollama service is running
echo.
echo REM Start the application
echo echo π Starting RealtimeVoiceChat server...
echo cd code
echo python server.py
) > start_app.bat
echo β
Created start_app.bat
echo.
echo π Setup completed successfully!
echo.
echo π Summary:
echo β’ Python dependencies: β
Installed
echo β’ Ollama service: β
Running
echo β’ Mistral model: β
Available
echo β’ Startup script: β
Created
echo.
echo π To start the application:
echo 1. Double-click start_app.bat
echo 2. Or run: start_app.bat
echo.
echo π‘ Manual TTS server (if needed):
echo python -m llama_cpp.server --model /workspace/models/Orpheus-3b-FT-Q8_0.gguf --host 0.0.0.0 --port 1234 --n_gpu_layers -1
echo.
pause