我正在尝试在 Json 中发送 AVAudioRecorder , 我想将它转换为 NSString 或 Byte.. 有什么想法吗?
最佳答案
从未尝试过,但也许是这个?
// Get the recording
AVAudioRecorder *recorder = [[AVAudioRecorder alloc] initWithURL:filePath settings:recordSetting error:&error];
....
// Convert to NSData
NSData *theData = [[NSData alloc] initWithContentsOfFile:filePath];
// Convert to NSString
NSString* dataAsString = [NSString stringWithUTF8String:[theData bytes]];
关于ios - 将 AVAudioRecorder 转换为 NSString 或 bytes,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20310231/