Install

Prosodic runs on Python 3.10+. The only system dependency is espeak, a free text-to-speech engine used to phonemize words that are not in the CMU pronunciation dictionary.

1. Install espeak

  • Mac (with Homebrew):

    brew install espeak
  • Linux:

    apt-get install espeak libespeak1 libespeak-dev
  • Windows: download and install from the espeak-ng releases.

2. Install prosodic

From PyPI:

pip install prosodic

Or the development version straight from GitHub:

pip install git+https://github.com/quadrismegistus/prosodic

Optional extras

  • Phrasal stress (syntax=True) needs spaCy and a small English model:

    pip install "prosodic[syntax]"
    python -m spacy download en_core_web_sm

    See Phrasal stress for what this enables.

  • GPU acceleration is automatic when a working PyTorch install with CUDA or Apple MPS is present; otherwise the parser runs on CPU (numpy). No GPU is required.

3. Check it works

import prosodic
prosodic.Text("Shall I compare thee to a summer's day?").parse()

Or launch the web app (see Web app):

prosodic web

If you would rather not install anything locally, use the hosted app at prosodic.app or the remote client (covered on the home page).