Downloading the Praat source code

Warning: you need the Praat source code only in the following cases:

  1. you want to extend Praat's functionality by adding C code to it;
  2. you want to understand or reuse Praat's source code;
  3. you want to compile Praat for a computer for which we do not provide binary executables, e.g. Linux for non-Intel computers, FreeBSD, HP-UX, SGI, or SPARC Solaris.

Before trying to dive into Praat's source code, you should be familiar with the working of the Praat program and with writing Praat scripts. The Praat program can be downloaded from www.praat.org.


1. Licence

All of the code is available under the GNU General Public License. Of course, any improvements are welcomed by the authors.


2. Downloading the archive

To download the latest source code of Praat, click on one of the archives:

praat5120_sources.zip (31 October 2009; 6.7 MB)
praat5120_sources.tar.gz (31 October 2009; 5.3 MB)

The code requires that your compiler supports C99.


3. Unpacking the archive

On most computers you can unpack the zip file by double-clicking. If you prefer to try the .tar.gz file instead, drop it on StuffIt Expander (on Macintosh or Windows) or use gunzip and tar xvf (on Unix).


4. Steps to take if you want to extend Praat

First make sure that the source code can be compiled as is. Then add your own buttons by editing main/main_Praat.c or fon/praat_Fon.c. Consult the manual page on Programming.


5. Compiling on Macintosh

Open the project praat.xcodeproj (which you can find on the disk image praat_xcodeproj.dmg) in Xcode, and choose Build or Build & Go. The project contains the target praat_mac (for MacOS X, on PowerPC or Intel processors). Praat includes QuickTime unless you #define the symbol DONT_INCLUDE_QUICKTIME.


6. Compiling for Windows

Open the project praat.mcp in Metrowerks CodeWarrior 9.0 or newer (on a Windows PC or on a Mac), and choose Make or Run. The project contains the targets praat_win (for praat.exe) and praatcon_win (for the console program praatcon.exe). Praat also seems to compile correctly with the MinGW compiler (on a Windows PC); in that case, you first copy the file makefiles/makefile.defs.mingw to the sources directory (i.e. where makefile is) and rename it to makefile.defs. You have to install the QuickTime SDK for Windows (if it does not work, #define the symbol DONT_INCLUDE_QUICKTIME).


7. Compiling on Linux

Install a Motif library (Xm.a) and the Motif include files. Then go to the sources directory and type

   cp makefiles/makefile.defs.linux.dynamic ./makefile.defs

Then type make to build the program.


8. Compiling on FreeBSD

Install a Motif library (libXm.a) and the Motif include files. Then go to the sources directory and type

   cp makefiles/makefile.defs.freebsd.dynamic ./makefile.defs

Then type make to build the program. According to Jason Bacon, one may "have to kill artsd to unlock /dev/dsp" in order to get audio playback to function.


9. Compiling on OpenBSD

Install a Motif library and the Motif include file directory, for instance as /usr/local/lib/libXm.a and /usr/local/include/Xm/. Then go to the sources directory and type

   cp makefiles/makefile.defs.openbsd ./makefile.defs

Then type make to build the program.


10. Compiling on SGI

Go to the sources directory and type

   cp makefiles/makefile.defs.irix ./makefile.defs

Then type make to build the program.


11. Compiling on Solaris

Go to the sources directory and type

   cp makefiles/makefile.defs.solaris10 ./makefile.defs

Then type make to build the program.


12. Compiling on HP-UX

Go to the sources directory and type

   cp /usr/lib/include/audio/Alib.h sys
   cp makefiles/makefile.defs.hpux ./makefile.defs

Then type make to build the program.


Back to the Praat home page.