For referencing audio files inline, such as pronunciation demonstrations, Wikipedia has relied on linking to the raw file using [[Media:...]], via templates like {{Audio}}.
But not all browsers support playing the linked file (which can be Ogg Vorbis, WAV, FLAC, WebM, Opus, or MIDI), causing them to download the file instead of playing it, even though the servers automatically transcode audio files into Ogg and MP3 specifically so that browsers can play them.
And even when the browser supports it, it is not user-friendly to suddenly send them to a different page with nothing but a player on it (a violation of the principle of least astonishment).
Luckily we have HTML5 and <audio> now, so we can let browsers figure out which format to use without much hassle.
I'm wondering if something like the following is feasible:
<audio file="Example.ogg">Link</audio>
in wikitext will fetch the derivative URLs and turn into something like:
<a href="/wiki/File:Example.ogg" title="Example.ogg" data-audiolink="[{"src":"//upload.wikimedia.org/wikipedia/commons/c/c8/Example.ogg","type":"audio/ogg"},{"src":"//upload.wikimedia.org/wikipedia/commons/transcoded/c/c8/Example.ogg/Example.ogg.mp3","type":"audio/mpeg"}]">Link</a>
and a JS will attach a handler that converts the JSON data to an HTMLAudioElement and plays it to the link's click event.