AVFoundation 프레임 워크에서 AVAudioRecorder를 사용하십시오.
[audioSession setCategory:AVAudioSessionCategoryRecord error:nil]; // assign it to recording session
[audioSession setActive:YES error:nil]; // activate it!
NSMutableDictionary* recordSetting = [[NSMutableDictionary alloc] init];
[recordSetting setValue: [NSNumber numberWithInt:kAudioFormatAppleIMA4] forKey:AVFormatIDKey]; // assign this special hardware component as the function to record
[recordSetting setValue:[NSNumber numberWithFloat:44100.0]
forKey:AVSampleRateKey]; //44100 is the sample rate
[recordSetting setValue:[NSNumber numberWithInt: 2]
forKey:AVNumberOfChannelsKey]; // same thing
tmpFile = [NSURL fileURLWithPath:
[NSTemporaryDirectory() stringByAppendingPathComponent:
[NSString stringWithFormat: @"%.0f.%@",
[NSDate timeIntervalSinceReferenceDate] * 1000.0,
@"caf"]]]; // how we identify the audio written to the file to play later
recorder = [[AVAudioRecorder alloc] initWithURL:tmpFile settings:recordSetting
[recorder setDelegate:self];
[recorder prepareToRecord];
[recorder record];
PLAYING :
AVAudioSession * audioSession = [AVAudioSession sharedInstance];
[audioSession setCategory:AVAudioSessionCategoryPlayback error:nil];
[audioSession setActive:YES error:nil];
AVAudioPlayer * player =
[[AVAudioPlayer alloc] initWithContentsOfURL:tmpFile error:nil]; // takes recording data from tmpFile where we wrote the recording in
[player prepareToPlay];
[player play];
그게 좀 AVAudioRecorder 인스턴스와 ** 샘플 코드
녹음 NSURL 인스턴스를 작성 AVFoundation 프레임 워크를 가져 오기 및 는 AVAudioRecorderDelegate 을 준수 샘플 코드 .... 당신을 도울 수는 있지만 문서를 읽으십시오. 입을 움직일 수있는 방법이나 확실하지 않은 경우 Im 당신은 피치를 바꾸고 싶었지만 이것은 녹음의 시작입니다
니스 ... 아프다 시도하고 알려주세요 .. –
@BalanPrabhu 이것이 도움이된다고 생각한다면 ... – MCKapur