I'm trying to use Chaquopy in Android to convert a 3gpp audio file into a WAV format. The 3gpp files are stored in the external memory (Download folder and permission are granted for read+write operation). I'm using Ubuntu 18.04 and I've already installed "ffmpeg" library. The code snippet works fine alone but troubles when integrated into the Android environment. Any help/solution? There are a few similar questions but not properly explained/ the solutions are not working. Thank you.
Here is my Python code -
def convert(filename):
# Do not need to convert 3gpp into WAV file.
sound = AudioSegment.from_file(filename)
converted_file = filename + ".wav"
sound.export(converted_file, format="wav")
And here is my stack trace -
2021-03-03 15:12:36.680 10002-10002/com.example.myapplication W/e.myapplication: type=1400 audit(0.0:1172): avc: granted { execute } for path="/data/data/com.example.myapplication/files/chaquopy/AssetFinder/stdlib-x86/audioop.so" dev="dm-5" ino=207144 scontext=u:r:untrusted_app:s0:c153,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c153,c256,c512,c768 tclass=file app=com.example.myapplication
2021-03-03 15:12:36.730 10002-10002/com.example.myapplication W/python.stderr: /data/user/0/com.example.myapplication/files/chaquopy/AssetFinder/requirements/pydub/utils.py:170: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work
2021-03-03 15:12:36.775 10002-10002/com.example.myapplication W/python.stderr: /data/user/0/com.example.myapplication/files/chaquopy/AssetFinder/requirements/pydub/utils.py:198: RuntimeWarning: Couldn't find ffprobe or avprobe - defaulting to ffprobe, but may not work
2021-03-03 15:12:36.809 10002-10002/com.example.myapplication W/System.err: com.chaquo.python.PyException: FileNotFoundError: [Errno 2] No such file or directory: 'ffprobe'
2021-03-03 15:12:36.809 10002-10002/com.example.myapplication W/System.err: at <python>.subprocess._execute_child(subprocess.py:1702)
2021-03-03 15:12:36.809 10002-10002/com.example.myapplication W/System.err: at <python>.subprocess.__init__(subprocess.py:854)
2021-03-03 15:12:36.809 10002-10002/com.example.myapplication W/System.err: at <python>.pydub.utils.mediainfo_json(utils.py:274)
2021-03-03 15:12:36.809 10002-10002/com.example.myapplication W/System.err: at <python>.pydub.audio_segment.from_file(audio_segment.py:685)
2021-03-03 15:12:36.809 10002-10002/com.example.myapplication W/System.err: at <python>.wavConversion.convert(wavConversion.py:32)
2021-03-03 15:12:36.809 10002-10002/com.example.myapplication W/System.err: at <python>.chaquopy_java.call(chaquopy_java.pyx:380)
2021-03-03 15:12:36.809 10002-10002/com.example.myapplication W/System.err: at <python>.chaquopy_java.Java_com_chaquo_python_PyObject_callAttrThrowsNative(chaquopy_java.pyx:352)