A web application for populating architectural models with contextualized sounds, enabling acoustic simulation and spatial audio rendering. Load 3D models via Speckle, assign acoustic materials, simulate room acoustics, and generate immersive soundscapes with AI-powered audio.
- Python 3.11 (recommended using Conda)
- CUDA 12.1 (for GPU-accelerated audio generation with PyTorch)
- Node.js 18+ and npm (or pnpm)
git clone https://github.com/gramaziokohler/compas_soundscape.git
cd compas_soundscape# Create and activate the Mamba/Conda environment
conda create -n compas-soundscape python=3.11 -c conda-forge
conda activate compas-soundscape
# Install dependencies
pip install uv
uv pip install -r requirements.txt --index-strategy unsafe-best-match
# (optional) Install your favorite LLM API. (You will need an API token key to use it, explained later)
pip install google-genai
# or / and
pip install anthropic openai
# or / and
pip install openai
install nodeJS from https://nodejs.org
cd frontend
npm installStart both servers in separate terminals:
Terminal 1 - Backend:
conda activate compas-soundscape
cd backend
uvicorn main:app --reload --host 0.0.0.0 --port 8000Backend API runs at: http://localhost:8000
Terminal 2 - Frontend:
cd frontend
npm run devFrontend runs at: http://localhost:3000
At least one LLM package must be installed (see Backend Setup) to use text/prompt generation. Keys can be set two ways:
Fill in the key(s) in ./compas_soundscape/.env :
GOOGLE_API_KEY="your_key_here"
OPENAI_API_KEY="your_key_here"
ANTHROPIC_API_KEY="your_key_here"Links (Choose your prefered provider)
| Key | Provider | Get it from |
|---|---|---|
GOOGLE_API_KEY |
Google Gemini | Google AI Studio |
OPENAI_API_KEY |
ChatGPT (GPT-4o) | OpenAI Platform |
ANTHROPIC_API_KEY |
Claude 3.5 Sonnet | Anthropic Console |
See ARCHITECTURE.md for the full project structure and architecture diagrams.
compas_soundscape/
├── backend/ # FastAPI server (routers, services, utils)
├── frontend/ # Next.js app (components, hooks, lib, contexts)
├── ARCHITECTURE.md # Detailed architecture & file tree
└── requirements.txt # dependencies
If you find a bug or have a problem running the code, please file an issue on the Issue Tracker.
