How to Use the record Flutter Package for Audio Recording on ARM64 Linux with Phiola

Arsalan umar
3 min readAug 27, 2024

--

When developing applications for embedded devices, particularly those running on ARM64 architecture, finding compatible software packages can be challenging. One such challenge I encountered was with the record Flutter package, which is commonly used for audio recording. The package initially relied on fmedia for encoding on Linux, but fmedia does not support ARM architecture. This posed a significant problem for my project, which involved developing an application for an embedded device equipped with an ARM processor and requiring audio recording capabilities.

After some research and testing, I found a solution by switching from fmedia to phiola, an encoding tool that supports ARM architecture. This article will guide you through the steps I took to make this transition and enable audio recording on ARM64 Linux using the record package with phiola.

Background

The record Flutter package is a powerful tool for recording audio across various platforms. However, its Linux implementation initially used fmedia for encoding audio, which unfortunately does not support ARM architecture. This limitation became a roadblock when I needed to deploy my application on an ARM64-based embedded device.

The lack of ARM support in fmedia made it impossible to use the record package in my project, forcing me to seek alternatives that would work with the ARM architecture.

Implementation Guide

If you’re facing a similar issue or are interested in enabling audio recording on ARM64 Linux using the record package, here’s a step-by-step guide:

Install Phiola:

Download and install phiola on your ARM64 device. You can find the installation instructions on the Phiola GitHub page.

Modify the Record Package:

1. Clone the record package repository for linux.

2. Go to the lib folder and then replace the recod_linux.dart file with the provided code.

3. Now use this local repo as a package in your project.

Integrate and Test:

  • Integrate the modified record package into your Flutter project.
  • Test the audio recording feature on your ARM64 device to ensure everything works smoothly.

Testing and Validation

After implementing these changes, I tested the updated record package on my ARM64 embedded device. The transition was successful, and I was able to record audio without any issues. I also observed that phiola performed well on ARM architecture, with no noticeable differences in audio quality or performance compared to fmedia.

Conclusion

Transitioning from fmedia to phiola in the record Flutter package was the key to enabling audio recording on ARM64 Linux. This solution allowed me to continue developing my application for embedded devices without compromising on functionality.

This experience highlights the importance of community contributions in open-source projects. By sharing this solution, I hope to help other developers facing similar challenges and encourage further improvements to the Flutter ecosystem.

Additional Resources

Call to Action

If you’re working on ARM64 devices and need audio recording capabilities in your Flutter app, I encourage you to try out this updated approach. Feel free to share your feedback or contribute to further enhancements.

--

--

Arsalan umar
Arsalan umar

Written by Arsalan umar

Flutter developer, Mechatronics Engineer, Cats lover

No responses yet