-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup_and_run.bat
More file actions
92 lines (80 loc) Β· 1.99 KB
/
setup_and_run.bat
File metadata and controls
92 lines (80 loc) Β· 1.99 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
@echo off
echo ========================================
echo Audio Recorder App - High Quality Setup
echo ========================================
echo.
REM Check if Python is installed
python --version >nul 2>&1
if errorlevel 1 (
echo β Python is not installed or not in PATH
echo Please install Python 3.8+ from https://python.org
pause
exit /b 1
)
echo β
Python found
python --version
REM Check if virtual environment exists
if not exist "venv" (
echo.
echo π§ Creating virtual environment...
python -m venv venv
if errorlevel 1 (
echo β Failed to create virtual environment
pause
exit /b 1
)
echo β
Virtual environment created
) else (
echo β
Virtual environment already exists
)
REM Activate virtual environment
echo.
echo π Activating virtual environment...
call venv\Scripts\activate.bat
if errorlevel 1 (
echo β Failed to activate virtual environment
pause
exit /b 1
)
REM Upgrade pip
echo.
echo π¦ Upgrading pip...
python -m pip install --upgrade pip
REM Install dependencies
echo.
echo π¦ Installing dependencies...
pip install -r requirements.txt
if errorlevel 1 (
echo β Failed to install dependencies
echo.
echo π§ Trying alternative installation...
pip install Flask pydub psutil
if errorlevel 1 (
echo β Failed to install dependencies
pause
exit /b 1
)
)
echo β
Dependencies installed
REM Check if recordings directory exists
if not exist "recordings" (
echo.
echo π Creating recordings directory...
mkdir recordings
echo β
Recordings directory created
) else (
echo β
Recordings directory exists
)
echo.
echo π€ Audio Recorder App Setup Complete!
echo.
echo π Quality Settings Available:
echo β’ High Quality: 48kHz, 24-bit, Stereo
echo β’ Medium Quality: 44.1kHz, 16-bit, Stereo
echo β’ Low Quality: 22.05kHz, 16-bit, Mono
echo.
echo π Starting the app...
echo.
REM Run the Flask app
python app.py
pause