1

I am new in ios developement.I have created a simple voice recording using file extension of .caf format. It will record in .caf file.while tap the play button it working fine.But I want to record in .aac,mp3,wav format and also i need to implement quality like low,medium, high.

Please help me to do this.

Ravindhiran
  • 5,304
  • 9
  • 50
  • 82

3 Answers3

0

What you can achieve is convert the .caf file to .wav or .mp3 after you have downloaded it successfully.

Here some ways are mentioned

How to use afconvert to convert from .caf to .mp3 format?

Converting mp3 to caf file for iPhone

How to convert a wav or caf audio file on iPhone

Please have a look at them . Hope they help.

Community
  • 1
  • 1
IronManGill
  • 7,222
  • 2
  • 31
  • 52
0

I have also faced same problem.I wanted to record audio in .mp3 format, but i didn't find any code for doing that.But what you can do is you can rename the extension of your audio file. You just rename extension .caf to .mp3 and it also works great..

You can check it..

Cheers,

Nirav

NiravPatel
  • 3,260
  • 2
  • 21
  • 31
  • i tried it. it works fine but i think rename extension is not a proper way – Ravindhiran Jul 31 '13 at 05:59
  • Renaming isn't proper way. – Tirth Jul 31 '13 at 06:07
  • i knew my friends, but i searched whole internet, but i didn't find a good way to record in .mp3. If you can find a way, please please tell me. – NiravPatel Jul 31 '13 at 06:21
  • 1
    There is not way to record file in .mp3 extension but you need to convert recorded .caf file into .mp3 file using proper setting of mp3 standards, AVFoundation framework will help you on such functioanlity. – Tirth Jul 31 '13 at 16:39
  • @iAmbitious I need to convert recorded .caf audio file into .aac audio file... any idea how to do this? – Ravindhiran Sep 16 '13 at 06:05
0

You can record a wav file by setting AVFormatIDKey to kAudioFormatLinearPCM

Pathak Ayush
  • 726
  • 12
  • 24