문제

im making an application on android that requires to capture the user´s voice and recognize it. I tryed to record the audio using this code: http://xhampa.pastebin.com/Yr2hie6q on android 2.1. I realized that the sound wasn't recorded in a good quality at all (like slow motion). Unfortunally, I don't have an android to test it out, so I'm using the emulator. Is there anyway to improve record quality using the emulator?

도움이 되었습니까?

해결책

The default recording quality when using mediarecorder is 4.75kbps and 8kHz, which is not adequate for any sort of audio processing. You simply need to change those values using the setAudioEncodingBitRate and setAudioSamplingRate methods.

setAudioSamplingRate(11.05)
setAudioEncodingBitRate(20)

The values that I included will optimize your audio quality, but you may need to change them to fit your needs.

Mediarecorder Documentation: http://developer.android.com/reference/android/media/MediaRecorder.html

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top