Skip to content

AllenGe/VoiceConvert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

VoiceConvert

录音文件格式转换类

###pod

pod 'VoiceConvert',:git => "https://github.com/AllenGe/VoiceConvert.git"

###引入

import "EMVoiceConverter.h"

###方法

@interface EMVoiceConverter : NSObject

// WAVE音频采样频率是8khz // 音频样本单元数 = 80000.02 = 160 (由采样频率决定) // 声道数 1 : 160 // 2 : 1602 = 320 // bps决定样本(sample)大小 // bps = 8 --> 8位 unsigned char // 16 --> 16位 unsigned short int EM_EncodeWAVEFileToAMRFile(const char* pchWAVEFilename, const char* pchAMRFileName, int nChannels, int nBitsPerSample);

// 将AMR文件解码成WAVE文件 int EM_DecodeAMRFileToWAVEFile(const char* pchAMRFileName, const char* pchWAVEFilename);

//是否是 MP3文件 int isMP3File(const char *filePath);

//是否是AMR 文件 int isAMRFile(const char *filePath);

  • (int)isAMRFile:(NSString *)filePath;

  • (int)isMP3File:(NSString *)filePath;

  • (int)amrToWav:(NSString*)_amrPath wavSavePath:(NSString*)_savePath;

  • (int)wavToAmr:(NSString*)_wavPath amrSavePath:(NSString*)_savePath;

@end

About

录音文件格式转换类

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published