Category Archives: Software

These include all my posts of software tools – mostly intended to our my research community

TreeForm for Windows reverted to version 1.03

Apologies to all Windows users, but my revised version of TreeForm does not seem to run on your system due to the fact that Java developers have effectively ruined internationalization for windows runs. It will be a least 1 month before I can even begin to have time to address this issue.

I now have SourceForge automatically send you version 1.03 (as if you are running Windows, and that one should work for most users still. Apple users still benefit from the new and improved version.

Apologies for the inconvenience.

TreeForm updated to 1.1

After 11 years, I have finally written a new update to TreeForm to address the issues people have been having with incompatibility with newer operating systems. This version of TreeForm is also a LOT easier to run and install. On Windows and Linux machines with Java Installed, you can just click and run the JAR file directly – all the menus and help screens are incorporated directly, and the file runs anywhere. This helps a LOT with university computers where you often are not allowed to install software.

On Macs, I have provided a package that will install the software. It still requires permission through the “security and privacy” tab of “system preferences”, but after that it will run, even on the Mojave operating system. (If anyone knows how to get Apple to let this app install without activating their “gatekeeper” program, please let me know. I really do not enjoy Apple’s war on open-source programs.)

This version also fixes the color chooser bugs that Oracle inadvertently introduced, allowing color choices to be available again. I have also updated the help, about, and what’s new screens. Lastly, I disabled the custom look and feel – TreeForm now obtains the operating system’s look and feel, and so is slightly different on each system.

You can always find TreeForm at SourceForge, and I will soon put the new source on gitHub.

Ultrasound Video and Microphone Audio Capture

This is a simple set of one-line scripts for capturing ultrasound audio and video.

I built it to work as batch files through the WINDOWS OS command-line because that’s the OS that seems to give me the highest frame-rate. (I use macs, and this works with the windows OS booted from bootcamp).

Look at the README file to make sure you use the scripts properly.

As always, contact me if you have issues.



Crop and Segment Video

Here I offer you a program that will scan through all of the PRAAT textgrids in a folder, and for each it will search for the named textgrid tier.  Then it will loop through each segment in that tier, find the ones with text in them, and cut clips from a video with the exact same base-name based on those time stamps.  Each video will be cropped to the region given in the cropping variable (currently set for the Logiq E ultrasound).

The program uses R as a wrapper to load PRAAT textgrid files, uses a PERL program (copyright Theo Veenker <>) to make a CSV file usable in PRAAT, and work with that data.  

Therefore: 1) You have to extract audio from the video file you want to crop and segment, and transcribe and label that video in a PRAAT textgrid to the detail you want to use for each cropped video file (usually a word or phrase). 2) Go into the code, and change all the variables at the top according to your needs.

Lots of work, but this program will still save you heaps of time.  It is especially useful if you are using AAA for ultrasound analysis but only have video instead of AAA’s proprietary ultrasound file storage format.

Note, I provide sample data in the zip file to test the program – a swallow used for a palate trace.  Get the program to run with the sample before you modify it for your own purposes.

Aligning Audio and Video

Dealing with video files is just about the most obnoxious experience a researcher can have.  I wasted a *year* of research getting this one wrong before I realized the only, and I do mean only, effective solution involves FFMPEG.  Here I offer you a program that will re-align every video held in one directory and for which you have alignment data.

The program uses R as a wrapper to load a .csv file that contains the meta-data on a directory of video files that you want to align. 

Therefore: 1) You have to hand-check the audio-visual offsets for each file, and put that into the .csv file. 2) You also have to make sure you have installed FFMPEG, SOX, PERL, R, and the R modules “reader” and “gdata”. 3) You have to look inside my R-code and change the paths and extensions to make the program will work on your computer.

I provide a sample video with a swallow used to obtain a palate trace.  Get the software to work on your machine with this sample before modifying the code for your project.


Phoneme Quality

I rewrote a PRAAT script – shamelessly edited from Mietta’s amazing original – but modified to work well on both MAC and PC.  The scrip opens all the WAVE or AIFF files and matching textgrids, and take a look at the relevant tier (defaults to 3) to extract duration, f0 (pitch), F1, F2, F3, cog. The PRAAT script and readme file are located here

Mietta Lenne’s scripts, for those who don’t know, seem to be on Github these days.

Minimal Pairs

I wrote this PERL script in order to output minimal pairs from a document.  To use this properly, you need to take a document and save it as text.  Then you need to substitute items in the text so that each phoneme has a unique ASCII code.  I highly recommend a key-item pair so you can convert the text back and forth as needed.

Then make sure that PERL is installed on your computer.

Then, from your command-line, go to the directory with both this .pl file AND your text file, and type in the relevant information in this format:

perl {input.txt} {output.txt} {difference} {minimum size}

difference should be kept at 1 unless you want non-minimal pairs (not well tested)

Minimum size represent the minimum word size you wish to capture.

Output will have columns of the minimal pairs with the structure

minimal pair 1 | minimal pair 2 | phoneme 1 | phoneme 2