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

推荐订阅源

TaoSecurity Blog
TaoSecurity Blog
V2EX - 技术
V2EX - 技术
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
Secure Thoughts
Forbes - Security
Forbes - Security
Engineering at Meta
Engineering at Meta
Microsoft Azure Blog
Microsoft Azure Blog
Apple Machine Learning Research
Apple Machine Learning Research
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Webroot Blog
Webroot Blog
W
WeLiveSecurity
Blog — PlanetScale
Blog — PlanetScale
G
Google Developers Blog
Last Week in AI
Last Week in AI
月光博客
月光博客
H
Help Net Security
PCI Perspectives
PCI Perspectives
Security Archives - TechRepublic
Security Archives - TechRepublic
Hugging Face - Blog
Hugging Face - Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
有赞技术团队
有赞技术团队
T
Troy Hunt's Blog
Google DeepMind News
Google DeepMind News
Hacker News: Ask HN
Hacker News: Ask HN
Microsoft Security Blog
Microsoft Security Blog
N
News and Events Feed by Topic
Project Zero
Project Zero
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
L
LangChain Blog
P
Privacy & Cybersecurity Law Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
V
V2EX
I
Intezer
H
Hacker News: Front Page
Recent Announcements
Recent Announcements
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
博客园 - Franky
T
Threat Research - Cisco Blogs
Spread Privacy
Spread Privacy
博客园 - 【当耐特】
美团技术团队
Schneier on Security
Schneier on Security
D
Docker
Scott Helme
Scott Helme
L
LINUX DO - 最新话题
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
aimingoo的专栏
aimingoo的专栏
L
Lohrmann on Cybersecurity

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 Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
I built a free music tool
tagmybeat · 2026-05-25 · via DEV Community

Building TagMyBeat: An AI Producer Tag Generator and a Browser-Based BPM & Key Finder That Never Uploads Your Audio

If you produce music, you know the drill: you finish a beat, export it, and then need a vocal tag to brand it. You also need to know the BPM and key of every sample in your library so everything fits together. These are two different problems, but they share the same DNA: audio processing, fast turnaround, and privacy for unreleased material.

I built TagMyBeat to solve both, and in this post I want to walk through how they work under the hood.


What Is TagMyBeat?

TagMyBeat is two things:

  1. A Producer Tag Generator — type text, pick a voice and an effect preset, and get a professional vocal tag (think "DJ Khaled!" but yours).
  2. A Free BPM and Key Finder — drop in an MP3, WAV, or FLAC, and get tempo, musical key, and Camelot code back, entirely in your browser. No upload. No server.

The tag generator is the main product (3 free generations per day, no login). The BPM/Key Finder is a free engineering-as-marketing tool that brings producers into the ecosystem. Both are open about how they work, so let's get into the tech.


Tech Stack at a Glance

Layer Technology
Frontend Next.js 16 (App Router), React 19, TypeScript, Tailwind CSS 4, Zustand 5
Backend FastAPI (Python), FFmpeg
Auth Browser fingerprinting (FingerprintJS) — no accounts, no passwords
Audio Analysis (Client) essentia.js (WASM-compiled C++), Web Workers, Web Audio API
Deployment Cloudflare (frontend), VPS (backend)

Part 1: How the Producer Tag Generator Works

The generation pipeline is a classic producer-consumer pattern:

User types text → quota check → task queue (asyncio.Queue) → worker pool (8 workers)
→ TTS generates speech → FFmpeg applies audio effects → file saved → frontend polls status

Enter fullscreen mode Exit fullscreen mode

Audio Effects with FFmpeg

After the voice is generated, FFmpeg steps in. We have 5 built-in effect presets:

  • Clean — light compression and normalization
  • Hype — pitch shift up, short reverb, stereo widening
  • Chill — pitch shift down, large reverb, warm EQ
  • Cinematic — deep reverb, delay, dramatic EQ
  • Retro — bitcrushing, tape saturation, vinyl noise

Each preset is a chain of FFmpeg audio filters (atempo, aecho, equalizer, etc.) composed programmatically. Advanced mode lets you dial in 6 custom parameters: stutter speed, reverb size, reverb wet, delay time, delay feedback, and pitch shift.


Part 2: Deep Dive — How the BPM and Key Finder Works (Entirely Client-Side)

This is the part I'm most excited about. The BPM/Key Finder runs 100% in the browser using WebAssembly and Web Workers. Your audio files never leave your device.

The Core Engine: essentia.js

Under the hood, we use essentia.js, a WebAssembly port of Essentia, an open-source C++ library for audio analysis developed by the Music Technology Group at Universitat Pompeu Fabra. Essentia has been battle-tested in academic research and production systems (Spotify uses it internally).

Loading essentia.js happens lazily — the ~2MB WASM binary is fetched from our CDN only when you first open the BPM/Key Finder. We use a Web Worker to keep the main thread responsive during initialization and analysis.

Step 1: Smart Windowing

Not all parts of a track are equally useful for analysis. Intros often have no drums, outros fade out, and breakdowns can confuse tempo detection. So we don't feed the entire track to the analyzer.

Instead, we use a smart windowing strategy that varies by track length:

Track Length BPM Windows Key Windows
< 45 seconds Single window covering the full track Same full-track window
45–90 seconds One 20s window starting at 15% in One 40s window starting at 15% in
> 90 seconds Three 20s windows at 25%, 50%, and 70% Two 40s windows at 35% and 60%

All windows avoid the first and last 10% of the track (the edge guard) to dodge intros and outros. This might seem like a small detail, but it dramatically improves accuracy on real-world tracks.

Step 2: BPM Detection with PercivalBpmEstimator

For tempo detection, we use essentia's PercivalBpmEstimator, which is based on the Percival algorithm. Here's how it works at a high level:

  1. Onset Detection — The algorithm detects note and drum onsets across multiple frequency bands using spectral flux.
  2. Inter-Onset Interval (IOI) Histogram — It computes a histogram of time differences between consecutive onsets. Regular rhythms produce peaks at the tempo period and its multiples.
  3. Perceptual Weighting — The algorithm applies a perceptually-motivated weighting function that favors tempos in the 80–200 BPM range (where most music lives) and penalizes half-time and double-time candidates.
  4. BPM Candidate Scoring — Multiple tempo hypotheses are scored against the IOI histogram, with penalties for ambiguous cases.

But here is the key insight: for longer tracks, we run this algorithm on three different 20-second windows at different positions and then aggregate the results. This is critical because a single window might hit a breakdown or a double-time section.

Step 3: Key Detection with KeyExtractor

Key detection uses essentia's KeyExtractor, which works as follows:

  1. Chroma Feature Extraction — The audio is converted into a chromagram: a 12-bin representation of how much energy is present at each pitch class (C, C#, D, ..., B), collapsed across all octaves. This is computed every 4096 samples with a 4096-sample hop size.
  2. Key Profile Correlation — The averaged chroma vector is correlated against 24 key profiles (12 major + 12 minor keys using the Krumhansl-Kessler tonal hierarchy). Each profile represents the expected chroma distribution for a given key.
  3. Strength and Confidence — The algorithm returns not just the best-matching key and scale, but also a strength score (0–1) indicating how strongly the chroma matches the profile. Low strength often means the track modulates or has an ambiguous tonal center.

For tracks longer than 90 seconds, we sample two 40-second windows and use a majority-voting aggregation: if both windows agree on the key, we return it with the averaged strength. If they disagree, we pick the one with higher strength. This handles tracks where the verse and chorus are in different keys.

Step 4: Aggregation and Normalization

Raw BPM estimates need cleanup. Here is our aggregation pipeline:

Raw BPM estimates from each window
→ Normalize into 80-200 BPM range (doubling/halving)
→ Cluster analysis: group estimates within ±2 BPM of each other
→ If largest cluster has ≥ 2 estimates: return median of that cluster
→ Otherwise: return median of all estimates

Enter fullscreen mode Exit fullscreen mode

The cluster approach is important. Imagine a trap beat at 140 BPM. Window 1 might detect 140, Window 2 detects 70 (half-time feel during a sparse section), and Window 3 detects 140. Without clustering, a simple average gives 116.7 — useless. With clustering, the 140 group wins, and we get the correct answer.

The normalization step (multiply by 2 if below 80, divide by 2 if above 200) uses the fact that most music sits in 80–200 BPM. A 65 BPM estimate on a drum and bass track is almost certainly half of 130 (or, more likely, half of ~174).

Step 5: Camelot Notation

For DJs, we convert the detected key to Camelot notation, which is the standard harmonic mixing system used in Pioneer DJ gear, rekordbox, and Mixed In Key:

Key Camelot Key Camelot
Ab minor 1A B major 1B
Eb minor 2A F# major 2B
Bb minor 3A Db major 3B
F minor 4A Ab major 4B
C minor 5A Eb major 5B
G minor 6A Bb major 6B
D minor 7A F major 7B
A minor 8A C major 8B
E minor 9A G major 9B
B minor 10A D major 10B
F# minor 11A A major 11B
Db minor 12A E major 12B

The rule of thumb: adjacent Camelot numbers mix harmonically (8A → 9A, 8A → 7A), and same-number cross-scale transitions work (8A → 8B).

Why No Server Upload?

Three reasons:

  1. Privacy — producers work with unreleased material. They should not have to trust a server with their beats.
  2. Instant UX — no upload progress bar, no network errors, no timeouts. Files are decoded locally in milliseconds.
  3. Zero server cost — audio analysis is CPU-intensive. Offloading it to the client means we can offer this as a free tool indefinitely.

The trade-off is that we cannot analyze YouTube or Spotify links (the browser would need to download the audio first, which raises copyright issues). That feature is on the roadmap, but for now the tool is file-based.


What I Learned Building This

essentia.js is incredible but heavy. The WASM binary is ~2MB, and initialization takes 1-3 seconds on a cold load. The lazy-loading pattern (only fetch when the BPM/Key Finder page opens) was essential to keep the main tag generator fast.

Smart windowing matters more than the algorithm. Switching from full-track analysis to multi-window analysis with edge guards improved BPM accuracy by ~15-20% on real-world test tracks. The algos are mature; the preprocessing is where you win.

Web Workers are underrated for audio. Running essentia on the main thread caused 200-500ms UI freezes per file. Moving to a Worker made batch analysis of 20+ files feel smooth. The message-passing overhead is negligible compared to the analysis time.

Browser fingerprinting is a pragmatic middle ground. No one wants to create an account for a free tool. Fingerprinting gives us abuse prevention and data isolation without signup friction. The trade-off is that clearing browser data resets your quota, but for a free tier that is acceptable.


Try It Yourself

The BPM/Key Finder source is visible in the browser (it is all client-side JS). The backend for the tag generator is in Python/FastAPI. If you are curious about any specific part, drop a comment — I am happy to dive deeper into the FFmpeg effects chains, the Edge TTS integration, or the essentia.js setup.


TagMyBeat is built with Next.js 16, FastAPI, essentia.js, Edge TTS, FFmpeg, and Tailwind CSS. Deployed on Cloudflare + a VPS. No user accounts, no audio uploads for the BPM/Key Finder.