I've written a quick Firefox extension to log tab audio state changes to the browser console. It currently doesn't take into account additional variables like muted tabs, but that functionality can be added if the add-on in its current state doesn't answer the question satisfactorily.
The extension generates console entries like:
tab '(1) Messenger' is playing sound background.js:10:13
tab '(1) Messenger' stopped playing sound background.js:10:13
tab '... - YouTube' stopped playing sound background.js:10:13
tab '(1) Messenger' is playing sound background.js:10:13
so filtering the browser console contents by "tab" and displaying only entries from the [Logs] category should reduce the amount of output from other logging sources.
You can download the add-on from here.
I can't guess your platform specifics or software versions, but I've verified the extension's basic functionality using Firefox 67 on Linux for both YouTube and FB Messenger.