My friend Erin Dowd, and cook, among other things) who spends her days thinking about things like phonological inventories and has better Mandarin pronunciation than I do, shot me an email last week.

I was using Praat for a paper I'm writing, and I thought you might like to play with it, especially if you're still trying to change your accent. I use it to analyze formants in sound files, but it's got a lot more functionality that I haven't explored.

Praat is an open source phonetic analysis suite developed by Paul Boersma and David Weenink at the University of Amsterdam. It's GPL(v2) licensed, ridiculously cross-platform (Mac/Win/Linux/FreeBSD
- but also SGI/Solaris/HPUX), has been around since at least 2007, and is still under active development (the latest version was uploaded on April 15, 2011, which is 4 days ago as of this writing). There's no public version control repository - I've emailed them about that - but you can download the source tar and dig around; it's mostly C++.

It's fun to play with. I know Praat's intended for speech analysis, but couldn't resist playing some guitar into the microphone (on the theory that the guitar - even with its many harmonics - would produce purer frequencies than my speaking voice). And you can see it picked up on the short 4-step ascending and descending scale I played before I confused with with chords at the end - the blue line in the bottom graph (the spectrogram) goes up and down in sync with the notes of the guitar.

Voice data was even more fascinating. I've been trying to work on my "deaf accent" for several years now, and Erin's been amazing with helping me explore that whenever we get to hang out together; she'll notice strange little things nobody else does. It was her observation that the "accent" decreased when I tilted my head back that eventually led to the discovery of how to control my oral-nasal resonance, which makes me sound a lot less deaf when I remember to do it.

Pratt - which has a ton of features I don't fully understand - is sort of a computerized Erin. In addition to plotting the spectrogram, it gives you pitch contours (in blue), formants (red), and intensity contours (yellow) - and all of these can be manipulated. Oh, and you can annotate the images with phonemes and words pronounced if you want. The graph below is for the spoken words "hello, world!" (what else would I say)?

Erin suggested using Praat as a beefed-up version of language software that "trains" your pronunciation to be like a native speaker's. Plot your voice, see how close you are to average formant values in a phonological inventory for your desired accent, plot again, do it again until you hit it right.

She showed me an interesting variant on this theme; Praat can also manipulate the formants, intensity curves, pitches, etc. of audio waveforms, meaning it can take your voice and change your intonation, accent, etc. So these researchers took second-language learners, recorded their voices in the target language (where they had an accent), used Praat to transform the learners' voices into non-accented speech, and gave them back their "perfect" pronunciation records to imitate and measure themselves against. Holy cow, I thought. I could hear myself with a perfect American English accent. Or gorgeous Mandarin pronunciation. Or...

I'd love to see this made into a language-learning game. Imagine the possibilities! Pronunciation training like this could blow away any of the "speech recognition" functionality in commercial language-learning software currently on the market; instead of matching against one native speaker's recording (no matter how hard you try, you'll never sound like someone else), you could norm your own voice into an accent-average compiled from data from thousands of native speakers, and match against that. When combined with something like librivox, an initiative to make open-licensed audiobooks from public domain works like Project Gutenberg, the by-products of language learning could actually accelerate the building of a shared cultural library. Anyone looking for a software engineering, game design, linguistics, or signal processing project?

Praat is, by the way, not yet packaged for Fedora.