Change pitch of mp3 audio on a microcontroller I have an MP3 decoder running on a ESP32, and I'd like to change the pitch of the streaming audio in real time.

I plan to build a little toy that streams Amazon Alexa and changes her voice so that it is higher pitched. So no pro audio requirements at all, it is just supposed to be a funny effect.

I was thinking maybe I can operate on the raw DCT data? Or is there another way that is fast enough for that chip? I cannot use time compression/dilation because the audio is streamed.

I'm using the MAD fixed point decoder.

A description of (or a link to) an algorithm working on DCT or PCM data would be fine, but code or pseudo-code in whatever language would be very welcome.
Use a "phase vocoder" which will use short term FFT properties to change the pitch without changing the duration. 

There is plenty of information and links to "phase vocoder" on Wikipedia and Google in general.

It is a great educational exercise to go through its operation as you learn from it the critical importance of the phase information in the FFT for proper reconstruction.