Skip to main content

pstrain — Peace Train

Tests

The name pstrain is short for PocketSphinx train; it is pronounced "peace train."

pstrain is a toolkit for training continuous-density HMM/GMM acoustic models. It combines a C library for the numerical work with a Python interface for project setup, configuration, and training pipelines.

pstrain descends from CMU SphinxTrain and the wider CMU Sphinx lineage. We are grateful to the developers, researchers, institutions, and community members whose work made this project possible.

What pstrain does

pstrain provides a training pipeline for:

  • acoustic feature extraction and corpus splitting;
  • flat initialization and Baum–Welch training;
  • context-independent and context-dependent models;
  • Gaussian splitting, decision-tree state tying, and model packaging;
  • forced alignment and PocketSphinx decoding with WER/CER evaluation; and
  • multiple-pronunciation training, where pronunciation variants participate as parallel paths in each utterance's training graph.

Quickstart

Start with the terminal walkthrough: it covers Python and compiler prerequisites, an isolated installation, and a small training run using the included audio, followed by decoding and packaging. No Python programming or corpus download is needed for that example.

Training requires macOS or Linux and Python 3.11+. Native Windows supports the package and native tools, but cannot run the training pipeline; see the support policy.

The guide distinguishes building this checkout from installing a published release, and starts with the faster ci-1g model before the default cd-8g.

Benchmark pin

The ARCTIC benchmark pin freezes the corpus, training modes, model identities, decoder, and per-utterance measurements used as the comparison baseline.

pstrain rebuilds SphinxTrain with its C core vendored and its orchestration reimplemented. On the shared CMU Arctic benchmark, pstrain under its shipped defaults except for split.test_count=0 (including multiple-pronunciation training) shows no statistically significant regression on either cell versus the preserved upstream oracle, historically attributed to stock SphinxTrain; see its provenance limits. The arms share one matched decode path but are NOT COMPARABLE for implementation attribution because the oracle's producing lineage is unknown. The two cells carry different weight. The 3,395-utterance set is cross-speaker, so it measures what the model does on voices it was not trained on: there pstrain records 22,703 errors (75.7221% WER) against 22,638 (75.5053%) for that oracle — behind by 0.2168 percentage points, a margin the data cannot separate from zero (95% paired interval [-0.2414, +0.6713]). SLT-55 is a same-speaker held-out cell of 55 utterances; there pstrain is ahead, 139 errors (27.0955% WER) against 144 (28.0702%), with 23 of 55 per-utterance error rows differing, but its interval of [-3.6965, +1.6575] is consistent with anything from a 3.7-point gain to a 1.7-point regression and so settles little on its own. The larger cross-speaker set is where the evidence is. The benchmark pin and its machine-readable record preserve the evidence and measurement conditions. Run make verified for the repository's aggregate verification command; its Arctic gate authenticates the pinned measurement conditions against the current checkout and re-derives the recorded paired statistics from the stored per-utterance rows without re-decoding. The end-to-end pstrain-versus-baseline WER comparison is produced by the full scripts/bench_arctic.py benchmark run, not by make verified.

Documentation

The documentation can be built locally with make -C docs html.

License

New pstrain code is available under the BSD 2-Clause license. CMU-derived code retains its applicable CMU BSD-style license alongside the license for pstrain modifications. See LICENSE, csrc/LICENSE.sphinx, and THIRD_PARTY_NOTICES.md for the complete terms and credits.

Release files for pstrain 0.4.1

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

Source distribution (sdist)

Source distribution for pstrain 0.4.1
File Size Uploaded
pstrain-0.4.1.tar.gz 3.4 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for pstrain 0.4.1
File
pstrain-0.4.1-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
pstrain-0.4.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64, Linux glibc 2.17+ x86-64 Details
pstrain-0.4.1-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
pstrain-0.4.1-cp313-cp313-macosx_10_13_x86_64.whl CPython 3.13 CPython 3.13 macOS 10.13+ x86-64 Details
pstrain-0.4.1-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
pstrain-0.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details
pstrain-0.4.1-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
pstrain-0.4.1-cp312-cp312-macosx_10_13_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.13+ x86-64 Details
pstrain-0.4.1-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
pstrain-0.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64, Linux glibc 2.17+ x86-64 Details
pstrain-0.4.1-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
pstrain-0.4.1-cp311-cp311-macosx_10_9_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.9+ x86-64 Details

Total release size: 66.5 MB

Release files / pstrain-0.4.1.tar.gz

Download URL pstrain-0.4.1.tar.gz
Size 3.4 MB
Tags Source
SHA-256 checksum
How to use checksums
b5776c77154ac7e77d30d2cdd204dece8425ee620ace89cd2dfdc905a641a49a
BLAKE2b-256 checksum
How to use checksums
a222dace1cceff3a6d21de74b9f73d82becfa6ef2ff8e8b3f4a5fc562967e5ad
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 Sep 16, 2026.

Transparency log

Release files / pstrain-0.4.1-cp313-cp313-win_amd64.whl

Download URL pstrain-0.4.1-cp313-cp313-win_amd64.whl
Size 4.5 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
658260ad570e15f5422be7508737259032330a41467e91a364d65b64c09dc71f
BLAKE2b-256 checksum
How to use checksums
1b013527b6f217d8fe691a5d769e5338817b78747d899135d4327ef6523173ed
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 Sep 16, 2026.

Transparency log

Release files / pstrain-0.4.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL pstrain-0.4.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 6.4 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
f5593d0e5fc906981bfd068faa2c2dcd68f630f7283dee54dfbc8f3c6a4c5804
BLAKE2b-256 checksum
How to use checksums
e1bd1b47422f619859fa297379cddbfa9c1e026107e8104011025efc9744c06f
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 Sep 16, 2026.

Transparency log

Release files / pstrain-0.4.1-cp313-cp313-macosx_11_0_arm64.whl

Download URL pstrain-0.4.1-cp313-cp313-macosx_11_0_arm64.whl
Size 5.0 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
2ae2ac43d06501f2f407f81830175ed937b0ce6704670558acf93752eaedea07
BLAKE2b-256 checksum
How to use checksums
44200c09f1b31b560be9f8d39c022be6007b3047fdf3d7a46b68b8f8ff719105
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 Sep 16, 2026.

Transparency log

Release files / pstrain-0.4.1-cp313-cp313-macosx_10_13_x86_64.whl

Download URL pstrain-0.4.1-cp313-cp313-macosx_10_13_x86_64.whl
Size 5.2 MB
Tags CPython 3.13 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
31cff271ee688ed37ec5f0fc9f1c7de1ca4ce4738f2f9de6278093e6fe54d076
BLAKE2b-256 checksum
How to use checksums
c6c8ca7dcc0db6508f9f3443df3ccf56928d3d191d3ae3c91971834aa6bcf419
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 Sep 16, 2026.

Transparency log

Release files / pstrain-0.4.1-cp312-cp312-win_amd64.whl

Download URL pstrain-0.4.1-cp312-cp312-win_amd64.whl
Size 4.5 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
bbda38f9fcf2559ced7c6aad9e06a48e2ae9ee4aba515022148168a6e7174ade
BLAKE2b-256 checksum
How to use checksums
c18c0dca9a670963897501330d2aa7cb2fd9f1042db57ded2f18fd30768de666
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 Sep 16, 2026.

Transparency log

Release files / pstrain-0.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL pstrain-0.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 6.4 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
46a6285410dac2ca20ee7e57fc05bb74636e1ca069d2142098ba4bdd27817419
BLAKE2b-256 checksum
How to use checksums
e3e93777d1bfeca8167804dbfd2f59abdb97b4842f2d7299496d4a330d8336a7
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 Sep 16, 2026.

Transparency log

Release files / pstrain-0.4.1-cp312-cp312-macosx_11_0_arm64.whl

Download URL pstrain-0.4.1-cp312-cp312-macosx_11_0_arm64.whl
Size 5.0 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
86801e75a9584cc74dba706a241ba7b926478394b681305b722f09e628f54bd4
BLAKE2b-256 checksum
How to use checksums
71b9ab15a9d010f9d0eb911704ac21573241ea9b4ab1a8526469f25375b68ef8
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 Sep 16, 2026.

Transparency log

Release files / pstrain-0.4.1-cp312-cp312-macosx_10_13_x86_64.whl

Download URL pstrain-0.4.1-cp312-cp312-macosx_10_13_x86_64.whl
Size 5.2 MB
Tags CPython 3.12 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
a46ecb1ac9d0f3c7961abf14c0821f8abf3e0a2075ea7a73f741c5dae54f95f9
BLAKE2b-256 checksum
How to use checksums
ff55f7ff188d46e01c1c36b15bf79e591567b3ef6c3a0aac6241b041a0f31fb3
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 Sep 16, 2026.

Transparency log

Release files / pstrain-0.4.1-cp311-cp311-win_amd64.whl

Download URL pstrain-0.4.1-cp311-cp311-win_amd64.whl
Size 4.5 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
2c61a4c820be0878a3e28b0ee2552d548b4fae5a6392ddc09382e9d742caee39
BLAKE2b-256 checksum
How to use checksums
b457c1b0a70e0a1706e0280ea47f922672e54952321a9865464c748fe8315eff
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 Sep 16, 2026.

Transparency log

Release files / pstrain-0.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL pstrain-0.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 6.4 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
c93bc0f3e156bb70623572a5e9df095f925c9afb9d5fa238b71c8f88a2b79e40
BLAKE2b-256 checksum
How to use checksums
89c0cee0efc89912284a936317cbf67740b98fe3a8cf3d1015747cb8dbed876d
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 Sep 16, 2026.

Transparency log

Release files / pstrain-0.4.1-cp311-cp311-macosx_11_0_arm64.whl

Download URL pstrain-0.4.1-cp311-cp311-macosx_11_0_arm64.whl
Size 5.0 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
d5631a4d5ea51b528e8f15adb35f2d242d8f92c19795eb6749158823d1955943
BLAKE2b-256 checksum
How to use checksums
5b6e280d36632f9bb469babc54b0952bdfaf524eaa0488dde1dc0e3dcc5eab2d
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 Sep 16, 2026.

Transparency log

Release files / pstrain-0.4.1-cp311-cp311-macosx_10_9_x86_64.whl

Download URL pstrain-0.4.1-cp311-cp311-macosx_10_9_x86_64.whl
Size 5.3 MB
Tags CPython 3.11 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
7ec7b5a27a8376c5d0979df2fd9c5254561d8f4bb3a525af3b2f0287e94669aa
BLAKE2b-256 checksum
How to use checksums
55ce8d38a2955fa1fdaa5b6c68b50db01e91c267afd5047524819194204aaf38
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 Sep 16, 2026.

Transparency log

Release history Release notifications | RSS feed

0.5.0

13 release files

This release

0.4.1 This release

13 release files

0.4.0

13 release files

0.3.0

13 release files

0.2.0

13 release files

0.1.1

13 release files

0.1.0

10 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