Is there a way to make unity know if a track is done playing?

Hey there, i have an audio event that need to be stopped once its finished, usually i would use Invoke/Corutines to time the stop of the event but in this case i’m having items that changing the pitch and the speed of the music, which means that in some way i want to access audio and know if its done, if its done than stopping the event and if its still running than everything goes as usual.
is there a way to know if the event is playing or just running blank?

An event will automatically stop once it has been deemed “finished”. This means there are no instruments or logic markers beyond the current position of the playback cursor on the event’s timeline, no instruments triggered in any parameter sheet, and no modulations (eg. AHDSR) are playing out. You’ll also need to ensure an event hasn’t been set to “Persistant” in the event macros, which will keep it alive even if it meets the above criteria.

You can check if an event is currently playing by calling .isPlaying() on the event instance.