How to configure so the user can download an audio locally to the device before listening?

Hello,

I am just wondering if it would be possible to achieve this. My project involved a lot of audio files for every song that is listened by the user. So far I have all those audios in a cloud and the student listen to them in streaming from my cloud. I have a database in Firestore and the value for this song now is just a link to the cloud. I wonder if it would be possible to have those files in the cloud (Firebase storage or some other) but the user would download the audio to listen to it locally when needed.

So my idea is that when the student select a song, the audio would be downloaded to the device clicking an icon. Once the audio is in the device, the icon would change for a play icon and it could be played locally. If the student needs to release or delete from the device the song, I would establish an icon to remove the local file but the access to the cloud would be there always.

Is this possible to achieve? Thank you.