Formant extraction based on vowel trajectory dynamics
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

R package 'pivot' (version 3.0)

Formant extraction based on vowel trajectory dynamics

by Aaron Albin (with Wil Rankinen)

What the package does:

This package implements the method for extracting measurements from the formant tracks of vowels as described in Albin & Rankinen (2014). Every formant point sampled within a vowel is considered as a possible "pivot" (i.e. turning point), with monophthongs modeled as having one pivot and diphthongs modeled as having two pivots. The optimal pivot for the vowel is then determined by fitting regression lines to the formant trajectory and comparing the goodness-of-fit of these lines to the raw formant data. In addition to formants, the package can also be applied to any one-dimensional time-series of acoustic measurements (F0, intensity, nasality, breathiness, etc.).

For further details about the method, see the poster presented at the 168th meeting of the Acoustical Society of America (Indianapolis, Indiana; 10/27/2014 ~ 10/31/2014) about the method. A PDF copy of the poster can be downloaded from and ResearchGate.


1. Click on the green "Clone or download" button at the top of this page, then click "Download ZIP" on the bottom-right of the pop-up window. Save the .zip file somewhere on your computer. 2. Unzip the .zip file to somewhere convenient (e.g. your desktop).
  • After this step, the .zip file is no longer needed and can be deleted.
3. Open R.
  • If you are running Windows, you must open R as an administrator. To do so, go to the icon for R on your start menu ('start screen' in Windows 8) or desktop, right-click it, and select "Run as administrator". Click "Yes" to the User Account Control window that pops up.
4. Find the path to the 'pivot' folder inside the unzipped folder from step 2. (Crucially, you need to find the path to the folder named 'pivot' and not the higher-level folder named 'pivot-master'.) If you unzipped to your desktop in step 2, the path will be something like the following:
  • For Windows: "C:/Users/MyUsername/Desktop/pivot-master/pivot/"
  • For Mac: "/Users/MyUsername/Desktop/pivot-master/pivot/"
5. Run the following line of code, adjusting the path for the pkgs argument as needed so it points to path you determined in Step 4.
  • install.packages(pkgs="(path from Step 4)", repos=NULL, type="source")

If everything works correctly, you should see something like the following in the R console:

* installing *source* package 'pivot' ...
** R
** data
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (pivot)


You can load this package as you would any other, e.g. by including library("pivot") at the top of your R script. Once loaded, the pivot analysis of formant data is performed by two functions - (singular) pivot() for the one-pivot/monophthong analysis and (plural) pivots() for the two-pivot/diphthong analysis. Both have two arguments - 'f1' and 'f2' - corresponding to the F1 and F2 tracks across the duration of a given vowel token. To analyze other one-dimensional acoustic data (F0, intensity, nasality, breathiness, etc.), simply provide the relevant vector as 'f1' and leave 'f2' unspecified. To read more about these functions (including several examples illustrating how to use them), type help("pivot") or ?pivot at the R console. To go through all of these examples at once, run the command example("pivot").

Please cite as:

Albin, A., and W. Rankinen (2014). A "pivot" model for extracting formant measurements based on vowel trajectory dynamics. Journal of the Acoustical Society of America, 136(4), 2082.

(Note that this information can be retrieved at any time by typing citation("pivot") at the R console.)


This package is released under the GNU General Public License, Version 3. Once the package has been installed, a copy of this license can be viewed at any time by typing RShowDoc("LICENSE",package="pivot") at the R console.


This package is unrelated to the PivotalR package on CRAN