Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: Add a play button next to IPA on Wikipedia (chrome.google.com)
136 points by rusbus on June 28, 2017 | hide | past | favorite | 61 comments


Kudos on a useful concept. Some feedback: Alternate pronunciations seems to go a bit wonky. For example it pronounces Ribosome [1] (/ˈraɪbəˌsoʊm, -boʊ-/) as ri-bo-some-bo :). Overall quite a nifty tool as many wikipedia pages do not have native pronunciation recordings. Could also see it helping casual learners of IPA.

[1] https://en.wikipedia.org/wiki/Ribosome


You confused me quite a lot! Why did you "transliterate" /soʊm/ as "some"? Is there a dialect of English where "some" is pronounced as /soʊm/ and not as /sʌm/ or /səm/?


Likely "some" as in "home", not as the real English word "some"


Yes, that's exactly right. Sorry for the confusion lambdadmitry!


OP here. Nice find -- I'll add handling for alternative pronunciations soon :-)


This would make a good addition to mediawiki itself. Have you considered trying to contribute it to the project?


Agreed completely; this should be natively available in Wikipedia itself.


Ha! I Tried it with a couple names from my own language and it clearly is using an english TTS sound library. The pronounciation is better than you would get from a computer reading the name like an english word, but it's funny that even a language-neutral script such as IPA gets read with an english accent.


Accents can be (and many times are) specified in IPA scripts, so if the speaker carries an accent that isn't in the content he/she is reading or ignores any of the explicitly specified accents, then the pronunciation is wrong.


FWIW as well, linguists use different styles of IPA too, depending on the language families they most often work with.

Because of how it is used, IPA isn't really the 'one true standard' many would think it is.


That's the difference between a phonemic and phonetic transcription [0]. The former is bracketed with slashes (//), and the latter with square brackets ([]). To use Wikipedia's example:

Phonemic transcription of English "pot" is /pɔt/, and "spot" is /spɔt/. However, a phonetic transcription is closer to [pʰɔt̚] and [spɔt̚]. Note the addition of aspiration on the initial /p/ in "pot", and marking the /t/ as unreleased in both. But you don't need to differentiate stop aspiration in English, because they are conditioned allophones. And all final stops in English are unreleased, so you don't need to mark those phonemically either.

Basically, your first sentence is entirely correct, but your second sentence is a bit inappropriate. It serves it's purpose of a standard, but you must keep in mind that most transcriptions are not phonetic but phonemic. And a phonemic reading is not meant to be independent of the language -- there are plenty of languages for which [p] and [pʰ] are not allophones and must be distinguished in even a phonemic reading. You should be familiar with the phonemic conventions of a language in order to actually render a phonetic reading.

And even then, a phonetic reading will be dependent on things that boil down to individual speaker differences. That is, there is not any standardized, singular mapping of a phonemic transcription to a phonetic one, in either direction.

[0] https://en.wikipedia.org/wiki/Phoneme


Something interesting I noticed here:

> Phonemic transcription of English "pot" is /pɔt/, and "spot" is /spɔt/.

Your use if this particular IPA indicates that you speak a dialect that has undergone the cot-caught merger, which probably means your accent is from Scotland, the western half of the US, or the Boston area. If you didn't, then you'd transcribe those words as /pɑt/ and /spɑt/ if you spoke a dialect with the father-bother merger (most American accents) or /pɒt/ and /spɒt/ if you spoke a dialect without it (many English accents, including RP).

I'm leaning towards you being Scottish, since Scottish English tends to merge them to [ɔ], while American dialects with the merger tend to merge them to [ɑ].

This goes to show that IPA transcriptions are heavily dependent on dialect.


I did transcribe it wrong; it's phonetically [ɒ] for me -- cot-caught is in effect.

Though this does give opportunity to point out that even phonemic transcriptions can have dialectal differences. There is no one phonemic transcription for English, as the different vowel mergers mean that minimal pairs differ between groups. This kind of variation tends not to happen as much with consonants as vowels, which make them much harder to transcribe even phonemically. But, for example, here's a list of mergers for non-rhotic dialects:

https://en.wikipedia.org/wiki/Rhoticity_in_English#Mergers_c...


There is also a liiiiitle difference between RP's and SA's [i] and [ɪ] (IPA sounds are "areas", not "points"), as well as a difference in tenseness (British is generally more tense).

So yeah, IPA doesn't completely specify how things sound.


I am working with IPA annotated contents and I have linguists in my team. I understand your point (or at least I think I do), but I don't entirely concur. IPA tries to very accurate and thus covers all languages (even the click consonants used by some endangered African tribes). When you have this kind of precision employed in the context of a given natural language, you get the problem of having multiple phonetic transcriptions for the same word or syllable, all valid because from the prospective of a speaker of that language all sound the same. Yet, only one option is the closest to the pronunciation formally supported by a given authority. All you can do is to pick that one when you have to provide, and to just tolerate all the rest when you have to accept. I can hardly imagine something better than what IPA is already offering without loosing the neutral nature, so I'm yet to find valid critiques at IPA's address.


How does this work? Where does the audio come from? Does it use some database of recorded IPA sounds, or does it convert from text to speech on the fly?


Judging from the source (viewable with Chrome extension source viewer [1]), it's POSTing the IPA text to https://www.ipaaudio.click/audio as the `ipa` key of a JSON object, the server does the heavy lifting and sends back an audio buffer, which the extension sends to a WebAudio context.

It'd be neat to know what exactly the server is doing, though.

[1]: https://chrome.google.com/webstore/detail/chrome-extension-s...


OP here! I'm using Amazon's polly API which lets you convert IPA directly to audio


From what I can tell, it's bending an english TTS engine to make it pronounce IPA sounds


It seems like once I push the play button I can no longer push the button again.

Console Error: ipa.js:38 Uncaught (in promise) DOMException: Cannot decode detached ArrayBuffer

Chrome 59.0.3071.115 (Official Build) (64-bit) Mac OS X


Fixed. Thanks for your bug report!


Another great tool to anyone that likes Wikipedia, but hate to go back & forth between pages, or having multiple tabs all from Wikipedia.. I've developed this with a friend, and never got the time to distribute.. Free, made with love to UX and usability :) Enjoy WikiLinks https://chrome.google.com/webstore/detail/wikilinks/cdlabbcf...


Wikipedia is actually developing that natively currently as well: https://www.mediawiki.org/wiki/Beta_Features/Hovercards.


Is this add-on also available for Firefox?


You can use Chrome Store Foxified [1] to install the extension in Firefox. I just tried it, but I'm getting a `TypeError: NetworkError when attempting to fetch resource.`

[1]: https://addons.mozilla.org/en-US/firefox/addon/chrome-store-...


Imported it as a temporary add-on and it worked without any configuration.

I'm not going to reupload this work to the AMO for it to be signed for distribution though. Limitation sucks also


+1

The idea is great but some more love for ffox users would be nice :)


I think the idea behind the new "WebExtensions" is precisely "write once - run everywhere". But I don't know if this add-on is one of them.


IPA (international phonetic alphabet)


Thank you. My immediate trained response was India Pale Ale.


This is a great feature that has been missing for so long. Can't help but feel that IPA will go the way of cursive once tools like this propagate.


Adding to what Xophmeister said, IPA isn't just a notation, it's also a tool of thought. First, to efficiently quantize the stream of sound you need mental "buckets" to put the sounds to, and IPA provides your those buckets. Second, it may seem as if we hear "objectively", but in fact what you hear is very much affected by your language upbringing; for example, a ton of Americans can't really differentiate "pin" and "pen" even if the words are pronounced as in Standard American — they don't have a concept of the sound needed. IPA gives you those concepts.


That's a terrific way of putting it! Maybe we can say that IPA reminds of the challenges that are still out there for us in terms of distinctions that we overlook and sounds that we can't produce.

For example, I haven't learned to distinguish /pʰ/ and /p/ or /bʰ/ and /b/, as Hindi does, but thanks to IPA, I know that that issue exists and maybe I can learn it some day. Also, I haven't learned to say the consonant at the beginning of a Chinese friend's name (I think it's [ʈ͡ʂʰ]), and IPA helps remind me that [ts] and [tʃ] are just approximations to it.


Exactly! Moreover, even if I didn't learn the exact sound you are talking about, I can sort-of approximate it in my head. To be able to "transmit" sound in text is a proper super-power I would say, not too far from what Arrival pictured :)


> Can't help but feel that IPA will go the way of cursive once tools like this propagate.

IPA is necessary in phonetic and phonological research. You need a way to transcribe and abstract sounds consistently; you can't just submit a recording, along with your paper, to a journal.


Fair, perhaps the cursive analogy is too strong, though I'm sure that cursive still has a role in research of historical documents. IPA still has an important role in specialized situations, but I don't quite think it's something that should be known for the general public (e.g. the average wikipedia reader).


There are still languages with no writing system of their own out there (or with a borrowed script that does not necessarily fit their sounds very well). IPA is not perfect but quite relevant for research and language documentation.



This is awesome! I can't tell you how many times I've clicked that link expecting it to take me to something more specific about pronouncing the word rather than just a generic page about IPA.


Nice idea! I would also like a transliteration of IPA into pseudo-english (like francais = frahn-say). Most people don't know IPA well enough, and sometimes I don't want to or can't listen to audio. Also I find sometimes, having it written out helps with comprehension.

(While we are at it, can people please start "transliterating" names from languages that use the latin alphabet in very different ways, like "Saoirse (seersha)"? And liberally using hyphens to break up longer foreign words? I know everybody is proud and feels well educated when they can pronounce foreign names, but I think there is no shame in using pronunciation aids.)


> I would also like a transliteration of IPA into pseudo-english

Wikipedia already has a respelling key for this purpose. English orthography is such a mess, though, that I wouldn't trust a machine with this task. And even a human can't get around the problem that many pronunciations simply can't be expressed in “respelled” form, because they violate the rules of English phonology. That doesn't necessarily mean they're hard for English speakers to pronounce, but it does mean that trying to spell such words as if they're in English will get you nowhere.

And that's before we get to the issue of different accents!

> can people please start "transliterating" names from languages that use the latin alphabet in very different ways

No. Transliteration doesn't exist to make words from other languages pronounceable by English speakers, it exists to express a word in a different script. Focussing on English speakers would sacrifice important nuances, like maintaining phonological distinctions English doesn't have, or the ability to convert back to the original script losslessly. For example, Mandarin Chinese has at least two different consonants that sound like “sh” to an English speaker, and at least four that sound like “ch”, but the distinction between these is critical to Chinese speakers, and if we “transliterated” them to just “sh”/“ch”, we would end up with large numbers of homographs, and the transcription would be useless to Chinese speakers.

Also, what you're describing is the job of transcription, not transliteration.


Well, I think a respelling key is better than being not able to pronounce it at all.

I recognize parts of IPA, but I frequently forget the sound of some characters, and can't reproduce arbitrary IPA with confidence. I think if you haven't learned it properly, and use it regularly, its somewhat impractical.

Mandarin is an interesting example. I found Pinyin really intuitive (as an English and German speaker), and once you get used to some quirks (like x vs sh, or q which is more like english "chi" than english "qu", or i and e that sound much more schwa-like than I'd expect), it is fairly easy to pronounce most words (provided the tone marks are indicated. Official signage in China usually omits them for some reason).

And I know the difference between transcription and transliteration, that's why I put transcription in scare quotes. What I mean is, lets pretent Irish words are not written in Latin, but in ... Lotin (which looks 100% like Latin but is completely different :-)), and then treat it like Cyrillic. I have less problems reading Russian or Arabic or Greek names, compared to names writen in other Latin-alphabet languages - because most transliteration schemes try to preserve at least some familiarity for west European language speakers (unless it is Klingon, or Wade-Gilles...).


As someone who can read IPA I'd rather have it the other way round (which unfortunately is not possible because it's not an injective relation).

It's bewildering even serious dictionary publishers now predominantly use pseudo-English transliteration in most of their products.

You can't really learn proper native pronunciation from such transliterations. They are an approximation at best (IPA is too, if you take accents into account but even then it's much more exact).


Oh yes, I'm looking forward to descriptions of pronunciations like 'rhymes with tomato'. English, with its myriad of accents, is an awful language to transcribe anything into.

Moreover, having these pseudo-English transcriptions may leave people with a false impression they know how to pronounce something, while in fact using these transcriptions with naïve English phonology still leaves you incomprehensible (or at best very grating) to native speakers. Something something 'a little knowledge is a dangerous thing' something something Dunning–Kruger something something.

Better just learn IPA yourself. Seriously.


I (an Irish person) wouldn't pronounce Saoirse as "seersha", more like "sayr-sha". And in Ireland the pronouncation of the name is pretty well understood. Would you phonetically spell out American names like Barack, or Hillary? Or just foreign ones?


To be honest, I just copied that from some other site, because I can never remember how to pronounce that name.

I guess I would just spell out names the given audience is likely to mispronounce - although you could argue to do it with every name, like one newspaper always mentions who a person is, no matter how famous ("bla bla, Donald Trump, president of the United States, bla bla Joe Schmoe, plumber from Virgina")


That's an interesting example, given that there are plenty of people who pronounce our former President's name to rhyme with "rack"...


The problem with transliterating names is that there often isn't only one way of pronouncing them.

For example, every Saoirse I know pronounces it "sur-sha".


Does "français" really sound like "frahn-say" to monolingual English speakers? It has always sounded more like "frahn-seh" to me, but that may be because I also speak Spanish. There's a recording of the word here: https://en.wiktionary.org/wiki/Français

It's not an isolated example. For instance, "chez" is pronounced "shay" in English but in French it sounds more like "sheh" to me.


According to Wiktionary it's /fʁɑ̃.sɛ/. So like the English word "set" without the -t. Even including an "n" is not correct; it nasalizes the vowel. This is why English-like transcriptions can only take you so far. There's only so many sounds in English, and when languages start using ones that don't exist, it's impossible to bridge that gap.

As a monolingual English speaker until college, I have had a terrible time with distinguishing some word-final diphthongs. For instance, I catch myself using the English "-o" /oʊ/ in Spanish, when it should be just /o/. I also have a hard time with /e/ vs /eɪ/.


The point of using a simple respelling is to show it is not pronounced "Fran Kice". Anything better than that is an improvement.

"say" and "seh" sound pretty much the same to me, but I'm not a monolingual English speaker, I grew up in Germany and the US, and I might also mix up things.

I find the first syllable harder to describe, since there is no way to note these nasal sounds in English (actually, I think they should be called anti-nasal, since no air goes through the nose when I say it, but I disgress). But I think in general, some basics of French pronunciation are known to most English speakers, so using a French word is a bad example.


Are you making 'seh' rhyme with 'meh', or mostly with 'say', but saying it's subtly different? (If only there were some sort of phonetic alphabet eh...)

I would say it's most like the long 'a' in 'fate' or 'mate'.


I did mean rhyming with "meh", not a long "a" at all! In IPA, I'd say it's ɛ, like the vowel in the English word "bed".

So it really sounds like "a" to you? Huh.


Oh, interesting.

It does, yes, but as I alluded to that differs from 'ay' in which I'd linger slightly more on the end 'y' note if you see what I mean.

Less extreme than the way Americans linger on a syllable-ending 'r', but the same sort of thing.


IIRC that vowel is /e/, which is neither really /ɛ/ ('eh') nor the diphthong /eɪ/ ('ey'). And that quite neatly illustrates the problem with shoehorning other languages into English phonology and spelling.


I see the button and it has mouseover text, but it's not actually clickable. Chrome Version 59.0.3071.115 (Official Build) (64-bit) on Windows 7.


Ah! Nice find. I need css to make it a pointer. Will push a fix for that. You should be able to click the button anyway to hear the audio.


This is amazing, I have wanted something like this for over a decade. I check for something like this every few years. Thanks for making this!


somewhat related: is there an extension that, upon mousing over hypertext linked to a wikipage, gives you a preview or summary of that wikipage? I feel like this would be incredibly useful.


Would this work for Firefox, or does it rely on a Chrome-only TTS API?


Should work fine in FF




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: