2

I am developing the app which required to Record audio when music is playing. I can successfully record sound with music. But I can't remove vocal from music. It will also be great, if I can volume down of vocal when it rise.

I am using AVAudioSession, AVAudioPlayerNode for record while music playing.

Any help will be appriaciated.

girish_pro
  • 838
  • 9
  • 18

1 Answers1

0

In WWDC14 session #502 "AVAudioEngine in Practice" you could find how to configure AVAudioEngine for Karaoke which is good for your task and also you could find information about node tap. Node tap can capture output from any AVAudioNode.

So you could add node tap for you AVAudioInputNode and record all you need:

AVAudioInputNode *node = [engine inputNode];    
// add tap
[node installTapOnBus:0 bufferSize:4096 format[node outputFormatForBus:0] block:^(AVAudioPCMBuffer *buffer, AVAudioTime *when) {
    // save audio buffer
}];
John Tracid
  • 3,836
  • 3
  • 22
  • 33