-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathstart.bat
More file actions
69 lines (56 loc) · 1.46 KB
/
Copy pathstart.bat
File metadata and controls
69 lines (56 loc) · 1.46 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
@echo off
cd /d "%~dp0"
set PYTHONUNBUFFERED=1
set PYTHONIOENCODING=utf-8
echo.
echo ========================================
echo VoiceFlow - Local Speech to Text
echo ========================================
echo.
echo Free - Open Source - Offline
echo.
echo [F2 / MouseSideButtons] Start / Stop dictation
echo [Esc] Cancel
echo.
echo ========================================
echo.
rem --- check venv ---
set "BOOTSTRAP_PY="
if exist "venv\Scripts\python.exe" (
venv\Scripts\python.exe -c "import sys" >nul 2>nul
if not errorlevel 1 set "BOOTSTRAP_PY=venv\Scripts\python.exe"
)
if not defined BOOTSTRAP_PY (
py -3.12 -c "import sys" >nul 2>nul
if not errorlevel 1 set "BOOTSTRAP_PY=py -3.12"
)
if not defined BOOTSTRAP_PY (
py -3 -c "import sys" >nul 2>nul
if not errorlevel 1 set "BOOTSTRAP_PY=py -3"
)
if not defined BOOTSTRAP_PY (
python -c "import sys" >nul 2>nul
if not errorlevel 1 set "BOOTSTRAP_PY=python"
)
if not defined BOOTSTRAP_PY (
echo [Error] No usable Python found. Install Python 3.10+ and try again.
pause
exit /b 1
)
%BOOTSTRAP_PY% scripts\bootstrap.py --ensure-shortcut
if errorlevel 1 (
echo.
echo [Error] VoiceFlow setup check failed.
pause
exit /b 1
)
echo [Launch] Starting VoiceFlow...
echo.
venv\Scripts\python.exe -u src\main.py
set EXITCODE=%ERRORLEVEL%
if %EXITCODE% neq 0 (
echo.
echo [Error] VoiceFlow exited with code %EXITCODE%
pause
)
exit /b %EXITCODE%