4

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?

Cal
  • 422
  • 6
  • 20
Ali Samaiee
  • 301
  • 6
  • 14
  • Did you find the answer how to play recorded opus audio in iOS on Android – garg Nov 29 '21 at 14:05
  • I did it by importing ogg/opus C framework to my project. Found it in Telegram source code (on GitHub). I think it is not possible to do that with native iOS solutions. – Ali Samaiee Nov 30 '21 at 21:53

0 Answers0