Library / SDK
YannickJadoul/Parselmouth avatar
YannickJadoul/Parselmouth

parselmouth: Praat's speech analysis in Python

Praat in Python, the Pythonic way

1,296 stars131 forksC++GPL-3.0

At a glance

What is it?
Parselmouth is a Python library for the Praat software, and it does not reimplement Praat or wrap its scripting language. It calls Praat's own C and C++ code directly, so the algorithms and their output are exactly the ones Praat produces, while the interface looks like an ordinary Python library.
Who is it for?
Adopt parselmouth if your work is phonetics, speech analysis or audio measurement and you need numbers that match what Praat itself would give you, because a reimplementation would quietly differ in the details. Do not adopt it if you need a lightweight audio library with no compiled dependency, since this one ships a C++ extension built with CMake.
Can I use it commercially?
Yes, with conditions. GPL-3.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
Is it still maintained?
Yes. The repository last received commits 10 days ago.
What is it written in?
Mainly C++, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.

Editorial analysis

The same algorithms, not a reimplementation

Parselmouth is a Python library for the Praat software, and the README spends a paragraph explaining exactly how it relates to Praat, because there are several obvious approaches and only one of them is this one.

Other attempts have been made at porting functionality from Praat to Python, and Parselmouth is unique in its aim to provide a complete and Pythonic interface to the internal Praat code. While other projects either wrap Praat's scripting language or reimplement parts of Praat's functionality in Python, Parselmouth directly accesses Praat's C and C++ code, which means the algorithms and their output are exactly the same as in Praat, and it provides efficient access to the program's data, but also provides an interface that looks no different from any other Python library.

That distinction is the whole value proposition. Praat is a research application with a scripting language of its own, and if you have ever tried to use it from Python you have probably ended up shelling out to it, writing a Praat script to a temporary file and parsing the output. Parselmouth removes the middle step: you get Praat's spectrogram, pitch tracker and intensity contour as Python objects with numpy arrays inside, and the numbers agree with Praat because they are Praat's.

The project is by Yannick Jadoul, the primary language in the repository listing is C++, the licence is GPL-3.0 and the documentation is on Read the Docs at parselmouth.readthedocs.io. The last push was on 2026-10-13 and the repository is not archived.

Installing it, and trying it in a browser

Parselmouth can be installed like any other Python library, using a recent version of the Python package manager pip, on Linux, macOS and Windows:

bash
pip install praat-parselmouth

Or, to update your installed version to the latest release:

bash
pip install -U praat-parselmouth

The package name on PyPI is praat-parselmouth rather than parselmouth, which is the sort of detail that saves a confused search, and the import name is parselmouth.

For more detailed instructions, the documentation points at its installation page.

There is also a way to try the whole thing without installing anything. The project has a Binder launch badge, and the description says you can try out Parselmouth online in interactive Jupyter notebooks on Binder, with the notebook tree at docs/examples. For a library that wraps a compiled research application, being able to open a notebook and run a spectrogram without building anything is a genuinely useful affordance, and it is the fastest way to find out whether the API shape suits you.

The CI setup is visible in the badges too, with a GitHub Actions workflow, pre-commit.ci and a Read the Docs build, so a published version of the documentation corresponds to a tested commit.

The API, and what a sound object can do

The examples in the README are the fastest way to understand the interface, and the first one is a sound file plotted with matplotlib:

Python
import parselmouth

snd = parselmouth.Sound("docs/examples/audio/the_north_wind_and_the_sun.wav")
plt.figure()
plt.plot(snd.xs(), snd.values.T)
plt.xlim([snd.xmin, snd.xmax])

The shape of the API is the shape of Praat's data model with Python naming. A Sound has xs() for the time axis, values for the samples as a matrix, and xmin and xmax for the time range, and the .T transpose is there because the sample matrix is stored the other way round.

From a sound you get the analysis objects, with to_intensity(), to_spectrogram() and to_pitch(), and each of them exposes the same kind of accessors. A spectrogram has x_grid() and y_grid() for the axes and values for the magnitudes, and a pitch object has selected_array with a frequency key, plus a ceiling property, which is Praat's pitch range.

The objects also carry Praat's operations. pre_emphasize() applies the pre-emphasis filter, and there is a copy() method so you can derive a modified sound and keep the original, which the third example does before recomputing the spectrogram with a window length of 0.03 and a maximum frequency of 8000.

Saving is a method too, with save taking a path and a format, and the example shows both the string form and the enumeration form, parselmouth.SoundFileFormat.WAV, with a second call saving the same sound as AIFF.

The last example is the batch one, looping over the .wav files in a directory with glob, pre-emphasising each and writing a pre-emphasised copy alongside the original.

What the examples teach about Praat's model

The value of the examples goes beyond the API, because they are a worked introduction to how Praat thinks about sound.

The first one plots a waveform. The second builds a spectrogram and an intensity contour on the same axes, with two y axes on the figure, because intensity and frequency are different scales, and it uses a pcolormesh with the afmhot colormap over a dynamic range of 70 decibels, which is the standard way to make a spectrogram legible.

The third one adds pitch, and it does something that trips people up the first time. The pitch values are taken from selected_array with the frequency key, and the unvoiced samples, where the frequency is zero, are replaced with NaN so that they are not plotted. The comment in the example says exactly that, and it is a good illustration of the difference between a pitch track and a measurement of the fundamental frequency everywhere.

The third example also shows the order of operations that matter in acoustics. The sound is copied, the copy is pre-emphasised, and the spectrogram is computed from the pre-emphasised sound with an explicit window length, while the pitch is computed from the original. Pre-emphasis lifts the high frequencies, which changes what a spectrogram shows, and the example is careful to keep the two analyses separate.

The fourth example is the one people copy into their own scripts, since looping over a directory of wav files, transforming them and writing the results next to the originals is a common first task, and it shows that the library handles file formats and paths the way a Python library would.

How it is built, and what it costs you to install

Parselmouth is built with cmake, and to build it manually the only requirement is a modern C++ compiler supporting the C++17 standard.

The packaging is where the interesting choices are. The build backend is scikit-build-core, which is the same tool the scientific Python ecosystem uses for projects with a compiled extension, and it is configured to take the CMake version from the CMakeLists.txt. The project metadata declares the package praat-parselmouth, requires Python 3.10 or later, and lists the supported Python versions from 3.10 through 3.14, along with the platform classifiers for macOS, Windows, Linux and Unix.

The runtime dependency list is one line, numpy at 1.7.0 or later, and the requirements file says the same. That is a light dependency for a library that gives you spectrograms, and it is light because the heavy lifting is in the bundled C++ rather than in Python packages.

The licence situation is the part to read carefully. The project is GPL-3.0-or-later, and the license-files list has five entries: the project's own LICENSE, the GNU General Public License text from the Praat tree, the gpl-3.0 text, the pybind11 licence and the fmt licence. The Praat code base is by Paul Boersma, and the acknowledgement says Parselmouth builds on that extensive code base, which actually implements the huge variety of speech processing the project exposes.

So the GPL covers the wrapper because it links GPL code, and a project that vendors Praat has no choice about that. If you need Parselmouth in a proprietary product, that is the constraint to plan for.

The documentation gap, and how to contribute around it

The Development section is unusually candid, and it is the thing to read before you send a pull request.

Currently, the actual project and Parselmouth's code is not very well documented. Or well, hardly documented at all. That is planned to still change in order to allow for easier contribution to this open source project, and until that day, if you want to contribute, the author asks you to get in touch on Gitter or by email and offers to guide you through the project and help you get started.

The practical reading is that Parselmouth is a well-used library with thinly documented internals, which is a combination that makes external contributions slow and makes the maintainer's guidance genuinely useful. The C++ code is a wrapper around a large upstream codebase that was not written with Python callers in mind, and the pybind11 layer is where the Pythonic surface is defined.

The community channels are the Gitter chat room for Praat and Parselmouth, the Google discussion group, and the Read the Docs API reference. The repository also carries a CHANGELOG.md, a CITATION.cff for citation metadata, a CODE_OF_CONDUCT.md and a pre-commit configuration.

The last build detail worth knowing is the source layout, because it explains the licence question and the build complexity at the same time. The praat/ directory holds the upstream Praat code, pybind11/ the bindings, extern/ the vendored dependencies including fmt, src/ the wrapper code, tests/ the test suite, docs/ the documentation, binder/ the notebook environment and res/ the resources.

Maintenance state and the version line

The release history is regular and the versions are small.

Version 0.4.5 was tagged on 2024-10-11, 0.4.6 on 2025-06-08 and 0.4.7 on 2025-11-27, with the last push on 2026-10-13. The repository is not archived, the default branch is master, and the project status classifier is Development Status 5, Production/Stable.

The version scheme matters for a different reason than usual. The features Parselmouth exposes come from Praat, and the behaviour of those features changes with Praat's own release cycle, so the Parselmouth version is really about the wrapper and the build, not about the algorithms. When you upgrade Parselmouth you get a newer Praat underneath, and if a measurement changes between Praat versions, that is where it comes from.

The practical advice for a research user is to pin both things. Record the Parselmouth version in your methods section, and if you need to reproduce a number exactly, record the Praat version it wrapped, because the CITATION.cff file in the repository is there for exactly that kind of academic bookkeeping.

The project also runs a Gitter chat room, a Google group and a community around Praat, and the documentation is built and published automatically, so the API reference you read corresponds to the current release.

Editorial conclusion

Adopt parselmouth if your work is phonetics, speech analysis or audio measurement and you need numbers that match what Praat itself would give you, because a reimplementation would quietly differ in the details. Do not adopt it if you need a lightweight audio library with no compiled dependency, since this one ships a C++ extension built with CMake. Before you start, check the version of Praat's algorithms your results depend on, since the answer follows Praat's behaviour rather than the library's own, and expect the internal code to be thinly documented, which the project says plainly and which is the main thing to be aware of before contributing.

Frequently asked questions

How is parselmouth different from wrapping Praat's scripting language?

Parselmouth directly accesses Praat's C and C++ code rather than wrapping Praat's scripting language or reimplementing parts of it in Python, so the algorithms and their output are exactly the same as in Praat, while the interface looks like any other Python library.

How do I install parselmouth?

Run pip install praat-parselmouth, or pip install -U praat-parselmouth to update. It works on Linux, macOS and Windows with a recent pip, and the package name is praat-parselmouth while the import name is parselmouth. You can also try it without installing, in interactive Jupyter notebooks on Binder.

What analysis can I do with parselmouth?

You load a sound with parselmouth.Sound and derive objects from it with to_intensity(), to_spectrogram() and to_pitch(), and each exposes the axes and the values as numpy arrays. The objects also carry Praat's operations such as pre_emphasize() and copy(), and you can save a sound in a chosen format.

What does building parselmouth from source require?

It is built with cmake, and the only requirement for a manual build is a modern C++ compiler supporting the C++17 standard. The Python packaging uses scikit-build-core, and the only runtime dependency is numpy at 1.7 or later, with Python 3.10 or later required.

What licence does parselmouth use, and what does that mean?

The project is GPL-3.0-or-later, with the licence files list covering the project's own licence, the GPL texts from the vendored Praat tree, the pybind11 licence and the fmt licence, because Parselmouth builds on Praat's code base by Paul Boersma. That matters if you need it inside a proprietary product.

Official sources

  1. License: GPL-3.0
  2. Project website
  3. README
  4. Releases
  5. YannickJadoul/Parselmouth on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/yannickjadoul-parselmouth.svg)](https://hysenlabs.com/projects/yannickjadoul-parselmouth)

Was this useful?