Eldar Azulay
Eldar Azulay

Reputation: 85

Change pitch of an audio file and save it with NAudio

I found the NAudio library and I've read that it can change the pitch of an audio file while it is playing, but I want to change the pitch of the audio file and then save it. Is it possible with NAudio?

Upvotes: 1

Views: 1175

Answers (1)

Mark Heath
Mark Heath

Reputation: 49522

Take a look at the SmbPitchShiftingSampleProvider which is a managed pitch shifter.

You could read the input audio with AudioFileReader, pass it into SmbPitchShiftingSampleProvider setting the PitchFactor and then using WaveFile.CreateWaveFile16 to write the pitch shifted file out to a 16 bit PCM WAV File.

Upvotes: 1

Related Questions