Speed, pitch, and separating the two
Playing audio faster by simply reading samples more quickly changes pitch along with speed — the tape-machine effect, where a voice becomes a chipmunk. The two are linked because both are properties of the same waveform in time.
Separating them requires time-stretching, which reconstructs the signal at a new duration while preserving frequency content. The common approaches are phase vocoders, which work in the frequency domain, and overlap-add methods such as WSOLA, which cut the waveform into short segments and repeat or drop them at points chosen to preserve waveform continuity.
Neither is free of artefacts. Phase vocoders can produce a smeared, reverberant quality on transients — drums and plosives suffer most — sometimes described as phasiness. Overlap-add methods can produce a stuttering or warbling texture on sustained tones. Speech generally survives stretching better than music, because it is less harmonically dense.
How far you can push it
Modest changes are essentially transparent. Between about 0.9× and 1.25×, good algorithms produce results most listeners will not identify as processed, which covers most practical use — trimming a podcast, tightening a narration, fitting audio to a video edit.
Beyond about 1.5×, artefacts become noticeable on music and remain acceptable on speech. Speech stays intelligible surprisingly far, and regular listeners at 2× adapt to it, though comprehension of unfamiliar or complex material degrades even where the words are clear. Studies of accelerated speech generally find recall falls before intelligibility does.
Slowing down is harder than speeding up. Stretching to 0.5× requires the algorithm to invent twice as much signal as it was given, and artefacts become pronounced. For transcription work, small decrements around 0.75× are far more useful than dramatic ones.
Deliberate pitch changes
Where you do want pitch to change, the operations are distinct. Pitch shifting without changing duration is the mirror of time-stretching and uses the same algorithms. Changing both together, as a tape machine does, is a resample and is computationally trivial — and it is sometimes exactly the sound wanted, since it is the classic sound of a record played at the wrong speed.
For music, remember that shifting pitch by an arbitrary amount takes it out of standard tuning. Semitone steps preserve musical relationships; a shift of 30 cents leaves everything slightly sharp against anything it is played with. Musical transposition means multiplying frequency by the twelfth root of two per semitone.
Formants are the reason heavily pitch-shifted voices sound artificial. Vocal tract resonances stay roughly fixed as a person changes pitch, but naive shifting moves them with the fundamental, producing the cartoon quality. Formant-preserving algorithms keep them in place and sound markedly more natural on voice.