Spaces:
Build error
AudioForge Setup Status
Completed Tasks
1. Fixed Windows Console Encoding Issues
- Updated all Python scripts to handle Windows console encoding properly
- Fixed
quick_setup.py,verify_setup.py, andinit_db.pyto work on Windows
2. Fixed Python Package Configuration
- Updated
pyproject.tomlto support Python 3.13 - Removed incompatible dependencies (torch 2.1.0, audiocraft 1.3.0)
- Created optional
[ml]dependency group for ML models - Added hatchling build configuration to specify package location
3. Backend Dependencies Installed
- Created virtual environment at
backend/.venv - Installed all core dependencies successfully
- Created
.envfile from.env.example - Created storage directories
4. Project Structure Verified
- Backend: FastAPI application with proper structure
- Frontend: Next.js 14 application with TypeScript
- Docker Compose configuration ready
- All documentation files in place
Current Status
Backend: Dependencies installed, ready to run (requires PostgreSQL and Redis) Frontend: Not yet installed Database: Not yet initialized Docker: Installed but Docker Desktop not running
Next Steps
Option 1: Docker Compose (Recommended)
Start Docker Desktop
# Start Docker Desktop application manuallyStart all services with Docker Compose
docker-compose up -dVerify services are running
docker-compose ps docker-compose logs -fAccess the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- API Docs: http://localhost:8000/api/docs
Option 2: Manual Setup (Local Development)
Step 1: Start PostgreSQL and Redis
Option A: Using Docker
# Start only PostgreSQL and Redis
docker run -d --name audioforge-postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=audioforge -p 5432:5432 postgres:16-alpine
docker run -d --name audioforge-redis -p 6379:6379 redis:7-alpine
Option B: Using Local Installation
- Install PostgreSQL 16 and Redis locally
- Ensure they're running on default ports (5432 and 6379)
Step 2: Initialize Database
cd backend
.venv\Scripts\python.exe scripts\init_db.py
Step 3: Start Backend
cd backend
.venv\Scripts\uvicorn.exe app.main:app --reload
Step 4: Install Frontend Dependencies
cd frontend
pnpm install
Step 5: Create Frontend Environment File
cd frontend
echo "NEXT_PUBLIC_API_URL=http://localhost:8000" > .env.local
Step 6: Start Frontend
cd frontend
pnpm dev
Verification
Backend Health Check
curl http://localhost:8000/health
Backend API Documentation
Open http://localhost:8000/api/docs in your browser
Frontend
Open http://localhost:3000 in your browser
Installing ML Models (Optional)
The ML models (torch, audiocraft) are optional and can be installed later:
cd backend
.venv\Scripts\uv.exe pip install -e ".[ml]"
Note: This will download ~2GB of model files on first run.
Troubleshooting
Backend won't start
- Ensure PostgreSQL is running on port 5432
- Ensure Redis is running on port 6379
- Check
.envfile has correct DATABASE_URL and REDIS_URL
Frontend won't start
- Ensure
pnpmis installed:npm install -g pnpm - Delete
node_modulesandpnpm-lock.yaml, then runpnpm installagain
Database connection error
- Verify PostgreSQL is running:
docker psor check local service - Test connection:
psql -h localhost -U postgres -d audioforge
Docker issues
- Ensure Docker Desktop is running
- Check Docker daemon status:
docker ps - Restart Docker Desktop if needed
Files Modified
backend/pyproject.toml- Updated dependencies and build configurationbackend/scripts/quick_setup.py- Fixed Windows encodingbackend/scripts/verify_setup.py- Fixed Windows encodingbackend/scripts/init_db.py- Fixed Windows encoding
Environment Configuration
Backend .env (already created)
# Application
DEBUG=false
ENVIRONMENT=development
# Database
DATABASE_URL=postgresql+asyncpg://postgres:postgres@localhost:5432/audioforge
# Redis
REDIS_URL=redis://localhost:6379/0
# Music Generation
MUSICGEN_MODEL=facebook/musicgen-medium
MUSICGEN_DEVICE=cpu
MUSICGEN_DURATION=30
# Vocal Generation
BARK_MODEL=suno/bark
BARK_DEVICE=cpu
# Storage
AUDIO_STORAGE_PATH=./storage/audio
Frontend .env.local (needs to be created)
NEXT_PUBLIC_API_URL=http://localhost:8000
Recommended Next Action
For quickest setup: Start Docker Desktop, then run docker-compose up -d
This will start all services (PostgreSQL, Redis, Backend, Frontend) in containers and handle all initialization automatically.