Ask HN: What's the best pitch shifting algorithm in your opinion?
both real-time and non-real-time are fine
Generally speaking, phase vocoder (1) algorithms are what you’d want for developing your own pitch shifting algorithm.
but really depends on what you're after (creative or precision)