play wav files from sd card with Arduino UNO wifi rev2

Hello,
I want to play a song when a sensor has a certain value.

I made this on the Arduino UNO with the TMRpcm library and it worked perfect.
Now I have a uno wifi rev 2 and the library doesn't work anymore.
I'm getting errors because the library works with avr and this is a megaavr.

Does anyone know a library I can use for the uno wifi rev 2? I can't find anything.