Record audio with another header than caf

278 Views Asked by At

I want to record audio in Opus format on iOS share it with other clients. I did this using this setting for AVAudioRecorder:

let audioRecorderSettings = [AVNumberOfChannelsKey: 1,
                             AVFormatIDKey : kAudioFormatOpus,
                             AVSampleRateKey: 16000.0] as [String : Any]

but now other non-Apple devices are not able to playing my ".ogg" file that I have recorded and I found that the file header is "caf" unlike other Opus format files. I just want to make my recorded file readable for other devices like Android devices. What is wrong with my code?

0

There are 0 best solutions below