How to record audio and get the result as Uint8List?

Viewed 40

I've recently started to learn about audio and how it works in a low level. And for a project I'm building, I'm required to have a recorded audio as a Uint8List. I've searched far and wide for plugins that give audio as Uint8List, but I've found none. So are there any packages that returns the recorded audio as a Uint8List? Or is there any way that allows conversion of a recorded audio into Uint8List? Thanks!

1 Answers

If you already have your recorded audio file , you can read it as Uint8List.

Uint8List uint8list = Uint8List.fromList(File(myaudioPath).readAsBytesSync())
Related