Skip to content

Repository files navigation

Sonics Inference Server

Simple FastAPI server allowing running sonics (AI music detector) on spotify tracks.

Running

uv run fastapi dev --host 0.0.0.0 .\server.py

Endpoints

  • GET /health — quick health check
  • GET /infer?url= — run inference on an HTTP URL or Spotify URL
  • GET /infer?track_id= — run inference by Spotify track id

Swagger UI will be available at /docs when the server is running.

Notes

  • The server lazily loads the sonics model on first inference request. Set SONICS_MODEL env var to change the model id.
  • The Spotify API credentials (SPOTIFY_CLIENT_ID / SPOTIFY_CLIENT_SECRET) should be set in environment or .env if you want the Spotipy path to work.

About

Detect AI Spotify songs

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages