DEV Community

diwushennian4955
diwushennian4955

Posted on

EDM-98 + EDMFormer on PyPI: Run AI Inference Without the Setup Pain (NexaAPI Tutorial)

A new ML package just dropped on PyPI — edm98 — bringing the EDM-98 dataset and EDMFormer inference tooling to Python developers. Here's what it is, why it matters, and how to build with it today — without the setup headache.

What Is EDM-98?

EDM-98 is a curated dataset of 98 Electronic Dance Music tracks, labeled with structural segments using Rekordbox cue-point annotations. Each track is tagged with sections like:

  • intro — the opening section
  • buildup — rising energy before the drop
  • drop — the peak energy section
  • breakdown — the quiet middle section
  • outro — the closing section
  • silence — gaps between sections

The edm98 Python package bundles this dataset with an EDMFormer-based inference pipeline — a transformer model that can predict song structure from audio embeddings.

from edm98.loaders import load_dataset_records, load_all_splits

# Load the canonical dataset
records = load_dataset_records()
splits = load_all_splits()

# Example record
print(records[0])
# {
#   "id": "1060564312",
#   "labels": [(0.054, "intro"), (35.942, "buildup"), (58.38, "drop"), ...],
#   "file_path": "01 - Oak - Airwalk.mp3"
# }
Enter fullscreen mode Exit fullscreen mode

Who Is This For?

EDM-98 targets:

  • ML researchers studying music structure analysis
  • Audio AI developers building DJ tools, music apps, or playlist generators
  • Generative AI developers who want to create music visuals or content tied to song structure

The Problem: Local Inference Is Painful

Running EDMFormer locally requires:

  1. Downloading audio files via Deezer IDs (not included in the package)
  2. Generating MuQ and MusicFM audio embeddings
  3. Setting up the four embedding directories EDMFormer expects
  4. Managing GPU dependencies, CUDA versions, and model weights
  5. Hours of setup before you can run a single inference

For developers who just want to build something, this is a massive barrier.

The Solution: Skip the Setup with NexaAPI

What if you could skip all that and call a production-ready AI inference API in 3 lines of code?

NexaAPI provides 56+ AI models — including Stable Diffusion XL, FLUX Schnell, FLUX Dev, and more — via a simple REST API. No GPU setup. No model downloads. No dependency hell.

Perfect for building EDM-themed AI applications, music visualizers, or generative art tools.

Python Example

# Install NexaAPI — no GPU, no dataset downloads needed
# pip install nexaapi

from nexaapi import NexaAPI

client = NexaAPI(api_key='YOUR_API_KEY')

# Generate AI content via inference API — no local model setup
response = client.image.generate(
    model='stable-diffusion-xl',  # or any of 56+ models
    prompt='abstract electronic music visualization, EDM style, neon lights, waveform art',
    width=1024,
    height=1024
)

print(response.image_url)
# That's it — no GPU, no EDMFormer setup, no dataset management
Enter fullscreen mode Exit fullscreen mode

JavaScript Example

// Install: npm install nexaapi

import NexaAPI from 'nexaapi';

const client = new NexaAPI({ apiKey: 'YOUR_API_KEY' });

async function generateEDMVisual() {
  const response = await client.image.generate({
    model: 'stable-diffusion-xl',
    prompt: 'abstract electronic music visualization, EDM style, neon lights, waveform art',
    width: 1024,
    height: 1024
  });

  console.log(response.imageUrl);
  // Production-ready inference — no local setup required
}

generateEDMVisual();
Enter fullscreen mode Exit fullscreen mode

Local EDMFormer vs NexaAPI: A Comparison

Local EDMFormer NexaAPI
Setup time Hours Minutes
GPU required Yes No
Model downloads Yes (large) No
Audio files needed Yes (via Deezer) No
Embedding generation Required Not needed
Cost Hardware costs $0.003/image
Production-ready Complex Yes
56+ models No Yes

Pricing

NexaAPI starts at $0.003 per image — no credit card required to start. Compare that to:

  • DALL-E 3: ~$0.04/image (13x more expensive)
  • Midjourney: Subscription required
  • Local GPU: Hardware + electricity costs

Get Started

  1. Get your API key: https://rapidapi.com/user/nexaquency
  2. Install the SDK: pip install nexaapi (PyPI)
  3. Node.js: npm install nexaapi (npm)
  4. Documentation: https://nexa-api.com

Conclusion

EDM-98 is a fantastic dataset for music structure analysis research. But if you're a developer who wants to build EDM-themed AI applications today — without spending hours on infrastructure — NexaAPI is your shortcut.

Same models. No setup. Fraction of the cost.


Links:

Top comments (0)