Skip to main content

test

PATKIT - Phonetic Analysis ToolKIT

PATKIT GUI

PATKIT provides tools for phonetic analysis of speech data. It includes a GUI for manual assessment/analysis/annotation (see picture above), command line tools for batch processing, and an API for programming your own tools.

While currently PATKIT's tools mainly work on tongue and larynx ultrasound as well as audio, in the future, the toolkit will include facilities for processing other kinds of articulatory data. The first two tools to be implemented are Optical Flow and Pixel Difference.

Optical Flow tracks local changes in ultrasound frames and estimates the flow field based on these.

Pixel Difference and Scanline Based Pixel Difference -- work on raw, uninterpolated data and produce measures of change over the course of a recording. How they work is explained in Chapter 3 of Pertti Palo's PhD thesis.

Getting PATKIT

Detailed instructions

Quick start guide:

  • Install the package manager uv:

    • MacOS/Linux run curl -LsSf https://astral.sh/uv/install.sh | sh
    • Windows run powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
    • See uv for more details.
  • On the commandline run uv tool install patkit

  • Run patkit --help for instructions.

  • If you want to run the example data, see 'What's included' below for instructions.

  • If on Linux of the debian variety (ubuntu, popos, others), you may also need to run the following:

apt-get update
apt-get upgrade
sudo apt-get install -y libxcb-cursor-dev

Try this in case trying to run patkit complains about a missing xcb plugin.

Documentation

Documentation

Current version and development plans

See Changelog, for what's new in the current version and what's coming up.

What's included

There is some test and demo data that is temporarily hosted in the GitHub repo. Download the contents of https://github.com/giuthas/patkit/tree/main/recorded_data/ and https://github.com/giuthas/patkit/tree/main/scenarios/. Easiest way to do this is by copy-pasting the URLs to this page to get a zip file with the contents of the directory.

Place the unzipped directories in the same directory and after installing patkit try running

patkit scenarios/minimal

and experiment from there.

TODO 1.0: Move the data elsewhere to be optionally loaded.

Contributing

Please get in touch with Pertti, if you would like to contribute to the project. All help is welcome regardless of your skill level. You can contribute by trying to use it according to instructions and reporting back when they lead you astray, proofreading docs, commenting code, testing PATKIT on a new platform, writing new functionality, writing tests for the code, roasting the code, doing UI design, contributing use cases...

Versioning

We use SemVer for versioning under the rules as set out by PEP 440 with the additional understanding that releases before 1.0 (i.e. current releases at time of writing) have not been tested in any way.

For the versions available, see the tags on this repository.

Contributors

List of contributors

The Phonetic Analysis ToolKIT (PATKIT or patkit for short) and examples is a tool box for analysing phonetic data.

PATKIT Copyright (C) 2019-2025 Pertti Palo, Scott Moisik, Matthew Faytak and Motoki Saito.

Optical Flow tools Copyright (C) 2020-2025 Scott Moisik

Pixel Difference tools Copyright (C) 2019-2025 Pertti Palo

Laryngeal example data Copyright (C) 2020 Scott Moisik

Tongue and tongue spline example data Copyright (C) 2013-2020 Pertti Palo

Program license

PATKIT is licensed under GPL 3.0.

This program (see below for data) is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/gpl-3.0.en.html

Data license

Data License

The data in directories larynx_data, tongue_data_1, tongue_data_1_2, and tongue_data_2 are licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) License. See link above or https://creativecommons.org/licenses/by-nc-sa/4.0/ for details.

Citing the code

When using any part of PATKIT, please cite:

  1. Palo, P., Moisik, S. R., and Faytak, M. (2023). “Analysing Speech Data with SATKIT”. In: International Conference of Phonetic Sciences (ICPhS 2023). Prague.
  2. Faytak, M., Moisik, S. & Palo, P. (2020): The Speech Articulation Toolkit (SATKit): Ultrasound image analysis in Python. In ISSP 2020, Online (planned as Providence, Rhode Island)

When making use of the Optic Flow code, please cite:

  1. Esling, J. H., & Moisik, S. R. (2012). Laryngeal aperture in relation to larynx height change: An analysis using simultaneous laryngoscopy and laryngeal ultrasound. In D. Gibbon, D. Hirst, & N. Campbell (Eds.), Rhythm, melody and harmony in speech: Studies in honour of Wiktor Jassem: Vol. 14/15 (pp. 117–127). Polskie Towarzystwo Fonetyczne.
  2. Moisik, S. R., Lin, H., & Esling, J. H. (2014). A study of laryngeal gestures in Mandarin citation tones using simultaneous laryngoscopy and laryngeal ultrasound (SLLUS). Journal of the International Phonetic Association, 44(01), 21–58. https://doi.org/10.1017/S0025100313000327
  3. Poh, D. P. Z., & Moisik, S. R. (2019). An acoustic and articulatory investigation of citation tones in Singaporean Mandarin using laryngeal ultrasound. In S. Calhoun, P. Escudero, M. Tabain, & P. Warren (Eds.), Proceedings of the 19th International Congress of the Phonetic Sciences.

When using the Pixel Difference (PD) code, please cite:

  1. Pertti Palo (2019). Measuring Pre-Speech Articulation. PhD thesis. Queen Margaret University, Scotland, UK. Available here PhD thesis.

Acknowledgments

  • Inspiration for PD was drawn from previous projects using Euclidean distance to measure change in articulatory speech data. For references, see Pertti Palo's PhD thesis.

  • The project uses a nifty python tool called licenseheaders by Johann Petrak and contributors to add and update license headers for python files.

Metadata

Release files for patkit 0.22.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for patkit 0.22.3
File Size Uploaded
patkit-0.22.3.tar.gz 204.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for patkit 0.22.3
File Interpreter ABI Platform
patkit-0.22.3-py3-none-any.whl Python 3 none any Details

Total release size: 534.7 kB

Release files / patkit-0.22.3.tar.gz

Download URL patkit-0.22.3.tar.gz
Size 204.0 kB
Tags Source
SHA-256 checksum
How to use checksums
408c01f08d15b98b581c27eaaa8126329030d0f9219c6fe28158e407d15cd0b0
BLAKE2b-256 checksum
How to use checksums
8a42785c9544b9ad783740464d72d8255fc830b5edb57201395862239722fdc0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release files / patkit-0.22.3-py3-none-any.whl

Download URL patkit-0.22.3-py3-none-any.whl
Size 330.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b162928e2a8d5812de34f8f4f4e33c9e5ed8fc0d9da929b10c5f901ce1a97081
BLAKE2b-256 checksum
How to use checksums
7a8dd78c8c059bfbba8b3a6f56ae0062149adf4ad8b67296f7633929742c4055
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.22.3 This release

2 release files

0.22.2

2 release files

0.22.1

2 release files

0.22.0

2 release files

0.21.0

2 release files

0.20.0

2 release files

0.18.0

2 release files

0.17.1

2 release files

0.16.0

2 release files

0.15.1

2 release files

0.15.0

2 release files

0.14.2

2 release files

0.14.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page