vocal-range-test
Headless Python library that turns pitch data into a vocal range and a voice-type estimate. Given lowest and highest pitches (as Hz, note names, a pitch contour, or audio takes), it reports note names, frequencies, semitone/octave span, and an estimated voice type among bass, baritone, tenor, alto, mezzo-soprano, and soprano.
This package analyzes range. It does not open a microphone, draw a UI, or perform network I/O.
Install
pip install vocal-range-test
From a local checkout:
pip install -e ".[dev]"
Formats: WAV is decoded with the Python standard library. MP3, M4A, and AAC require ffmpeg on your PATH.
Quick start
from vocal_range_test import estimate_range
# Already-known low / high pitches (notes or Hz)
result = estimate_range(low="E2", high="E4")
print(result.low_note, result.high_note) # E2 E4
print(result.semitone_span, result.octave_span) # 24.0 2.0
print(result.voice_type) # bass
result = estimate_range(low=110.0, high=440.0) # A2 – A4 → baritone
From a pitch contour (Hz sequence; unvoiced frames may be None):
from vocal_range_test import estimate_from_contour
result = estimate_from_contour([98.0, 100.0, 110.0, 220.0, 330.0, 349.0])
print(result.voice_type)
From two sustained audio takes (low, then high):
from vocal_range_test import estimate_from_audio
result = estimate_from_audio("low.wav", "high.wav")
print(result.to_dict())
CLI
vocal-range-test --pitches E2 E4
vocal-range-test --pitches 82.41 329.63 --json
vocal-range-test --files low.wav high.wav
vocal-range-test --file take.wav
vocal-range-test --list-bands
Voice-type classification bands
Classification compares your measured low–high MIDI span against typical published solo-voice ranges (see Wikipedia — Voice type):
| Voice type | Typical range | MIDI (C4 = 60) |
|---|---|---|
| bass | E2 – E4 | 40 – 64 |
| baritone | A2 – A4 | 45 – 69 |
| tenor | C3 – C5 | 48 – 72 |
| alto | F3 – F5 | 53 – 77 |
| mezzo-soprano | A3 – A5 | 57 – 81 |
| soprano | C4 – C6 | 60 – 84 |
Bands overlap. The estimator scores each band by how many semitones of your span fall inside it and picks the best overlap. If nothing overlaps, the result is mixed. This is a range-based estimate, not a diagnosis — tessitura, timbre, and training also define voice type.
Public API
| Symbol | Role |
|---|---|
estimate_range(...) |
Unified entry: pitches, contour, two takes, or one file |
estimate_from_pitches(low, high) |
Notes or Hz → range result |
estimate_from_contour(contour) |
Pitch contour → range result |
estimate_from_audio(low, high) |
Two audio takes / buffers → range result |
estimate_from_file(path) |
Single file contour percentiles → range result |
build_range(low_hz, high_hz) |
Pure math from two frequencies |
estimate_voice_type(low_midi, high_midi) |
Overlap classifier only |
voice_type_bands() |
Documented band table |
VocalRangeResult |
Notes, Hz, spans, and voice_type |
Pitch tracking for audio uses YIN (time-domain), after De Cheveigné & Kawahara (2002). Contour / take summaries use robust percentiles (20th for low, 80th for high) so brief pitch glitches weigh less than a sustained note.
Development
pip install -e ".[dev]"
pytest
License
MIT — see LICENSE.
Metadata
Release files for vocal-range-test 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vocal_range_test-0.1.0.tar.gz | 17.2 kB | Without provenance | Details for vocal_range_test-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vocal_range_test-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for vocal_range_test-0.1.0-py3-none-any.whl |
Total release size: 36.2 kB
Release files / vocal_range_test-0.1.0.tar.gz
| Download URL | vocal_range_test-0.1.0.tar.gz |
|---|---|
| Size | 17.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8db9a9cc53b7d8cc1b7587fe160c1f815907575a8435a68e9d27f779c85622e5
|
|
BLAKE2b-256 checksum How to use checksums |
14ba2385d8103efa0c2cf7b3b81bddf7f5da2cea80398614092c2483fb6b3f7a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / vocal_range_test-0.1.0-py3-none-any.whl
| Download URL | vocal_range_test-0.1.0-py3-none-any.whl |
|---|---|
| Size | 19.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
131589084201e823dfb8e33ed192c8e6966c0a293a2a2f35585dd3ba89e30842
|
|
BLAKE2b-256 checksum How to use checksums |
9d244e6653131d1fedcc84dce66c08db5e3e16c12038db274af583c727198b17
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for vocal-range-test 0.1.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.