Audio Speed & Pitch
runs in your browserSpeed audio up or slow it down without the chipmunk effect, change its key and keep its length, or move both like tape. In your browser, nothing uploaded.
Drop a file here, or .
WAV, MP3, M4A, OGG, FLAC — or a video, and the sound is taken out of it. Nothing is uploaded.
Faster or slower with the pitch kept, a new key with the length kept, or both together like a record.
about this tool
Drop in a recording and change how fast it plays, how high it sounds, or both. Speed a lecture up without the lecturer turning into a cartoon, slow a solo down to learn it at the pitch it was played, move a song into a key you can sing — all in the page, with nothing uploaded.
Three different things
Speed and pitch feel like two dials, but there are three distinct operations here, and most of what goes wrong comes from mixing them up.
Both together is what a record does at the wrong speed. Every vibration is read faster, so every frequency goes up by exactly the factor the speed did. Twice as fast is exactly an octave higher. This is resampling, exact in pitch and in length, and it is what "Pitch follows speed, like tape" does. The pitch it produces is twelve times the base-2 logarithm of the speed:
| Speed | Pitch, following it | Nearest interval |
|---|---|---|
| 0.5× | −12 semitones | an octave down, exactly |
| 0.74× | −5.2 semitones | a 45 played at 33⅓ |
| 1.25× | +3.86 semitones | just under a major third |
| 1.5× | +7.02 semitones | a perfect fifth, two cents sharp |
| 2× | +12 semitones | an octave up, exactly |
Speed alone has to put time into the audio or take it out without touching the waveforms, which is not something resampling can do at all. Pitch alone is the other two combined: resample to the new pitch, which changes the length as a side effect, then stretch it back to the length it started at.
How the stretch keeps the pitch
Frames 40 milliseconds long are taken from the recording and laid back down, each half over the next, at a steady spacing in the result. What changes is where they are taken from: further apart in the original to speed up, closer together to slow down. Laid down blindly, neighbouring frames would meet out of step and the result would buzz. So before each frame is placed it is slid, up to 15 milliseconds either way — a little further at the very start of a file — to the position where its waveform best continues the frame before it. That is WSOLA, waveform-similarity overlap-add, and it is the standard method for speech: nothing is ever played faster, only taken from different places, so a voice keeps its own pitch.
The slide is chosen once for all channels, from a mix of them. Choosing it separately for left and right could put the two sides up to 30 milliseconds out of step, and a voice in the centre of a stereo mix would drift and smear. Holding them together keeps the image where it was. Where left and right cancel each other out in the mix — even for a moment — the mix is silence and would guide nothing, so for those frames the first channel guides both.
The last frames are placed rather than searched, so that the final sample of the original lands on the final sample of the result. Searching all the way to the end let frames drift out past it, and a slowed file ended in a few milliseconds of silence that had never been in it.
It has limits you can hear. Stretched past about half or double there is too much audio to throw away or repeat for the joins to stay hidden: fast speech starts to skip, slowed music starts to echo. Speech holds up far better than dense music. A large key change stretches too — an octave up is a half-speed stretch underneath — so the tool warns by how far the audio is being stretched, whatever the speed box says.
Why raising the pitch needs a filter
Reading audio faster moves every frequency up, and a digital file can only hold frequencies up to half its sample rate. Anything pushed past that line does not disappear. It folds back down as a tone that was never in the recording: a 20kHz shimmer read at 1.5× would come back as an 18kHz whistle. Reading slower has the mirror-image problem, an image of the top of the band reflected down into it. So the resampler filters first, with its cutoff lowered by the same factor as the resampling ratio.
A filter does not stop dead at its cutoff, though; it fades out across a band. With the cutoff exactly on the line, half that band lay beyond it, and a tone just past the line came back only 13dB down — at an octave down, as an image at 12.5kHz, squarely in hearing. So the cutoff sits at 92% of the line and the filter is twice as long, which puts the whole fade on the near side: in the tests a tone that should vanish, right at the edge, comes out more than 60dB down, and the range people hear is still flat to within half a decibel. The resampler is a Kaiser-windowed sinc, the bandlimited interpolation described by Julius Smith at Stanford's CCRMA.
What it will not do
It does not keep a voice's character. The resonances that make a voice sound like that person move with the pitch, so a singer raised four semitones sounds smaller and a narrator lowered sounds larger. Tools that hold those in place exist, but they are a different and much larger job.
The original, the result and the encoder's own copy all sit in memory at the busiest moment. Saving as WAV that comes to over an hour of mono speech at 1.5×, about half an hour of stereo at 1.25–1.5×, and less when slowing down or changing the key, which make a longer or an extra copy; the compressed formats take about a third less again. Once the file is decoded the tool works this out before starting, and refuses rather than running out partway. A file too large even to decode is refused by the browser, and the message says that may be why. For anything longer, the ffmpeg command below makes the same change with no limit at all.
WAV is written here as 16-bit, a slice at a time so the page stays responsive. M4A, OGG and WebM go through the encoders your browser provides, and are offered only when it has them — though an unusual channel layout can still be refused, and WAV always works. To trim a file first, or level it so a sharp peak has room, the audio trimmer does that; to put several recordings end to end, the audio joiner.
The same change for a hundred files
For a folder of lectures, or a file too long for a browser tab, the settings
are also shown as an ffmpeg command, ready to copy. The stretch becomes a
chain of atempo filters, each kept between 0.5 and 2 because ffmpeg builds
before 4.1 refuse anything outside that. Resampling becomes asetrate, run
from a known 48kHz so it is right whatever rate the files were recorded at. It
drops any video track — including the cover art an MP3 so often carries, which
otherwise ends up re-encoded into the output or stops an M4A being written at
all — and asks for the same codec and 48kHz rate this tool writes. File names
are single-quoted, so in a POSIX shell (macOS, Linux, WSL) pasting the command
can never run anything hidden in one; Windows' cmd.exe does not treat single
quotes as quotes. ffmpeg's stretch is its own, so its result is very close
rather than identical, sample for sample.
To see what is inside a file before changing it — its real sample rate, its channels, its codec — the media inspector reads it.
questions
- How do I speed up audio without making it sound like a chipmunk?
- Leave "Pitch follows speed" off and set the speed. Short frames, 40 milliseconds each, are taken from the recording at one spacing and laid back down at another, half over each other. Each is slid up to 15 milliseconds to where it best continues the one before, which stops the joins buzzing. That method is WSOLA, the usual one for speech. Voices keep their own pitch because no waveform is played faster; the frames are only taken further apart or closer together.
- Why does a record played too fast sound higher?
- Because playing faster reads every vibration faster, so every frequency goes up by the same factor as the speed. Speed and pitch are one thing on a record or a tape, and that is what "Pitch follows speed" does: it resamples, and nothing else. A 45 played at 33⅓ runs at 0.74 of its speed and drops 5.2 semitones; the other way round rises by the same.
- How many semitones is 1.5× faster?
- About 7.02, when the pitch is allowed to follow the speed. Doubling the speed is exactly an octave, twelve semitones, and every other speed is twelve times the base-2 logarithm of the factor: 1.25× is 3.86 semitones up, 0.75× is 4.98 down. 1.5× lands two cents above a perfect fifth. Whatever the figure, a recording sped up this way stays in tune with itself — it has only moved.
- Can I change the key of a song without changing its length?
- Yes, up to an octave either way, in steps as fine as a hundredth of a cent. The audio is resampled to the new pitch, which also changes its length, and then stretched back to the length it started at. Whole semitones move it to a new key; fractions retune it. It does not hold a voice’s resonances in place, so a singer raised by several semitones sounds smaller, not just higher.
- Can it convert music from 440Hz to 432Hz?
- It can make that change: set the pitch to −0.3177 semitones, which is −31.77 cents, the ratio of 432 to 440. That is all 432Hz tuning is — the whole recording a third of a semitone flat. It does not add anything else, whatever the claims made for it.
- Why does it sound choppy at 3× or at a third of the speed?
- Because stretching without changing the pitch has to throw audio away or repeat it, and past about half or double there is too much of either to hide. Fast speech tends to skip; slowed music tends to echo or smear. A big key change stretches too — an octave up is a half-speed stretch underneath — so the tool warns by how far the audio is stretched, not by the speed you typed. Tape speed never stretches, so it has no such limit; it just changes the pitch as well.
- How long a file can it take?
- It depends on the speed, the channels and the format, because the original, the result and the encoder’s copy all sit in memory while it works. Saving as WAV: over an hour of mono speech at 1.5×, about half an hour of stereo at 1.25–1.5×, and less when slowing down or changing the key. The compressed formats take about a third less. Once the file is decoded it says so before starting, and for anything longer the ffmpeg command it shows makes the same change with no limit.
- Which formats can it save?
- WAV always, because it is written here directly, as 16-bit. M4A, OGG and WebM go through an encoder your browser provides and are offered only when it has one, though an unusual channel layout can still be refused, in which case WAV works. No browser has a built-in MP3 encoder, so MP3 is not offered. It reads whatever your browser can decode, including the sound track of a video.
- Can I do the same change with ffmpeg?
- Yes. For the settings you have chosen the tool shows an ffmpeg command, ready to copy, which you can run on each file in a folder. It uses atempo for the stretch, chained so no step is outside 0.5 to 2 and ffmpeg builds before 4.1 accept it, asetrate for resampling, and the same codec and 48kHz rate the tool writes. ffmpeg’s stretch is its own, so the result is very close rather than identical.
- Is my audio uploaded?
- No. The file is decoded, processed and encoded in this page, on your device, and no part of your audio is sent anywhere. You can check by turning off your network after the page has loaded — it still works.