Archive for the ‘Computers and Software’ Category

The IPA Translation Widget: a wonderful impossibility

Tuesday, April 3rd, 2007

So, I’m somewhat obsessed with checking the statistics of who comes here, who gets referred from where, and what search terms they used to find me. Well, the other day, somebody came here from google searching for “IPA translation widget”. For those of you unfamiliar with the terms, a “widget” is a small program written for Apple’s Dashboard interface, and IPA refers to the International Phonetic Alphabet. What this person seems to be wanting was a widget that, like some existing translation widgets, could take a block of text and immediately turn it into IPA characters. For the first few moments, I thought “Wow! That’d be a great idea!”.

Now, as somebody who uses the IPA very, very frequently, such a thing would be wonderful if it worked well. However, I think it would be impossible to actually create a program that goes from English writing to IPA transcriptions without incredible advances in Artificial Intelligence and speech recognition. Here’s why…

Transcription, not translation

At the surface, this doesn’t seem so crazy. Apple includes a widget to do rough, automated translations with Dashboard, and although I never trust automated translations, it does alright for basic words and phrases. I suspect that our anonymous searcher saw that widget and thought “Wow, cool! I wonder if it can help me put something into the IPA”. However, the fundamental difference between translating a sentence into Spanish and putting that same sentence into the IPA is that the IPA isn’t really a language at all, but instead, it’s a method of writing sounds.

The International Phonetic Alphabet is really a set of symbols, each of which represents a sound, sound characteristic, or other element of spoken language. What the IPA allows a linguist (or speech pathologist, or teacher…) to do is to take spoken language and put it onto paper (’transcription’) with a great deal more precision than most other writing systems. The IPA isn’t a language in itself, it’s just an alternative, phonetic writing system for other languages. The beauty of this is that the IPA is designed to be able to be used not just for English, but for any language. The IPA symbols can be used to transcribe sounds not just from English, but from languages all over the world.

Broad vs. Narrow Transcription

The IPA can be used to transcribe sounds with two different degrees of precision.

If one takes advantage of all the symbols and diacritics, one can make a “narrow” or “phonetic” transcription. At this level, the linguist aims to capture all the detail possible about the word or phrase, including variations across word boundaries, sounds that occur in speech but are unnoticed or unrecognized by native speakers, and even features like intonation and pauses. From these transcriptions, a well-trained linguist could pronounce the words and phrases almost exactly as the speaker did, based simply on the transcriptions. The first, smallest line in the title graphic is a narrow transcription of me pronouncing the site’s title.

This degree of precision would be impossible for a modern computer widget to produce, simply because narrow transcriptions are based on actual words and phrases by a speaker, and really, one needs a fairly trained ear to make an accurate narrow transcription of a word or phrase. Sure, it could use a database of narrowly transcribed words from other speakers, but really, that’s not a narrow transcription. It’s not going to pick up on the variations that each speaker produces, like accents, vowel changes, unusual sound choices, or even tiny speech errors.

The alternative is called “broad” or “phonemic” transcription, expresses the basic sounds of a language or phrase, often more precisely than the native writing system, but at the same time, leaves out detail that’s not necessary to a native speaker. The middle line in the title graphic for this page is a phonemic transcription. Some dictionaries, including the built in OS X dictionary (if you enable IPA in Dictionary Preferences), can show you the standard american IPA Broad transcription form of a word.

Now, using a dictionary of words in a given language and their IPA equivalents, a computer could likely match things and give a passable broad transcription. However, there are variations that occur between people that show up even at a broad level, and are large enough to identify a speaker’s accent, dialect, or even idiolect. For some people (myself included), “caught” and “cot” have the same vowel, but for others, they’re two distinct vowels. So, even at a broad level, you’re not going to get any sort of reliable transcription of one’s actual speech from a computer widget, just a rough approximation.

Why are you transcribing anyways?

In the end, whether such a widget would be useful at all boils down to your reason for needing a transcription. Some people might be learning English and would want a better method of knowing how a given word is supposed to sound. For that, any good dictionary’s pronunciation key should do the trick.

Some people might be interested in the IPA, or want to know how a given word sounds. For that, they’d be better off getting a good phonetics textbook and learning a bit of the IPA themselves, along with some knowledge of phonetics.

However, our widget searcher might just be stuck in an introductory Linguistics course, having to transcribe their speech for an assignment. If so, I offer just one piece of advice: Don’t plagarize transcriptions off the web or from a dictionary. Your professor should have no trouble noticing if you’re not transcribing your own dialect, and everybody’s got a dialect.

Remember, if there’s one thing that phonetics professors are good at, it’s picking out a phone-y.

Using IPA fonts with Mac OS X: The Comprehensive Guide

Thursday, March 8th, 2007

As a linguist, you find yourself using the International Phonetic Alphabet (IPA) incredibly frequently. Some of the characters are easy enough to use without any special work (ŋ, ə). However, to get the more cool/obscure characters and diacritics, or to stack diacritics (placing, for instance, a tone marking above a nasal marking), you need special fonts, layouts and setup. In this post, I’m going to explain, as simply as possible, how to go about finding the files and setting this up, all without paying a dime for specialty software.

Getting the fonts and layout

The beauty of this method is that it uses software built into Mac OS X, and that you can use IPA fonts in any application that supports Unicode (translation: lots of them), not just specific programs. You also don’t need to install a separate program to clutter up your computer, just a few free fonts and a keyboard layout. So, here’s your freeware shopping list:

Necessary files:
1. Charis SIL IPA Font - The best free IPA font out there (in my opinion) because it has bold, italic, and all sorts of other characters outside of IPA. The download link is around halfway down the page, grab the file with “(Windows, Macintosh and Linux)” next to it. Thanks to the Summer Institute of Linguistics, it’s completely free!
2. The IPA-SIL Keyboard Layout for OS X - The only IPA Keyboard out there for OS X. It’s truly a wonderful thing, and completely free, thanks again to SIL. It says that it’s specific to Doulos SIL, but that’s a blatant lie, as I use it all the time with Charis. (I’d recommend the Version 0.6 Alpha on that page, not the more recent one. Although the more recent one works, it’s just a bit more complex. The instructions here are for the older, alpha version.)

Optional Files
Doulos SIL - A differently styled IPA font from SIL, missing the bold and italic forms that Charis has. Still free :)
SILIPA93 Fonts - These are desperately outdated, but occasionally necessary when reading other people’s old IPA.

Download at least the CharisSIL and the Keyboard layout, save them to your desktop (or a location of your choosing), and then proceed to the next step.

Power User’s Summary: Download CharisSIL and IPA-SIL keyboard Layout from the above links

Installing the font

Now, double-click the CharisSIL(version).zip file that you saved to your desktop. It’ll unzip into a similarly named folder on your desktop. Take the CharisSILfontdocumentation.pdf file and move it to a safe place, it’s a handy guide to have around, and feel free to take a look at the readme and license files in the folder.

Now, if you want to install this font for yourself and every other user on your computer, place the four font files from the folder (CharisSILB.ttf, CharisSILBI.ttf, CharisSILI.ttf, CharisSILR.ttf) along with any other fonts you’re installing into the /Library/Fonts folder. You’ll need to give an administrator password to install them into that folder.

To install for yourself alone, do the same as above, except by copying things into /Users/yourname/Library/Fonts. No admin access needed for this route.

Power User’s Summary: Install the font files in either /Library/Fonts or /Users/you/Library/Fonts

Installing the layout

Double click “IPA-SIL keyboard(version).dmg” on your desktop. Now click the newly opened “IPA-SIL Keyboard” Disk Image on the desktop and examine the contents.

The very first step is to save IPA-SIL.pdf! In fact, frame it. Wallpaper your wall with copies of it. Get a version tattooed on your chest. Just make sure you have it. Without this, you’ll have trouble figuring out exactly which keypresses result in which characters, and this method won’t work very well at all.

Now, drag BOTH IPA-SIL.icns and IPA-SIL.keylayout into either /Library/Keyboard Layouts or /Users/yourname/Library/Keyboard Layouts. As before, you’ll need Admin access to install in /Library/Keyboard Layouts. Also, you might have to create the …/yourname/Library/Keyboard Layouts folder if you’re installing for yourself only.

Once you’ve placed the files in the right folder, restart your computer.

Power User’s Summary: Save IPA-SIL.pdf. Drag BOTH IPA-SIL.icns and IPA-SIL.keylayout into either /Library/Keyboard Layouts or /Users/you/Library/Keyboard Layouts. Restart.

Final Configuration

Once you’ve restarted, go to the System Preferences Application. Click the ‘International’ preference pane, then, click the “Input Menu” tab inside the International Pane, and you’ll be presented with a window like this:

intl.jpg

In this window, make sure and select “Keyboard Viewer” (to see what symbols are where at a glance), “Allow a different input source for each document”, and “Show input menu in menu bar”. Also, feel free to change the shortcut to switch input methods to make things faster for you down the road.

Now, use the scroll bar to scroll through the list of options until you finally see “IPA-SIL”, and select it. It’s right below the Eskimo languages. See below:

intlipa.jpg

Now that you’ve done that, you should have a little American flag (which regrettably cannot be changed, even if you’re using a US keyboard outside of the US) in your menu bar. Congratulations! You’re now set up to use the IPA on your mac.

hɛloʊ wɜɹld!

To test it out, fire up any text editor (TextEdit, NeoOffice, MS Word, or my personal favorite, Mellel) and open a document. Be very sure to select Charis SIL for your font in the document.

Now, click the little menu in the menubar and select IPA-SIL:
ipamenu.jpg

Start typing and you’ll find yourself typing IPA symbols! You’ll slowly learn the reasonably intuitive set of keypresses (e.g: Shift+N = Angma, Shift+R = Alveolar Tap), and soon, you’ll be typing in IPA nearly effortlessly in nearly any application. You can even IM your linguist friends in IPA if they have the font as well.

The best part? Thanks to these free and open source fonts and layouts, you’ll never need to write a Word macro again on OS X. oʊ, wəɾə wʌndɛrfl wɜɹld!

EDIT: I’ve heard that sometimes, Word doesn’t play nicely with this sort of input method. I’d highly recommend that if you have troubles, you try using TextEdit (built in), Mellel, or the free Office suite for OS X, NeoOffice.

At the very least, you should be able to copy/paste your IPA text into a word document, or hopefully even make the switch entirely to a better word processor. Although MS Word may be the most well known word processor, it’s far from being the best, and I highly encourage you to check out all the options.

Praat is fixed for Intel Macs!

Monday, February 26th, 2007

A few months back, I commented that the Amplitude Bars in the Praat Phonetic Analysis software were broken on Intel Macs.

I’m very pleased to say that now, as of version 4.5.14, this has been fixed, and Praat is now back to full, Universal Health on the Mac OS (in addition to its windows and Linux versions). Thanks, David and Paul!

For those of you who might not be familiar with it, Praat is an open-source Phonetics program, recording short bits of sound, and producing spectrograms and waveforms which can be studied by the phonetically inclined. Here’s an example of a spectrogram and waveform of a sentence produce by Praat from a recording of myself saying “Phonetics makes me very, very happy”:
Phonetics

Praat is completely free, and it’s not Spyware or Adware. If you’re at all curious about it or want to check it out, I’d give it a download. Even if you don’t know much about it, it’s interesting to look at waveforms of spectrograms.

So, to the authors of Praat, thanks a great deal for providing this software, for making it free, and for keeping it up to date. It’s a wonderful tool, and I really appreciate it. :)