The naive way to speed audio up is to play the samples faster, which raises the pitch along with the pace: the chipmunk effect. Time-stretching instead slices the audio into tiny overlapping windows and lays them back down closer together, so each window keeps its original pitch.
Flippy uses ffmpeg's atempo filter for exactly this, and rescales the video's presentation timestamps by the same factor so the picture keeps up. One re-encode, at quality matched to the source.
Slowing down works the other way: frames are shown longer and the audio is stretched apart, so 0.5x stays smooth without inventing anything. What it is not is synthetic slow motion: if the source was 30 fps, half speed plays 15 real frames a second.