惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Martin Fowler
Martin Fowler
V
Visual Studio Blog
有赞技术团队
有赞技术团队
T
Tailwind CSS Blog
B
Blog
I
InfoQ
博客园 - 三生石上(FineUI控件)
阮一峰的网络日志
阮一峰的网络日志
F
Fortinet All Blogs
H
Help Net Security
博客园 - Franky
宝玉的分享
宝玉的分享
博客园 - 司徒正美
C
Check Point Blog
G
Google Developers Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Jina AI
Jina AI
T
The Blog of Author Tim Ferriss
MongoDB | Blog
MongoDB | Blog
云风的 BLOG
云风的 BLOG
A
About on SuperTechFans
罗磊的独立博客
大猫的无限游戏
大猫的无限游戏
IT之家
IT之家

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Migrating from Spotify Audio Features: a Field-by-Field T...
Freqblog · 2026-05-12 · via DEV Community
Cover image for Migrating from Spotify Audio Features: a Field-by-Field Threshold Guide

Freqblog

TL;DR: Spotify killed /audio-features on 2024-11-27. FreqBlog Music API offers a drop-in at api.freqblog.com/v1/audio-features/{id} — same path, same response shape. The numbers are ours (signal analysis via librosa + Essentia, not Spotifys ML classifiers), so a few field distributions shift. This is the field-by-field guide to re-tuning, with real distribution data from our ~57,000-track catalog.

This is a syndicated mirror — the canonical version with full formatting is at https://freqblog.com/blog/spotify-audio-features-migration-thresholds/ (where the table renders properly).

The migration shape

You swapped the host from api.spotify.com to api.freqblog.com. Your existing GET /v1/audio-features/{id} handler still parses the response unchanged, the unit tests pass. Then your downstream if features.danceability > 0.7 recommender starts surfacing weird tracks. Your acousticness > 0.5 rule fires on basically everything. Your liveness > 0.8 filter rejects the whole catalog.

The migration is byte-compatible at the shape level. Its directional at the value level. Spotify built their audio features by training ML classifiers on a labelled corpus; we compute ours from signal analysis. Same names, different beasts.

Threshold cheat sheet (catalog medians over ~8k tracks)

  • bpm / tempo — median 118.7 — drop-in. Plus bpm_alt corrects Spotifys known half-time bug.
  • key (0–11 / -1) — drop-in. Returned as key_int.
  • mode (0/1) — drop-in.
  • energy — median 0.73 — shifted up slightly; bump thresholds ~0.05–0.1.
  • valence — median 0.48 — closest to Spotifys distribution. Minimal re-tune.
  • danceability — median 0.74 — shifted up. Old 0.65 ≈ ours 0.80.
  • acousticness — median 0.98do not use as is-acoustic. Discriminates near 0.99.
  • instrumentalness — median 0.23 — signal-shape proxy, not a vocal classifier.
  • liveness — median 1.00 (saturated) — currently not diagnostic.
  • speechiness — median 0.45 — shifted up ~5–10×. Old 0.66 ≈ ours >0.85.
  • loudness — median -14 dB — 3–6 dB lower than Spotify (30s window vs full-track BS.1770); use relatively, not absolutely.
  • time_signature — always 4 in practice. Treat as informational, not as a filter.

Why acousticness is 0.98 for everything

Our formula is 1 - clip(spectral_flatness / 0.15, 0, 1). Low spectral flatness means the signal has strong tonal/harmonic peaks — which most music has, acoustic or electric. ~99% of our catalog scores >0.9. If your Spotify code said acousticness > 0.7 = acoustic track and triggered on ~20% of your library, the same threshold under FreqBlog will trigger on ~99% of it. The field is not a useless signal — it discriminates between tonal music and noise-floor content (white-noise tracks, pure ambient, recordings with heavy distortion) — but its useful threshold is up around 0.99.

Why liveness saturates

Formula: clip(noise_floor_ratio * 6.0, 0, 1) where noise_floor_ratio is the 5th-percentile RMS divided by the 95th-percentile RMS. The intuition is that live recordings have an elevated noise floor. The problem: modern mastered music has heavy dynamic-range compression, which compresses the RMS percentiles together — and the ×6 multiplier saturates at 1.0 almost immediately. Until we ship a better detector, drop the liveness filter.

What we get right

  • BPM + key/mode/key_int — Essentia is mature DSP; comparable to Spotifys ML for the common cases. Plus bpm_alt is a documented improvement over Spotifys known half-time detection bug (Blinding Lights: Spotify said 85; perceived is 171; we ship 85 in bpm and 171 in bpm_alt).
  • Camelot + Open Key — first-class fields, ready for harmonic-mixing tooling.
  • Identifier flexibility/v1/audio-features/{id} accepts Spotify track IDs, ISRCs (with or without hyphens), spotify:track:… URIs, or open.spotify.com/track/… URLs. Pass whichever your data layer gives you.
  • Long-tail backfill — if a track isnt in the catalog, our backfill ingests it in 30s–2min and emails you when its ready. Spotifys API never had this.

The full doc (with worked examples + the formula per field) is here:

freqblog.com/blog/spotify-audio-features-migration-thresholds/

Free tier is 1,000 requests/month, no card. Comments / use-case feedback welcome — the caveated fields (acousticness/liveness etc.) are where concrete customer demand drives the next round of improvements.