You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You're lucky! I've made a lib for that yesterday. Please check AndroidAudioConverter.
After the recording finish, you can convert WAV to AAC, MP3, M4A, WMA and FLAC:
@OverrideprotectedvoidonActivityResult(intrequestCode, intresultCode, Intentdata) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == 0) {
if (resultCode == RESULT_OK) {
// Great! User has recorded and saved the audio file// Now you can convert itAndroidAudioConverter.with(MyActivity.this)
.setFile(myWavFile)
.setFormat(AndroidAudioConverter.AudioFormat.MP3)
.setCallback(callback)
.convert();
} elseif (resultCode == RESULT_CANCELED) {
// Oops! User has canceled the recording
}
}
}
that's amazing, but i want to ask if this affect the size?
like aac format files a usually small and fine quality.
anyway i will try it out now.
awesome work
Yes, the size reduce a lot with AAC, MP3, M4A and WMA formats.
I've made a quick test: an WAV file with 10s has ~500KB, while any format above has less than 60KB.
⚠️ Because I've made AndroidAudioConverter with FFmpeg lib my lib has ~20MB 😞 . I'm looking for alternatives to reduce the lib size.
The library loads just fine for me, but I can not get it to convert files. All converts failed. I am not sure if it's because of the new scoped storage method for apps with api 29 and up or what the issue is. ActivityForResult is depreciated, and with the new method it still doesn't work. Hey Adrielcafe, will you please give us an update that works with Android 12 api 32, and the new ActivityForResult launcher method, and with the new scoped storage. Thanks!
Activity
adrielcafe commentedon Sep 15, 2016
Hi @AnthonyKoueik,
You're lucky! I've made a lib for that yesterday. Please check AndroidAudioConverter.
After the recording finish, you can convert WAV to AAC, MP3, M4A, WMA and FLAC:
Please let me know if this solve your problem.
AnthonyKoueik commentedon Sep 15, 2016
that's amazing, but i want to ask if this affect the size?
like aac format files a usually small and fine quality.
anyway i will try it out now.
awesome work
adrielcafe commentedon Sep 15, 2016
Yes, the size reduce a lot with AAC, MP3, M4A and WMA formats.
I've made a quick test: an WAV file with 10s has ~500KB, while any format above has less than 60KB.
AnthonyKoueik commentedon Sep 15, 2016
I didn't read your Audio Recorder code, can't I change it to aac output ?
adrielcafe commentedon Sep 15, 2016
I'm using OmRecorder lib to record audio. Currently it does't support other formats.
1sMcGrady commentedon Oct 13, 2016
i'm stucked with a "FFmpeg not loaded" Exception , can you help me with this? thx ~
MarsDiplomatToEarth commentedon Mar 14, 2020
how can i get the time of my audio file
Mathias8405 commentedon Mar 21, 2022
The library loads just fine for me, but I can not get it to convert files. All converts failed. I am not sure if it's because of the new scoped storage method for apps with api 29 and up or what the issue is. ActivityForResult is depreciated, and with the new method it still doesn't work. Hey Adrielcafe, will you please give us an update that works with Android 12 api 32, and the new ActivityForResult launcher method, and with the new scoped storage. Thanks!
Mathias8405 commentedon Mar 21, 2022
If anyone wants to try and fix the project that I started and see if you can get this to work go ahead. Download it here https://file.io/ds6UHOxV4yns
If you get it to work please send the fixed project to my email rockdrummer84@gmail.com Thanks!