Jump to content

User:IagoQnsi/ipareader

From Wikipedia, the free encyclopedia

ipareader.js is a very simple script that adds a "🔈" button next to IPA pronunciations to have them read out by a text-to-speech program. It uses the backend provided by ipa-reader.xyz, which in turn uses Amazon Polly.

Installation

[edit]

If you're fine with the default voice (Salli), you can install ipareader.js by editing Special:MyPage/common.js and adding the following code on a new line:

importScript('User:IagoQnsi/ipareader.js'); // [[User:IagoQnsi/ipareader.js]]

If you'd like to customize the voice, you can do so like this:

window.ipareaderConfig = { voice: 'Salli' };
importScript('User:IagoQnsi/ipareader.js'); // [[User:IagoQnsi/ipareader.js]]

Simply replace the text "Salli" with any of the voice names provided by Amazon Polly; see the full list of voices on Amazon's website.

Troubleshooting

[edit]

Audio isn't playing? If you have an ad blocker on, it may be blocking the requests made by this plugin. Try disabling your ad blocker on Wikipedia, or adding "iawll6of90.execute-api.us-east-1.amazonaws.com" to your ad blocker's whitelist.

Source

[edit]

The code can be found at User:IagoQnsi/ipareader.js. It is available under the MIT License.