I am recording an audio in android in mp3 format and to do that I am using MPEG_4
as an Output Format while AAC
as an AudioEncoder and It does record an audio.
The problem is when I am using that file for further processing in python pydub it could not decode the audio amd gives me error something like this:
CouldntDecodeError: Decoding failed. ffmpeg returned error code: 1
Even though I have ffmpeg installed. I have also tried different audio encoder such as AMR_NB
but problem is still the same. It couldnt decode the audio.
Here is what I am doing in pydub:
sound = AudioSegment.from_mp3("test.mp3")
da = np.fromstring(sound.raw_data, dtype=np.int16)
Does anyone have idea what could be the proper AudioEncoder for recording mp3 audio?