1.工程中导入第三方库:VoiceConvert
要使用的地方#import "VoiceConverter.h"
2.
2.
- (void)viewDidLoad
{
NSString *videopath=@"";//文件的路径
NSString *laocationgPath=@"";//转换后保存的路径
// 音频转换
// wav ----> amr
[VoiceConverter wavToAmr:videopath amrSavePath:laocationgPath];
[VoiceConverter wavToAmr:videopath amrSavePath:laocationgPath];
// amr ----> wav
[VoiceConverter amrToWav:videopath wavSavePath:laocationgPath];
}
[VoiceConverter amrToWav:videopath wavSavePath:laocationgPath];
}