A voice pronunciation assessment library for Python.
Project description
pronounce-assess
A voice pronunciation assessment library for Python. Streams audio through a
wav2vec2 CTC phoneme model and yields per-phoneme match events
(correct / mispronounced / omitted / insertion) against a reference
IPA sequence.
Installation
pip install pronounce-assess # numpy, torch, transformers, sounddevice, eng-to-ipa
Usage
from pronounce_assess import PronounceAssessModel
from pronounce_assess.audio import ChunkRecord
assessor = PronounceAssessModel() # loads the model; picks cuda/cpu automatically
reference = assessor.sentence_to_phonemes("The quick brown fox")
with ChunkRecord(duration=5, chunk_len=8000) as chunks:
for event in assessor.stream_decode(chunks, reference):
print(event["phoneme"], event["label"], event["score"])
The lower-level pieces (load_model, sentence_to_phonemes, stream_decode)
remain available if you want to manage the processor/model pair yourself.
stream_decode accepts any iterable of float32 numpy chunks, so you can feed
it audio from a file, a websocket, or anything else — see
examples/live_mic_demo.py for a live-microphone demo.
Project layout
pronounce_assess/
__init__.py public API + version
streaming.py stream_decode – the core alignment/scoring algorithm
phonemes.py IPA normalization, sentence → phoneme conversion
models.py wav2vec2 model/processor loading + PronounceAssessModel
audio.py microphone chunk generator (optional, needs sounddevice)
exceptions.py error types
tests/ pytest suite
examples/ runnable demo scripts
Development
# Install in editable mode with dev tools
pip install -e .[dev]
# Run tests
pytest
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pronounce_assess-0.1.0.tar.gz.
File metadata
- Download URL: pronounce_assess-0.1.0.tar.gz
- Upload date:
- Size: 309.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
05e4bcbfcb9478d95888cb885755d29fd364f9fd5b0ddcb1775301001a97340a
|
|
| MD5 |
756daeea7ebbe605c336fcad3ede33a3
|
|
| BLAKE2b-256 |
27c96f0522d49dffe9b786bcc07cd2d5784bfd63f228eb7d9a41e5d0a573a086
|
File details
Details for the file pronounce_assess-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pronounce_assess-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81aebffc0f013dd7d30970c8429a882ec2d4237a9591d9bdd28976dc016f92a9
|
|
| MD5 |
8d9fc41b28d7aae17040201280510d2d
|
|
| BLAKE2b-256 |
4ab5dd70b7f2c4905dff26c3f99c8b5f4bec66cdba731a3d35505637129275be
|