什么是使用AVAudioSession的AAC语音重新编码的最佳设置? [英] What is an optimal setting for AAC voice recoding with AVAudioSession?

查看:86
本文介绍了什么是使用AVAudioSession的AAC语音重新编码的最佳设置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在iPhone上录制语音,并产生一个针对小尺寸和录音质量优化的文件。有了下面的设置AAC我得到一个小的文件大小,但我不知道我得到最佳质量。

I'm looking to record voice on the iPhone and produce a file that is optimized for small size and recording quality for voice. With the settings below for AAC I'm getting a small file size, but I'm not sure I'm getting optimal quality. Other than trial and errror, is there anything I can turn to, or any recommendations?

[recordSetting setValue:[NSNumber numberWithFloat:8000.0] forKey:AVSampleRateKey];
[recordSetting setValue:[NSNumber numberWithInt:kAudioFormatMPEG4AAC] forKey:AVFormatIDKey]; 
[recordSetting setValue:[NSNumber numberWithInt: 1] forKey:AVNumberOfChannelsKey];
[recordSetting setObject:[NSNumber numberWithInt:AVAudioQualityLow] forKey: AVEncoderAudioQualityKey]; 
[recordSetting setValue:[NSNumber numberWithInt: 8000] forKey:AVEncoderBitRateKey];


推荐答案

有几种语音优化的编解码器,包括 iLBC 。使用iLBC以8kHz采样率,您将得到一个大约7MB每小时的记录的文件。

There are several codecs which are optimized for voice, including iLBC. Using iLBC at the 8kHz sample rate that you have will result in a file that is approximately 7MB per hour of recording.

这篇关于什么是使用AVAudioSession的AAC语音重新编码的最佳设置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆