How AI hears a song: audio tokens, spectrograms, stems and notes
When an AI “listens” to a song, it works from a translation of the recording, and which translation depends on the assistant and the tool. Gemini’s API takes the audio itself as tokens, 32 for each second, after downsampling it to 16 Kbps and folding the channels into one. Claude’s documented inputs are text and images, so for Claude a tool turns the song into pictures and numbers first: a spectrogram, separated instruments, notes on a grid, lyrics with timings, or measurements like key and tempo.
Each translation keeps some of the music and throws the rest away. That’s one reason, and the one the documentation shows, why two assistants can describe the same song differently.
An AI drafted this page from the sources listed at the end and another AI checked it. It’s a research summary: no person ran a comparison between assistants for it. The picture comes from a real Listen Along run that was already public. Listen Along, which this page uses as its worked example, is ours.
Six things an AI can be given
| What it’s given | What it is | What gets through | What’s lost |
|---|---|---|---|
| Audio tokens | The recording itself, cut into tokens (Gemini: 32 a second) | The whole mix, in one go | The stereo picture (channels are combined) and some detail (downsampled to 16 Kbps) |
| A spectrogram picture | An image: time across, frequency up, loudness as brightness | Which frequencies are loud, and when | The sound itself; and reading one is a skill a model may not have |
| Stems | The recording split into voice, drums, bass and other parts by a separation model | Who is playing when | Accuracy: the split is a model’s guess, and parts bleed into each other |
| Notes | MIDI, or a piano-roll picture with one row per semitone | Melody, bass line, pitch | MIDI: everything about how it sounds (“A MIDI file is not an audio recording”). A note grid keeps loudness and overtones but blurs low notes |
| Lyrics with timings | The words, stamped with when each line starts | What the song says, and where | How it’s sung; and the sheet may not match this performance |
| Measurements | Numbers from audio analysis: key, tempo, loudness, stereo width, sections | Compact facts about the whole track | Anything the numbers don’t name |
Tools for Claude often combine several of these: Listen Along uses stems, pictures, notes and timed lyrics, and Ear uses measurements, lyrics and, optionally, stems, then adds a seventh, another model’s written description.
Audio tokens
Here the model takes the recording itself. Google’s Gemini API audio guide says audio is counted at “32 tokens per second of audio (1 minute = 1,920 tokens)”, that it is “Downsampled to 16 Kbps”, and that “Multi-channel audio combined to single channel”. The same guide lists “Emotion detection in speech and music” among what Gemini can do with audio. OpenAI’s gpt-audio-1.5 also lists audio among its input modalities, though the pages we read give no per-second token rate.
So Gemini gets the whole song in one go, as a single compressed channel. Which side of the mix a guitar sits on doesn’t survive the fold to one channel. The guide doesn’t describe what a token holds, so this page doesn’t guess.
In the apps, Gemini takes an uploaded song file, while the claude.ai upload list has no audio type; Can AI listen to music? has each app side by side.
A spectrogram, as a picture
A spectrogram is “a visual representation of the spectrum of frequencies of a signal as it varies with time”, usually drawn as a heat map: one axis is time, the other frequency, and brightness or colour is how loud each frequency is. It’s a common route with Claude, because Claude takes images. One r/ClaudeAI poster asked Claude for procedural audio and saw it doing this, “exporting audio spectrograms, then viewing them as images to get a sense of the music”. A reply put the right frame on it: “think of as less of an image, and more of just data representing loudness at certain frequencies over time”.
Reading those pictures is a skill, and the research is mixed. A 2024 paper got GPT-4o to “59.00% cross-validated accuracy” classifying spectrograms of everyday sounds (the ESC-10 dataset), given a few labelled examples. A 2025 benchmark showed vision models spectrograms of single spoken words and found they “rarely perform above chance” at picking the right word. Neither tested music, so treat both as a hint about how much depends on the reader.
Stems, split apart
A separation model takes the finished mix and estimates each part on its own. Demucs, the open model Listen Along uses for the instruments, separates “drums, bass and vocals and other stems”, and its experimental six-source version adds guitar and piano. Its own README warns of “a lot of bleeding and artifacts for the piano source.” Listen Along’s page names the same weak spots: “Stacked voices, quiet doubled vocals and one instrument leaking into another’s row”.
Stems are what let an AI see when the bass comes in. They’re also a model’s guess, made before the AI looks at anything.
Notes
Notes drop the most of the sound. A MIDI file records events such as a finger striking a key, and Wikipedia’s MIDI article is blunt: “A MIDI file is not an audio recording.” Spotify’s Basic Pitch turns a recording into MIDI, and its README says it “works best on one instrument at a time.”
Listen Along keeps notes as a picture instead: the band’s energy on a grid with one row per semitone. Its manual is plain about the trade. Overtones light extra rows, so “one low A alone also lights E and C# rows higher up; that is one note, not an A major chord.” And a filter fine enough to tell semitones apart is slow in the low rows (“0.79 s at C2”), so low notes start and stop softly in the picture.
Lyrics with timings
In Listen Along, the words come from a lyrics database, not from listening. LRCLIB, the free and open database Listen Along uses, stores “LRC-formatted lyrics with line timestamps”, written by volunteers. A tool can then line each word up with the vocal; Listen Along uses speech models to time the words and to tell one singer from another, never to write them.
For a live recording, the sheet can belong to the studio version. In the published listen below, Claude wrote that “The lyric sheet is the studio’s” and that from the guitar break on the aligner lost its place.
Measurements
An analysis tool can hand an AI numbers instead of pictures. audio-analyzer-rs, an MCP server for Claude Code and Claude Desktop, reports key, tempo, dynamics, timbre, stereo field and sections, and says a full analysis takes “under 1% context window usage”. Numbers are cheap in context. A key estimate or a tempo sums up the whole track; it doesn’t show what happens from one moment to the next. Ear, another free tool on GitHub, adds a step: it “asks an LLM to write a grounded description” from its analysis, so the reader gets another model’s account of the song as well.
One song, as Listen Along drew it for Claude

About 25 seconds of Nathaniel Rateliff’s “And It’s Still Alright”, from a Pickathon session, as shown on the published playback page (all of one of Claude’s 15-second windows and parts of the ones either side, with the playhead at 1:06). Time runs left to right; brighter is louder. From Listen Along’s how-it-works page.
This is a real listen, published in full on its own page (listened on November 11, 2026, on Fable 5.2). Reading the strip from the top:
- Lead voice. The singer alone, after separation. The bright bands are the voice; the thin cyan line is its pitch.
- Other voices, drums, bass, keys, other. Empty here, apart from faint flecks in Other voices where the lead leaks in. The how page’s caption: “one voice, one guitar, and nothing in the other rows.”
- Guitar. One steady row, since the whole performance is one man and one guitar.
- Notes of the band. The semitone grid, with the voice’s pitch in cyan and the bass line in green. “Nothing names the chord or the key; the AI works that out, or doesn’t.”
- Bass alone. The low notes by themselves. It’s bright though the Bass row is empty because it has its own loudness scale, so faint low sound shows up.
The rows aren’t plain spectrograms. The manual calls the voice and instrument rows cochleagrams (a gammatone filterbank, 50 Hz to 8 kHz), which keep finer timing in the upper channels than a standard spectrogram, and the note grid a constant-Q picture.
The published strip is less than Claude had. Claude’s own copy had three pictures for each 15-second window, with each lyric word written under the moment it’s sung and a picture of where each sound sits between left and right; the public pages leave the words off on purpose. Claude saw one window at a time and wrote a note on each before the next was shown, and no other AI described the song to it.
Its after-note shows what pictures can’t settle. On a rough stretch at 2:28, a low note pressed hard or a higher one breaking up: “The pictures support either. A person would hear which in an instant.” On the chords, it named what it read from the rows but said a low open string “may be making the picture simpler than the playing.” In another published listen, to Gotye’s “Somebody That I Used To Know”, the first thing it listed under what it couldn’t hear was “Timbre as a quality.”
Why two assistants describe the same song differently
It follows from the table. Nobody ran a side-by-side test for this page, but the documented inputs differ:
- They’re given different things. Gemini gets one compressed channel of the whole mix. Claude with Listen Along gets separated parts, in order, with a stereo picture. Claude with an analysis server gets numbers. Claude with MIDI turned into text gets notes and nothing about the sound.
- They may already know the song. A well-known song’s words are in training. Listen Along’s page says so (“It may already know the song”), and one r/Bard user who uploaded a comedy track under a neutral filename reported that “Gemini thinks it’s a serious track”. A recording the AI is unlikely to know, such as a live take or your own, shows what it actually got.
- The translators make mistakes of their own. A separation model bleeds one part into another, an aligner loses its place, a lyric sheet belongs to the studio version. Two tools make different mistakes before either AI looks.
- Reading pictures varies. The two spectrogram studies above came out very differently on different tasks. How well a given model reads a given kind of picture isn’t something a spec sheet tells you.
For which assistant takes what, in its app and its API, see Can AI listen to music?. Getting an AI to know your taste over time is a separate question from how it takes in one song. For recommendations from your listening history, see Music recommendations from an AI that knows your taste.
Trying it with Claude
Listen Along is the worked example above, and you can run it yourself: it’s free, licensed GPL v3, and runs in Claude Code on a Mac with an Apple chip. It needs about 5 GB of disk, about 15 minutes of processing per song on your Mac, roughly 130,000 tokens of context for a four-minute song, and the song’s synced lyrics on LRCLIB, so instrumentals don’t work. The steps, the costs and the other routes for Claude (an audio MCP server, a spectrogram, MIDI as JSON) are in Can Claude listen to music?
Claude forgets the listen when the session ends unless it has a memory. With Counterparts, a memory for Claude Code that we also make, it keeps the songs it has heard and what you thought of them for next time. It’s free, with its source on GitHub: setup for Claude Code.
Questions people ask
How does AI hear music?
It’s given a translation of the recording, and which one depends on the assistant. Google’s Gemini API takes the audio itself as tokens, 32 for each second, after downsampling the file to 16 Kbps and combining its channels into one. Claude’s documented inputs are text and images, so a tool first turns the song into something Claude reads: a spectrogram picture, separated instrument parts, notes, lyrics with timings, or measurements such as key and tempo. Each translation keeps some of the music and drops the rest.
Can Claude hear a song?
It reads rather than hears. Anthropic’s models overview says all current Claude models “support text and image input”, so a program measures the song first and Claude reads the pictures and numbers it makes. Listen Along, a free tool we make for Claude Code, draws each part of a song as pictures, 15 seconds at a time. Its own page calls this “closer to reading a score while the piece is performed than to listening as a person does.”
What is a spectrogram, and can an AI read one?
A spectrogram is a picture of sound: time runs one way, pitch (frequency) the other, and brightness or colour shows how loud each frequency is at each moment. A model that takes images can be shown one. How well it reads it depends on the job: a 2024 study got GPT-4o to 59% accuracy classifying spectrograms of everyday sounds (the ESC-10 dataset) when given a few labelled examples, while a 2025 study found models “rarely perform above chance” naming spoken words from their spectrograms. Neither tested music.
How many tokens is a second of audio?
In the Gemini API, 32 tokens per second, or 1,920 a minute, by Google’s audio guide. For what a whole song costs in each assistant, see Can AI listen to music?. OpenAI prices gpt-audio-1.5’s audio input per million tokens, but the pages we read give no per-second rate. Claude’s documented inputs are text and images, so a song reaches Claude as those and is counted as image and text tokens.
Why did two AIs describe the same song differently?
Partly because, going by the documentation, they were given different things. Gemini gets the whole mix in one channel; Claude might get separated parts in order, a set of numbers, or the notes from a MIDI file turned into text, depending on the tool. Each also knows famous songs from training, so part of a description can come from what’s been written about the song rather than from the recording. Separation and transcription are models’ guesses too, and their mistakes differ.
Can Claude make music it can’t hear?
It can write code or notes that produce sound, and check the result only through something it reads, such as a spectrogram or numbers. A poster on r/ClaudeAI who asked Claude for procedural audio saw it export spectrograms of the result and view them as images, and an album posted on r/claudexplorers was made partly from Python scripts Claude wrote.
Can an AI hear the quality of a voice?
It’s one of the things translations lose. Listen Along’s page says “The quality of a voice and the sound of the room mostly don’t come through” its pictures, and in a published listen Claude put timbre first under what it couldn’t hear. Gemini’s API takes the audio itself, though downsampled and in one channel; its guide lists emotion detection in speech and music but doesn’t say how much of a voice’s quality survives.
Questions? Ask in r/AIMemorySystems.
References
- Google: Gemini API audio understanding, Understand and count tokens
- Anthropic: Models overview, Upload files to Claude
- OpenAI: gpt-audio-1.5
- Separation, notes and lyrics: Demucs, Basic Pitch, LRCLIB API docs, Wikipedia on spectrograms and MIDI
- Research: Vision Language Models Are Few-Shot Audio Spectrogram Classifiers (2024), Seeing isn’t Hearing: Benchmarking Vision Language Models at Interpreting Spectrograms (2025)
- Other tools: audio-analyzer-rs, Ear
- Reddit: spectrograms viewed as images, r/ClaudeAI and the reply quoted, an album made with Claude, r/claudexplorers, the renamed comedy track, r/Bard. Read through the Arctic Shift archive; nobody opened them live.
- Ours: Listen Along, how it works, the full manual, the “And It’s Still Alright” listen
More guides: all guides.