streettore.blogg.se

Python praat script
Python praat script








  1. Python praat script how to#
  2. Python praat script windows#

Praat will execute the script my script.praat without showing Praat's GUI, i.e. "C:\Program Files\Praat.exe" -run "my script.praat"

Python praat script how to#

Now we are ready to discuss how to run Praat without a GUI. Calling Praat to run a script in the background This is because the script languages of the Console or Terminal use spaces for separating commands and arguments.Ĥ. Note that on all three platforms, you have to supply quotes around the file name if that file name contains one or more spaces, as here between my and script or above between Program and Files. Applications/Praat.app/Contents/MacOS/Praat -open "my script.praat" If Praat was already running when you typed the command, the script window will appear within the already running instantiation of Praat. Praat will start up, opening the script my script.praat in a script window. "C:\Program Files\Praat.exe" -open "my script.praat" To always start up a new instance of Praat, use -new-open instead of -open. Note that if you want to send messages or files to a running Praat, the best way (on all platforms) is to use praat -send (see below) or sendpraat (see Scripting 8. usr/bin/praat -open data/hello.wav data/hello.TextGridĪgain, if Praat was already running when you typed the command, the two files are added as objects to the existing list in Praat. Applications/Praat.app/Contents/MacOS/Praat -open data/hello.wav data/hello.TextGrid If Praat was already running when you typed the command, the two files are added as objects to the existing list in Praat. Praat will start up, and shows the two files as a Sound and a TextGrid object in the list. "C:\Program Files\Praat.exe" -open data/hello.wav data/hello.TextGridĪt least if your current folder (see the Console's cd and dir commands) contains the folder data and that folder contains those two files. "C:\Program Files\Praat.exe" -open data\hello.wav data\hello.TextGrid On Windows, you can open Praat with a sound file and a TextGrid file by typing On Linux, you type into the Terminal something like Applications/Praat.app/Contents/MacOS/Praat On the Mac, the executable is hidden inside the app file, so you open a Terminal window and type something like (including the quotes) if Praat.exe is indeed in the folder C:\Program Files.

python praat script

Python praat script windows#

For instance, on Windows you can start the Command Prompt window (the "Console"), and type Before describing how to achieve this (from section 4 below on), we first describe how the normal Praat, with its usual Objects and Picture (and perhaps Info) window, can be started from the command line.īefore seeing how a Praat script can be called from the command line, you should first know that just calling Praat from the command line just starts up Praat with its usual GUI (Graphical User Interface), i.e. You cannot use commands in your script that create windows, such as View & Edit. Information that would normally show up in the Info window, then goes to stdout, and error messages go to stderr.

python praat script

However, you can also call a Praat script from the command line (text console) instead. Previous sections of this tutorial have shown you how to run a Praat script from the Script window.










Python praat script