KieronQuinn / AmbientMusicMod

Port of Now Playing from Pixels to other Android devices
GNU General Public License v3.0
1.91k stars 41 forks source link

Automatic Recognition not working #175

Closed mjain234 closed 1 year ago

mjain234 commented 1 year ago

I played a song on the background but the app is not able to recognise as you can see here, I have to manually tap to recognise the song. All are working fine, Now playing showing on lock screen and also when I tap to trigger, it recognises the song. But it won't do it automatically whenever screen is on.

KieronQuinn commented 1 year ago

I'm not sure what you're trying to show with that video tbh.

You have the On Demand icon showing on the lockscreen but aren't actually starting a search, you need to tap it to do that. You then unlock and run an On Demand search from the widget, which of course works.

This particular song is not in the India database, so by default will not be recognised in the background, unless you add it from On Demand as you have done now. It does appear to be in the UK database though, strangely enough.

If you are having no songs recognised in the background, including those which are in the track list, and recognising using the widget's offline recognition (the first button not the one with the search icon) works, then the app is probably being killed in the background and you should follow the steps on the battery & optimisation page. Unless of course you have a super-long recognition period, and have recognise on wake disabled, in which case of course it's not running in the background.

mjain234 commented 1 year ago

Ohk, I thought it will start recognising any song regardless of any database or from any track list. But also, facing some small issue. Like,

mjain234 commented 1 year ago

Ok, as you said earlier that the song which is running was outside the India database but as you can see here in the video, the song name "until I found you" is intl the India database and still after sometime, the app not able to recognise the song but doing manually, works as you can see in the above video. Also, from video, you can see in the notification it says, Ambient music is running in the background.

KieronQuinn commented 1 year ago

You're still doing on demand recognitions rather than on device ones. Are you sure the on device recognition is working? Do a manual recognition from within the app using the recognise > On Device recognition, and check the playback isn't distorted.

mjain234 commented 1 year ago

Yes, i tried to recognise the song within the app now as you see here in the video, and after clicking on playback, the sound is distorted. But this time, I enabled Alternative Encoding from the settings and decrease the Gain and then tried to recognise the song again as you can here in the video, and it recognises the song and also the playback isn't distorted at all.

KieronQuinn commented 1 year ago

You just needed to enable alternative encoding then. Not a bug.