I am using AVAudioRecorder to record the audio in PCM wave format. sample frequency 16K Hz. when record the audio there is constant noise in the wave files. Also if i record a empty file ( with out sepaking anyting ) in silennce enviroment then also noise present in the files. for refence here i am uploading a empty file and a speech files in the below location.
https://drive.google.com/folderview?id=0B5r-5MmR-hW7Z2RDOGQ2V1l1Zlk&usp=sharing
I am using following settings to record audio using AVAudio recorder.
// sets the path for audio file
NSArray *pathComponents = [NSArray arrayWithObjects:
[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject],
[NSString stringWithFormat:@"%@.wav", recordedAudioFileName],
nil];
self.recordedAudioURL = [NSURL fileURLWithPathComponents:pathComponents];
NSLog(@"Recording File Path dir: %@", recordedAudioURL);
NSMutableDictionary *recordSetting = [[NSMutableDictionary alloc] init];
[recordSetting setValue:[NSNumber numberWithInt:kAudioFormatLinearPCM] forKey:AVFormatIDKey];
[recordSetting setValue:[NSNumber numberWithFloat:16000.0] forKey:AVSampleRateKey];
[recordSetting setValue:[NSNumber numberWithBool:NO] forKey:AVLinearPCMIsBigEndianKey];
[recordSetting setValue:[NSNumber numberWithInt:1] forKey:AVNumberOfChannelsKey];
[recordSetting setValue:[NSNumber numberWithInt:16] forKey:AVLinearPCMBitDepthKey];
[recordSetting setValue:[NSNumber numberWithInt:AVAudioQualityMax] forKey:AVEncoderAudioQualityKey];
// initiate recorder
NSError *error;
userAudioRecorder = [[AVAudioRecorder alloc] initWithURL:[self recordedAudioURL] settings:recordSetting error:&error];
if (error)
{
NSLog(@"*********************");
NSLog(@"Error in initializing: %@", [error localizedDescription]);
NSLog(@"*********************");
}
1) Is there is any wrong the code ?
2) If i can used any other framework to record the audio in PCM wave format.
3) Is this much noise will affect the speech recognition accuracy.