Reach out to the communities to add a more stable marker in the HTML output for pronunciations.
en:Template:IPA_audio_link.
This could be a data-* or class attribute, ideally directly on the anchor with the href to the source of the pronunciation ogg file.
Suggestions:
- data-type="pronunciation"
- data-type="ipa"
- class="ipa-src"
Where should we bring this up? WP:VPT?
Once that is done we can fix the pronunciation detection in the /page/media, /page/mobile-sections, and /page/mobile-html endpoints. (mobile-sections works but only because of a hack).