How to save the audio with changed pitch and speed

2020-04-13 17:42发布

问题:

I'm able to change the pitch and speed of my audio but I'm getting problem in saving the audio with changed pitch and speed

//this is method which set the pitch  
[self.audioEngine connect:audioPlayerNode
                       to:timePitchEffect
                   format:nil];
[self.audioEngine connect:timePitchEffect
                       to:self.audioEngine.outputNode
                   format:nil];

[audioPlayerNode scheduleFile:self.audioFile
                       atTime:nil
            completionHandler:nil];
[self.audioEngine startAndReturnError:&audioEngineError];
NSLog(@"%@",self.audioFile.url);
if (audioEngineError) {
    NSLog(@"%@",@"whats this!!!");
}

// call the method on button tap

[self playAudioWithEffect:EAudioEffectPitch effectValue:@-500.0];

I'm changing the pitch using this function but how to save it with changed pitch .... please help...