Skip to content

Python Analysis Service

sashatemereva13 edited this page Jan 4, 2026 · 1 revision

Python Audio Analysis Service

The Python service is responsible for extracting audio features from uploaded tracks.

Technologies

  • Python 3.12
  • Flask
  • librosa
  • numpy

Endpoint

POST /run-analysis?filePath=/absolute/path/to/audio.mp3

The service assumes a shared filesystem with the Node backend.

Extracted features

  • Tempo and beats
  • FFT spectrum
  • Energy bands (low / mid / high)
  • RMS energy
  • Spectral centroid
  • Spectral rolloff
  • Zero-crossing rate

How to run

python3.12 -m pip install -r requirements.txt
python3.12 server.py



---

# 🗄️ 5. Database Schema

**Purpose:** document SQLite tables

### Content

```md
# Database Schema

The backend uses SQLite for simplicity and portability.

## Tables

### tracks
- id (INTEGER, PK)
- original_name (TEXT)
- filename (TEXT)
- mime_type (TEXT)
- size_bytes (INTEGER)
- path (TEXT)
- created_at (DATETIME)

### analyses
- id (INTEGER, PK)
- track_id (INTEGER, FK)
- status (TEXT)
- result_json (TEXT)
- error_message (TEXT)
- created_at (DATETIME)

Clone this wiki locally