Ubuntu Audio Pitch Shifting filter
You can do pitch shift with the gstreamer plugin soundtouch. A project that probably uses this feature is playitslowly .
See also:
- GStreamer and music processing
For on-the fly pitch shifting it may be possible to set up a LADSPA filter for your sound output (e.g. TAP pitch plugin):
How can I apply a LADSPA plugin to a PulseAudio stream?
Apply LADSPA filter to only one channel of multichannel output with Alsa and PulseAudio