Skip to content

Repository files navigation

COMPAS Soundscape

App cover

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.

Prerequisites

  • Python 3.11 (recommended using Conda)
  • CUDA 12.1 (for GPU-accelerated audio generation with PyTorch)
  • Node.js 18+ and npm (or pnpm)

Installation

1. Clone the Repository

git clone https://github.com/gramaziokohler/compas_soundscape.git
cd compas_soundscape

2. Backend Setup

# 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    

3. Frontend Setup

install nodeJS from https://nodejs.org

cd frontend
npm install

Running the Application

Start both servers in separate terminals:

Terminal 1 - Backend:

conda activate compas-soundscape
cd backend
uvicorn main:app --reload --host 0.0.0.0 --port 8000

Backend API runs at: http://localhost:8000

Terminal 2 - Frontend:

cd frontend
npm run dev

Frontend runs at: http://localhost:3000

Optional API Keys (LLM providers)

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

Project Structure

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

Issue Tracker

If you find a bug or have a problem running the code, please file an issue on the Issue Tracker.

About

A Compas package for generating soundscapes

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages