Extension:Phonos

The Phonos extension is a Community Tech project for implementing the IPA Audio Renderer wish from the 2022 Community Wishlist Survey.

Configuration parameters

 * $wgPhonosEngine: Which engine to use. One of  (default), , or.
 * $wgPhonosApiEndpointLarynx: The API endpoint to use for the Larynx engine.
 * $wgPhonosApiEndpointGoogle: The API endpoint to use for the Google engine.
 * $wgPhonosApiKeyGoogle: The API key for the Google engine.
 * $wgPhonosApiProxy: HTTP proxy to use for API requests. If not set, will be used.

Usage

 * This section describes functionality that is still being developed as of August 2022.

Phonos adds a parser function that will render a speaker icon and the IPA text. Clicking on these will play the appropriate audio.

The parser function has the following structure; all parameters are optional but at least one other than lang must be provided:


 * ipa — the IPA notation to render. Some engines may perform better with or without brackets around the string.
 * text — the plain text representation of the string, used by some engines to improve the rendering of the audio. This text will be displayed if there is no ipa given.
 * wikidata — ID of the Wikidata item or lexeme from which to fetch (if ipa is not used) and/or  (if file is not used).
 * file — The filename of an audio file to use instead of any engine-generated or Wikidata-retrieved audio.
 * lang — the language code, used to help the engine have better pronunciation and/or to choose the correct information from Wikidata (via a qualifier on either of the above properties). This defaults to the content language of the page the parser function is used on.