Although this article is original, but the content is from the network, reference to everyone's microblog, as well as the summary of the Forum.
When you are speaking, you will encounter the problem of recording the voice format, because you have to consider the format of the support for your own development device, as well as the format of the support of the other device's operating system, and how easy it is to implement each format on the respective platform.
Before the company to do voice this part, the solution is to record a local voice file, the server for codec conversion. Of course, each platform is also the choice of their most appropriate encoding format.
Now the platform is mainly iOS and Android two mainstream platform, WP's temporarily not considered.
The main recording format has, MP3, AAC, ILBC, Speex, AMR these several, each format has the characteristic, ILBC, the Speex, the AMR record file size is very small, quite suitable for the network transmission.
The resolution of each recording format is summarized as follows:
Mp3:ios,android recording requires encoding conversion, the use of lame third-party libraries, playback should be able to play directly
Ilbc:ios Support codec, Android low version does not support, but there are open source Third-party library, you can record the encoding, playback decoding processing
Speex: Also open source Third-party library, claiming that the file is small, can reduce noise, need to ios,android the client to encode and decode processing
Amr:ios 4.3 version support, the future version does not support AMR format, the Android device supports the format, in this format, iOS devices can be used Libopencore Third-party library for conversion, playback and decoding to the original PCM to play. Android devices can be recorded and played directly
AAC: Both systems should be supported in the format, but there is no good enough to say that Android devices are supported. Did not do the test, the specific situation is unknown.
Choice of options, should aac most convenient, but look at the network, as if the discussion on this is not much, may not be too wide practical application. Others are different, can choose according to the situation. Concrete implementation, ready to take MP3 test under the look of how the effect. In the third party library codec process, there are two ways, can be recorded directly into a file, then the conversion, you can also record the original data edge conversion, and finally save the file. All need the actual test, see how the effect