我正在使用AVAudioRecorder添加语音备忘录功能,需要知道最佳的录音设置。
不幸的是,我对音频一无所知,甚至不确定要搜索什么术语。
目前,为了测试目的,我正在使用以下设置,这是我从某个地方复制的:
recorderSettingsDict=[[NSDictionary alloc] initWithObjectsAndKeys:[NSNumber numberWithInt:kAudioFormatAppleIMA4],AVFormatIDKey,
[NSNumber numberWithInt:44100.0],AVSampleRateKey,
[NSNumber numberWithInt: 2],AVNumberOfChannelsKey,
[NSNumber numberWithInt:16],AVLinearPCMBitDepthKey,
[NSNumber numberWithBool:NO],AVLinearPCMIsBigEndianKey,
[NSNumber numberWithBool:NO],AVLinearPCMIsFloatKey,
nil];
或者:defaultSettings = {
AVFormatIDKey = 1768775988;
AVLinearPCMBitDepthKey = 16;
AVLinearPCMIsBigEndianKey = 0;
AVLinearPCMIsFloatKey = 0;
AVNumberOfChannelsKey = 2;
AVSampleRateKey = 44100;
};
这个可以用,但我不知道它在语音方面的质量、速度、文件大小等方面是否是最优的。
AVAudioRecorder类参考文献列出了许多设置常量,但我不知道哪些是用于语音的。
如果有人知道一个好的“白痴音频格式”资源,我也可以接受。(注意:我已经看过苹果文档,但他们假定我具备数字音频方面的知识,而我并没有。)