I have a radio app where I play radio from URL using just audio in flutter (by using seturl() method and then play() method). I want to record audio using stream or some sort of other way than using microphone (which is already done and working). Thanks.
And I need to save file as mp3.
I wonder maybe there is a stream which I can listen to get streaming audio as uint8list to save in file. Or any other way then recording with microphone.
You can simply do this by reading audio stream as bytes then write these bytes to a file.
First import dio repo to handle reading audio stream as Stream of bytes.
then add this class to your project .. copy it from my gist
and simply use it by
Start recording:
Record.start('stream url);
Stop recording:
Record.stop();