In android (flutter) is there any way I can record user voice while any system audio playing in background doesn’t get recorded?

So, I’m trying to make an audio recording application in Flutter and facing this issue, when I open the microphone for recording meanwhile I’m playing some songs on Spotify on the same device, it records what I’m saying but also records the song as well.
I do not want it to record the system voice from which the microphone is recording.
For example- In Google Meet, when the mic is on and while I play Spotify or something it doesn’t record those songs, it only records external sounds.

Read more here: Source link