Praat Signal Processing
Some utility scripts that could be useful in signal processing and analysis with Praat.
Download the scripts of this page via GitHub.
Check out Praat script guide for the tips of using Praat scripts.
addBabbleNoise

This script adds the bubble noise (babble.wav, attached in the same folder) to the selected sound object.
Select a Sound object and run this script. A new Sound object with the bubble noise added will be created in the object list.
addWhiteNoise

This scripts adds white-noise to a signal (input) with a specified signal-to-noise ratio. The average intensity of the signal will be set to to a specified value by the user (set to 0 to keep intensity of original).
Select a Sound object and run this script. A new Sound object with white noise added will be generated.
function_AM

This script turns a sound into an amplitude modulated (AM) sound with a carrier frequency specified by the user.
Select a Sound object and run this script. The output will be a new Sound object with the orginal signal modulated by a sinusoid with the specified frequency.
function_averageIntensities

This script applies the mean intensity (in dB) of a number of selected Sound objets to each of the selected Sound objects.
Select a Sound object and run this script. A Praat Info window pops up to show the result computed.
function_chimerize

Written by Volker Dellwo (volker.dellwo@uzh.ch), Lei He (lei.he@uzh.ch) and Elias Pellegrino. This script exchanges the envelopes between two Sounds. You can choose the number of frequency bands from which the envelopes are taken.
Input: two Sound objects (selected).
Output:
(a) a new Sound object containing the ENV of the other sound
(b) a new Sound object containing the TFS of the sound ([soundname]ENV[soundname-other])
function_create_P2P_tier

This script creates a TextGrid (based on a sound) which contains peak-to-peak intervals.
Select a Sound object containing speech, the output will be a TextGrid containing the details of the peaks.
function_createAverageSignal

This script produces an average of a number of selected sounds.
Select the Sound objects (two or more) that you want to average. The output will be a new Sound object which is the average of the original Sounds.
function_createIsochronousSpeech

This script creates speech with isochronous intervals based on any labelled tier (e.g. segments, syllables, CV-intervals, etc.)
Input:
A Sound with a corresponding TextGrid that contains sensible intervals (like segments, syllables, etc.)
Output:
A new Sound with a corresponding TextGrid in which the intervals are isochronous, apart from intervals labelled as speech pauses. New interval duration is the mean duration of all non pause intervals. This mean can be adjusted by the duration ratio.
Instructions:
Select a Sound object with the corresponding TextGrid Object in the list of objects.
Execute the script.
Parameter settings:
tier: chose which you tier you want to turn into an isochronous tier (must be interval tier)
silence label: write the label for speech pauses - these intervals will be disregarded. Note: if left empty, all empty intervals will be disregarded. If no pause label is chosen, pauses will be included in mean calculation which can obscure mean values strongly in case of very short or long pause intervals.
output file siffix: a suffix that will be added to your output Sound and TextGrid names
duration ratio: Will change the overall duration ratio of your intervals compared to the input signal (duration will be multiplied by duration ratio, i.e. duration ratio >1 will make signal longer [slower]; < 1 will make them shorter [faster]).
Tricks:
if you want to see the intermediate objects that are being created then silence the second last line (removeObject: [...])
function_docover

A decover is a function that removes the amplitude envelope of a signal and maintains the signal temporal fine-structure only. The name has been derived from Vocoder by spelling 'vocod' backwards. A vocoder is a function that somehow does the opposite. It maintains the envelope of speech and fills it with a different temporal fine-structure.
This script is based on the the noise vocoder script by Micah Bregman, Aniruddh Patel, Timothy Gentner downloadable under here. The process to extract the Hilbert signal has been adopted from a script by Lei He and Volker Dellwo.
Select a Sound object and run this script, you will then get a new Sound object which is described as above.
function_durationalMorphing

This script applies temporal manipulations to speech sounds based on duration tiers extracted from TextGrids.
Select 2 Sound objects and 2 TextGrids (timing annotations for the 1st and 2nd Sound respectively) and run this script. The output will be 2 Sounds where the timing is adjusted according to the specified morphing direction, and 2 TextGrids reflecting the duration changes used for the manipulation.
function_FM

Select sound object in Praat list of objects and run the script. There will be a new sound object containing the frequency modulated input sound.
function_hilbert

This script splits a sound at fixed duration (speechDuration) and inserts silences of a fixed duration (silenceDuration) between each speech interval. The script can be used to replicate some of the stimuli in Ghitza, O. and Greenberg, S. (2009) On the Possible Role of Brain Rhythms in Speech Perception, in: Phonetica (66, 1-2), p.113-126.
Select a sound object (ideally chose a sentence utterance), execute the script. After execution, there will be a new sound with a corresponding TextGrid. The sound has been changed in duration by durationFactor (typically between 0.02 and 0.12 seconds). And contains the inserted silences of 'silenceDuration' duration at 'speechDuration' intervals.
Note: The new Sound and TextGrid are selected when the script finishes. The names include information about the durational chance (duration), the speech interval duration (speech) and the silence interval duration; all time information is in milliseconds.
function_normalizeIntensity

This script normalises the intensity of a speech sound disregarding silences. Silences must be indicated in a TextGrid.
Select a sound object containing speech, and a TextGrid containing silences. The output will be a sound object in which the concatenated speech intervals that are normalized to the specified intensity.
function_rotatePitch

This script rotates the pitch contour around its average.
Disclaimer: The pitch contour will be perfectly rotated, however, re-synthesising a speech recording with an rotated contour does not always lead to the expected output. If you can, use the pitch contours only.
Select a sound object and run the script. You'll get a new Sound object with the effect applied.
function_rotateSpectralBands

This script shifts a spectral band by a specified frequency using a technique based on amplitude modulation.
Choose a sound object and execute this script. You'll get a new Sound object with the effect applied.
function_sinewaveSpeech

This Praat script generates sine-wave speech (SWS) by synthesising up to three sine waves based on the formant frequencies of a selected sound.
Select a sound object and run this script.
function_speechCompression

This script produces speech that is infinitely peaked clipped (ipc) and reapplies the amplitude envelope (env) to the ipc signal. When executed on a sound object the script produces three new files:
1: Sound ENV: the amplitude envelope of the signal,
2: Sound IPC: the infinitely peak clipped signal,
3: Sound IPC_ENV: the infinitely peak clipped signal with the amplitude envelope reapplied.
Some details of the settings:
Envelope frequency: maximum frequency of the amplitude envelope (default: 30 Hz).
Silence threshold: amplitudes smaller than this value will be set to 0.
ipc method I: binary method scaling signal between 0 and 1. Silences are counted to 0. This method produces a positive waveform only.
ipc method II: binary method scaling signal between -1 and 0. Silences are counted to 0. This method produces a negative waveform only.
ipc method III: binary method scaling signal between -1 and 1. Silences are attributed to -1. This is the preferred method.
ipc method IV: Tertiary method scaling signal between -1, 0 and 1. Low level noise is attributed to 0. This method can be problematic because it produces intervals at 0.
Smoothing: To smooth the sharp edges of the ipc signal this method can be applied. Not recommended to use together with De-emphasis as this results in a similar process.
Pre- and de-emphasis: Licklider and Pollack (1948, JASA[20,1], 42-51) suggest to preced ipc with a pre-emphasis filter and de-emphasise again post ipc processing for best intelligibility. The de-emphasis however, results in a non-flat envelope. It has been found that however, results in a non-flat envelope. It has been found that follwoing settings are recommended:
pre-emphasis = 1andde-emphasis = 0.
function_vocoder

Noise vocoder based on a script by Micah Bregman, Aniruddh Patel, Timothy Gentner downloadable under this link.
The present version was adapted to the current Praat version (6.0.29) (of script creation) by Volker Dellwo (volker.dellwo@uzh.ch) with the following innovations:
The object removal commands got changed so that the script does not remove previously existing objects in the list of objects in Praat.
The stack processing procedure got removed. The script can now be carried out manually on a Sound Object in Praat and can easily be implemented in a stack processing procedure by the following line:
runScript: "[path/]vocoder.praat", [number of bands], [lower cutoff], [upper cutoff], [clean up list of objects]A form got included to make it easier to change variables manually or when passed on in through a stack processing procedure.
Select a sound object containing speech before running the script. The output will be a new sound object of the vocoder speech.
function_voiceSplitter

This script processes a selected stereo sound by splitting its channels and applying alternating muting or noise insertion in short windows of specified length.
Select a stereo sound object and run this script. The output signal will be the left- and right- channel one respectively, from the selected sound object.
stack_normalizeIntensity
This script sets the intensity of specified time interval of a sound file to a constant value.
The input is a directory with WAV and corresponding TextGrids. TextGrids must have three intervals in the first tier specifying pre-speech, speech and post-speech intervals. The output is a directory with files in which only the speech interval that is is normalised to the wanted intensity.
Last updated