avaudiorecorder 录音后播放时声音失真
我使用了 avaudiorecoder 来录制用户的声音。它会录制它,但当我播放它时,声音会破裂。任何与此相关的帮助将不胜感激......遵循我的录音机设置代码..
NSDictionary *recordSetting =[[NSDictionary alloc] initWithObjectsAndKeys:[NSNumber numberWithInt:kAudioFormatAppleIMA4],AVFormatIDKey,
[NSNumber numberWithInt:16000.0],AVSampleRateKey,
[NSNumber numberWithInt: 1],AVNumberOfChannelsKey,
[NSNumber numberWithInt:16],AVLinearPCMBitDepthKey,
[NSNumber numberWithBool:NO],AVLinearPCMIsBigEndianKey,
[NSNumber numberWithBool:NO],AVLinearPCMIsFloatKey,
[NSNumber numberWithInt:AVAudioQualityMax],AVEncoderAudioQualityKey,
nil];
i have used an avaudiorecoder to record user's voice. it records it but when i play it the sound is crackled. any help regarding this will be appreciated..... following the code of my recorder's settings..
NSDictionary *recordSetting =[[NSDictionary alloc] initWithObjectsAndKeys:[NSNumber numberWithInt:kAudioFormatAppleIMA4],AVFormatIDKey,
[NSNumber numberWithInt:16000.0],AVSampleRateKey,
[NSNumber numberWithInt: 1],AVNumberOfChannelsKey,
[NSNumber numberWithInt:16],AVLinearPCMBitDepthKey,
[NSNumber numberWithBool:NO],AVLinearPCMIsBigEndianKey,
[NSNumber numberWithBool:NO],AVLinearPCMIsFloatKey,
[NSNumber numberWithInt:AVAudioQualityMax],AVEncoderAudioQualityKey,
nil];
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为什么使用 16000 Hz 的采样率?是否会因为采样率不够快而产生噪音?使用 PCM 时,通常的采样率为 44100 Hz。
也许另一篇文章可以帮助您:
如何使用 AVAudioRecorder 在 iPhone 上录制音频?
Why do you use a sample rate of 16000 Hz? Could it be noisy because the sample rate is not fast enough? When using PCM the usual sample rate is 44100 Hz.
Maybe this other post helps you:
How do I record audio on iPhone with AVAudioRecorder?