TUIKit(iOS)
下载地址
VoiceConvert 专门用于 iOS 音频文件转换,[amrToWav|wavToAmr],判断文件是否是 mp3 文件[isMP3File],判断文件是否是 arm 文件[isAMRFile]。代码是从腾讯 IMDemo 中提取的,单独提取出来做成 pod,这样也能方便大家使用 pod 单独集成该功能模块。
之前编译出错,后来参照美洽客服 SDK 中的 .podspec 文件解决编译错误【https://github.com/Meiqia/MeiqiaSDK-iOS/blob/master/Meiqia.podspec 非常感谢!
pod
pod 'VoiceConvert'
引入
import "EMVoiceConverter.h"
方法
@interface EMVoiceConverter : NSObject
+ (int)isMP3File:(NSString *)filePath;
+ (int)isAMRFile:(NSString *)filePath;
+ (int)amrToWav:(NSString*)_amrPath wavSavePath:(NSString*)_savePath;
+ (int)wavToAmr:(NSString*)_wavPath amrSavePath:(NSString*)_savePath;
@end