User:TheresNoTime-WMF/sandbox

Community tech has been working on generating IPA-to-speech as part of fulfilling the 9th most popular wish on the 2023 Wishlist — we're nearing a point where we'd like those with experience in editing templates (especially those such as Template:IPA & Template:IPA-en!) to start thinking about how to incorporate our work so that the wiki may benefit from the new functionality!

This is still very much in development, and things may break/change We are looking for your feedback and your help!

How is IPA displayed currently?

edit

Each wiki has its own IPA templates, but most appear to be similar.

Example: {{IPA}}

edit

For example, the {{IPA}} template, available on most projects in some form, has a simple syntax: {{IPA|həˈləʊ}}

Example: {{IPAc-en}}

edit

The more complex {{IPAc-en}} (and language variants), which is also available on a lot of projects, is formatted a bit differently: {{IPAc-en|h|ə|ˈ|l|əʊ}}

Phonos

edit

Phonos, the extension that we built as part of this work, is not a template however — similar to Score, it is a parser tag. Phonos generates the audio for an IPA string.

We've selected this as the tag's format:

'"`UNIQ--phonos-00000002-QINU`"'

For example:

'"`UNIQ--phonos-00000004-QINU`"'

These parameters have defaults, meaning that they do not need to be designated an explicit value, so contributors can drop the above syntax down to:

'"`UNIQ--phonos-00000006-QINU`"'

The above will render the audio for the IPA characters. Note however depending on the IPA, Phonos may have better rendering if you also provide the |text= parameter.

How might IPA be displayed using Phonos?

edit

Most wikis have IPA templates like {{IPA}}. To deploy Phonos to your wiki, you'll likely want to change this template to use the new Phonos parser tag, so that every page that uses IPA will start using Phonos. Let's take a simple implementation of the IPA template that merely shows styling:

<span class="IPA" style="…">{{{1}}}</span>

In this situation, we can replace the entire template with the Phonos syntax, something like:

'"`UNIQ--phonos-00000009-QINU`"'

Getting help

edit

If you need help deploying Phonos to your wiki's templates, please feel free to reach out to use at Talk:Community Wishlist Survey 2022/Generate Audio for IPA.

Community Tech invites contributors to have a play around with Phonos on the Beta Cluster (it's enabled on the beta English Wikipedia, and a few other beta projects) — some examples are at: