Home / GitHub Page

[Mobile] Record Audio Files and attach to Note

An Idea that came to my mind today, would be cool if it would be possible to directly record audio and attach to Notes using the dropdown menu similar to capturing a Picture, it would instead let you record audio snippets.

I looked into the code and checked out some dependencies, if there would be general interest I would like to sit down and see what I can do.

2 Likes

Yes if you can create a PR for it I’d accept it. One difficult here is to import the native libs to support audio recording on iOS and Android and get the app to build. Did you find any good library?

Hmm, you have to make sure though that the attachment is not too big.
The best audio codec for such a thing would be opus.

I checked out some libraries and the most up to speed library is react-native-audio, it would require to add the permission to the respected platform and linking the dependencies. It will use the audio recorder of the specific platform by default.

Regarding the comment @tessus made about using opus, I checked the library and it seems like aac would be best to use here since it is supported on both platforms

Encodings supported on iOS: lpcm, ima4, aac, MAC3, MAC6, ulaw, alaw, mp1, mp2, alac, amr 
Encodings supported on Android: aac, aac_eld, amr_nb, amr_wb, he_aac, vorbis

However we could limit the bitrate and provide settings for audio quality like: low, medium, high.
I think if we expect the users to record voice audio it is fair to say that low audio quality is sufficient since there is not much bitrate needed to clearly understand voice. Since i did no testing I cannot say how big the audio is gonna be, but I would set a general limit to 2 - 3 Minutes.

1 Like

This would be a useful feature for me. I use a voice recorder app on my phone and then manually transcribe when I get back to my office. It would be nice if it were already there in Joplin.

This is strange, since AAC is technically not free, but has to be licensed. Either way, it mostly depends on the bitrate. For speech 12-16kbit/s is enough, which translates to roughly 5.3 - 7MB per hour for mp3. The thing is that opus sounds better than mp3 in those low bit rates. I can’t say anything about AAC.

However, I really suggest that someone runs a test how much MB are used for an hour.

If it’s under the attachment limit, we are good. And recording an hour of speech in under 10 MB should be possible without problems. That is, if the library is a good one.

I would not limit the duration to minutes. Some people use audio recorders for university, presentations, and/or speeches. This is why a proper encoder, quality, and small filesize is more important than anything else.

1 Like

What do Evernote or OneNote use for example? I guess they’ve already done their research and picked a good format, so maybe we can start from there.